mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[ADD] Hotel Node Helper
This module is for providing helper functions to the hotel node master module.
This commit is contained in:
22
hotel_node_helper/README.rst
Normal file
22
hotel_node_helper/README.rst
Normal 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
|
||||
|
||||
3
hotel_node_helper/__init__.py
Normal file
3
hotel_node_helper/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import models
|
||||
21
hotel_node_helper/__manifest__.py
Normal file
21
hotel_node_helper/__manifest__.py
Normal 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
|
||||
}
|
||||
3
hotel_node_helper/models/__init__.py
Normal file
3
hotel_node_helper/models/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import inherited_hotel_room_type
|
||||
22
hotel_node_helper/models/inherited_hotel_room_type.py
Normal file
22
hotel_node_helper/models/inherited_hotel_room_type.py
Normal 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
|
||||
3
hotel_node_helper/security/hotel_node_security.xml
Normal file
3
hotel_node_helper/security/hotel_node_security.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo noupdate="0">
|
||||
</odoo>
|
||||
1
hotel_node_helper/security/ir.model.access.csv
Normal file
1
hotel_node_helper/security/ir.model.access.csv
Normal file
@@ -0,0 +1 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
|
BIN
hotel_node_helper/static/description/icon.png
Normal file
BIN
hotel_node_helper/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
Reference in New Issue
Block a user