[WIP] Added Room Type and Rooms

Master Node keeps minimal information of Hotel rooms for managing reservation through the reservation wizard.
This commit is contained in:
Pablo Quesada Barriuso
2018-09-21 13:53:19 +02:00
parent a5ad202432
commit c777ee97e9
9 changed files with 170 additions and 17 deletions

View File

@@ -0,0 +1,26 @@
# 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 logging
from odoo import models, fields, api, _
_logger = logging.getLogger(__name__)
class HotelNodeRoom(models.Model):
_name = "hotel.node.room"
_description = "Rooms"
active = fields.Boolean(default=True)
sequence = fields.Integer(default=0)
name = fields.Char(required=True, translate=True)
remote_room_id = fields.Integer(require=True, invisible=True, copy=False,
help="ID of the target record in the remote database")
room_type_id = fields.Many2one('hotel.node.room.type', 'Hotel Room Type')
node_id = fields.Many2one('project.project', 'Hotel', required=True)