[ADD] Hotel Node Helper

This module is for providing helper functions to the hotel node master module.
This commit is contained in:
Pablo
2018-10-18 17:58:08 +02:00
parent 9fb96931f0
commit bb88d2b285
8 changed files with 75 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
=================
Hotel Node Helper
=================
This module is for providing helper functions to the hotel node master module.
**Try me on Runbot**
**Known issues / Roadmap**
...
**Bug Tracker**
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback here.
Credits
Contributors
Maintainer

View File

@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import models

View File

@@ -0,0 +1,21 @@
{
'name': 'Hotel Node Helper',
'summary': """Provides helper functions to the hotel node master module""",
'version': '0.1.0',
'author': 'Pablo Q. Barriuso, \
Darío Lodeiros, \
Alexandre Díaz, \
Odoo Community Association (OCA)',
'category': 'Generic Modules/Hotel Management',
'depends': [
'hotel'
],
'license': "AGPL-3",
'data': [
'security/hotel_node_security.xml',
'security/ir.model.access.csv'
],
'demo': [],
'auto_install': False,
'installable': True
}

View File

@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import inherited_hotel_room_type

View File

@@ -0,0 +1,22 @@
# Copyright 2018 Pablo Q. Barriuso
# Copyright 2018 Alexandre Díaz
# Copyright 2018 Dario Lodeiros
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import wdb
from odoo import models, fields, api
class HotelRoomType(models.Model):
_inherit = 'hotel.room.type'
@api.model
def check_availability_room_ids(self, dfrom, dto,
room_type_id=False, notthis=[]):
"""
Check availability for all or specific room types between dates
@return: A list of `ids` with free rooms
"""
free_rooms = super().check_availability_room(dfrom, dto, room_type_id, notthis)
return free_rooms.ids

View File

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="0">
</odoo>

View File

@@ -0,0 +1 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB