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:
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
|
||||
Reference in New Issue
Block a user