mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[WIP] Basic multihotel modeling
This commit is contained in:
@@ -12,3 +12,6 @@ class HotelRoomAmenitie(models.Model):
|
|||||||
default_code = fields.Char('Internal Reference')
|
default_code = fields.Char('Internal Reference')
|
||||||
room_amenity_type_id = fields.Many2one('hotel.amenity.type',
|
room_amenity_type_id = fields.Many2one('hotel.amenity.type',
|
||||||
'Amenity Catagory')
|
'Amenity Catagory')
|
||||||
|
hotel_ids = fields.Many2many('hotel.property', 'Hotels', required=False, ondelete='restrict')
|
||||||
|
|
||||||
|
#TODO: Constrain coherence hotel_ids with amenity types hotel_ids
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Copyright 2017 Alexandre Díaz
|
# Copyright 2017 Alexandre Díaz
|
||||||
# Copyright 2017 Dario Lodeiros
|
# Copyright 2017 Dario Lodeiros
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
from odoo import models, fields
|
from odoo import models, fields, api
|
||||||
|
|
||||||
|
|
||||||
class HotelRoomAmenitieType(models.Model):
|
class HotelRoomAmenitieType(models.Model):
|
||||||
@@ -11,5 +11,8 @@ class HotelRoomAmenitieType(models.Model):
|
|||||||
name = fields.Char('Amenity Name', translate=True, required=True)
|
name = fields.Char('Amenity Name', translate=True, required=True)
|
||||||
active = fields.Boolean('Active', default=True)
|
active = fields.Boolean('Active', default=True)
|
||||||
room_amenity_ids = fields.One2many('hotel.amenity',
|
room_amenity_ids = fields.One2many('hotel.amenity',
|
||||||
'room_amenity_type_id',
|
'room_amenity_type_id',
|
||||||
'Amenities in this category')
|
'Amenities in this category')
|
||||||
|
hotel_ids = fields.Many2many('hotel.property', 'Hotels', required=False, ondelete='restrict')
|
||||||
|
|
||||||
|
#TODO: Constrain coherence hotel_ids with amenities hotel_ids
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ class HotelBoardService(models.Model):
|
|||||||
digits=dp.get_precision('Product Price'),
|
digits=dp.get_precision('Product Price'),
|
||||||
compute='_compute_board_amount',
|
compute='_compute_board_amount',
|
||||||
store=True)
|
store=True)
|
||||||
|
hotel_ids = fields.Many2many('hotel.property', string='Hotels', required=False, ondelete='restrict')
|
||||||
|
|
||||||
@api.depends('board_service_line_ids.amount')
|
@api.depends('board_service_line_ids.amount')
|
||||||
def _compute_board_amount(self):
|
def _compute_board_amount(self):
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ class HotelBoardServiceLine(models.Model):
|
|||||||
'Amount',
|
'Amount',
|
||||||
digits=dp.get_precision('Product Price'),
|
digits=dp.get_precision('Product Price'),
|
||||||
default=_get_default_price)
|
default=_get_default_price)
|
||||||
|
hotel_ids = fields.Many2many('hotel.property',
|
||||||
|
related='hotel_board_service_id.hotel_ids')
|
||||||
|
|
||||||
@api.onchange('product_id')
|
@api.onchange('product_id')
|
||||||
def onchange_product_id(self):
|
def onchange_product_id(self):
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ class HotelBoardServiceRoomType(models.Model):
|
|||||||
compute='_compute_board_amount',
|
compute='_compute_board_amount',
|
||||||
store=True)
|
store=True)
|
||||||
board_service_line_ids = fields.One2many('hotel.board.service.room.type.line', 'hotel_board_service_room_type_id')
|
board_service_line_ids = fields.One2many('hotel.board.service.room.type.line', 'hotel_board_service_room_type_id')
|
||||||
|
hotel_id = fields.Many2one('hotel.property',
|
||||||
|
related='hotel_room_type_id.hotel_id')
|
||||||
|
|
||||||
@api.model_cr
|
@api.model_cr
|
||||||
def init(self):
|
def init(self):
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ class HotelBoardServiceRoomTypeLine(models.Model):
|
|||||||
|
|
||||||
#TODO def default_amount "amount of service"
|
#TODO def default_amount "amount of service"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
hotel_board_service_room_type_id = fields.Many2one(
|
hotel_board_service_room_type_id = fields.Many2one(
|
||||||
'hotel.board.service.room.type', 'Board Service Room', ondelete='cascade', required=True)
|
'hotel.board.service.room.type', 'Board Service Room', ondelete='cascade', required=True)
|
||||||
product_id = fields.Many2one(
|
product_id = fields.Many2one(
|
||||||
|
|||||||
@@ -28,3 +28,7 @@ class HotelCancelationRule(models.Model):
|
|||||||
('all', 'All Days'),
|
('all', 'All Days'),
|
||||||
('days', 'Specify days')], 'No Show apply on', default='all')
|
('days', 'Specify days')], 'No Show apply on', default='all')
|
||||||
days_noshow = fields.Integer('NoShow first days', default="2")
|
days_noshow = fields.Integer('NoShow first days', default="2")
|
||||||
|
hotel_ids = fields.Many2many('hotel.property', string='Hotels', required=False,
|
||||||
|
ondelete='restrict')
|
||||||
|
|
||||||
|
#TODO: Constrain coherence hotel_ids pricelist and cancelation_rules
|
||||||
|
|||||||
@@ -68,6 +68,10 @@ class HotelCheckinPartner(models.Model):
|
|||||||
return reservation.checkout
|
return reservation.checkout
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _get_default_hotel(self):
|
||||||
|
return self.env.user.hotel_id
|
||||||
|
|
||||||
partner_id = fields.Many2one('res.partner', default=_default_partner_id,
|
partner_id = fields.Many2one('res.partner', default=_default_partner_id,
|
||||||
required=True)
|
required=True)
|
||||||
email = fields.Char('E-mail', related='partner_id.email')
|
email = fields.Char('E-mail', related='partner_id.email')
|
||||||
@@ -91,6 +95,8 @@ class HotelCheckinPartner(models.Model):
|
|||||||
'State', readonly=True,
|
'State', readonly=True,
|
||||||
default=lambda *a: 'draft',
|
default=lambda *a: 'draft',
|
||||||
track_visibility='onchange')
|
track_visibility='onchange')
|
||||||
|
hotel_id = fields.Many2one('hotel.property', default=_get_default_hotel,
|
||||||
|
required=True)
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def create(self, vals):
|
def create(self, vals):
|
||||||
|
|||||||
@@ -9,3 +9,4 @@ class HotelFloor(models.Model):
|
|||||||
|
|
||||||
name = fields.Char('Ubication Name', translate=True, size=64, required=True, index=True)
|
name = fields.Char('Ubication Name', translate=True, size=64, required=True, index=True)
|
||||||
sequence = fields.Integer('Sequence')
|
sequence = fields.Integer('Sequence')
|
||||||
|
hotel_ids = fields.Many2many('hotel.property', string='Hotels', required=False, ondelete='restrict')
|
||||||
|
|||||||
@@ -94,10 +94,16 @@ class HotelFolio(models.Model):
|
|||||||
def _get_default_team(self):
|
def _get_default_team(self):
|
||||||
return self.env['crm.team']._get_default_team_id()
|
return self.env['crm.team']._get_default_team_id()
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _get_default_hotel(self):
|
||||||
|
return self.env.user.hotel_id
|
||||||
|
|
||||||
#Main Fields--------------------------------------------------------
|
#Main Fields--------------------------------------------------------
|
||||||
name = fields.Char('Folio Number', readonly=True, index=True,
|
name = fields.Char('Folio Number', readonly=True, index=True,
|
||||||
default=lambda self: _('New'))
|
default=lambda self: _('New'))
|
||||||
client_order_ref = fields.Char(string='Customer Reference', copy=False)
|
client_order_ref = fields.Char(string='Customer Reference', copy=False)
|
||||||
|
hotel_id = fields.Many2one('hotel.property', default=_get_default_hotel,
|
||||||
|
required=True)
|
||||||
partner_id = fields.Many2one('res.partner',
|
partner_id = fields.Many2one('res.partner',
|
||||||
track_visibility='onchange',
|
track_visibility='onchange',
|
||||||
ondelete='restrict',)
|
ondelete='restrict',)
|
||||||
|
|||||||
@@ -240,6 +240,8 @@ class HotelReservation(models.Model):
|
|||||||
partner_parent_id = fields.Many2one(related="partner_id.parent_id")
|
partner_parent_id = fields.Many2one(related="partner_id.parent_id")
|
||||||
closure_reason_id = fields.Many2one(related='folio_id.closure_reason_id')
|
closure_reason_id = fields.Many2one(related='folio_id.closure_reason_id')
|
||||||
company_id = fields.Many2one(related='folio_id.company_id', string='Company', store=True, readonly=True)
|
company_id = fields.Many2one(related='folio_id.company_id', string='Company', store=True, readonly=True)
|
||||||
|
hotel_id = fields.Many2one('hotel.property', store=True, readonly=True,
|
||||||
|
related='folio_id.hotel_id')
|
||||||
reservation_line_ids = fields.One2many('hotel.reservation.line',
|
reservation_line_ids = fields.One2many('hotel.reservation.line',
|
||||||
'reservation_id',
|
'reservation_id',
|
||||||
required=True)
|
required=True)
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ class HotelReservationLine(models.Model):
|
|||||||
'reservation_line_invoice_rel',
|
'reservation_line_invoice_rel',
|
||||||
'reservation_line_id', 'invoice_line_id',
|
'reservation_line_id', 'invoice_line_id',
|
||||||
string='Invoice Lines', readonly=True, copy=False)
|
string='Invoice Lines', readonly=True, copy=False)
|
||||||
|
hotel_id = fields.Many2one('hotel.property', store=True, readonly=True,
|
||||||
|
related='reservation_id.hotel_id')
|
||||||
|
|
||||||
@api.constrains('date')
|
@api.constrains('date')
|
||||||
def constrains_duplicated_date(self):
|
def constrains_duplicated_date(self):
|
||||||
|
|||||||
@@ -14,10 +14,6 @@ class HotelRoom(models.Model):
|
|||||||
_description = 'Hotel Room'
|
_description = 'Hotel Room'
|
||||||
_order = "sequence, room_type_id, name"
|
_order = "sequence, room_type_id, name"
|
||||||
|
|
||||||
@api.model
|
|
||||||
def _get_default_hotel(self):
|
|
||||||
return self.env.user.hotel_id
|
|
||||||
|
|
||||||
name = fields.Char('Room Name', required=True)
|
name = fields.Char('Room Name', required=True)
|
||||||
active = fields.Boolean('Active', default=True)
|
active = fields.Boolean('Active', default=True)
|
||||||
sequence = fields.Integer('Sequence', default=0)
|
sequence = fields.Integer('Sequence', default=0)
|
||||||
@@ -26,8 +22,8 @@ class HotelRoom(models.Model):
|
|||||||
ondelete='restrict')
|
ondelete='restrict')
|
||||||
floor_id = fields.Many2one('hotel.floor', 'Ubication',
|
floor_id = fields.Many2one('hotel.floor', 'Ubication',
|
||||||
help='At which floor the room is located.')
|
help='At which floor the room is located.')
|
||||||
hotel_id = fields.Many2one('hotel.property', 'Hotel', required=True, ondelete='restrict',
|
hotel_id = fields.Many2one('hotel.property', store=True, readonly=True,
|
||||||
default=_get_default_hotel,)
|
related='room_type_id.hotel_id')
|
||||||
|
|
||||||
max_adult = fields.Integer('Max Adult')
|
max_adult = fields.Integer('Max Adult')
|
||||||
max_child = fields.Integer('Max Child')
|
max_child = fields.Integer('Max Child')
|
||||||
|
|||||||
@@ -8,3 +8,5 @@ class RoomClosureReason(models.Model):
|
|||||||
|
|
||||||
name = fields.Char('Name', translate=True, required=True)
|
name = fields.Char('Name', translate=True, required=True)
|
||||||
description = fields.Text('Description', translate=True)
|
description = fields.Text('Description', translate=True)
|
||||||
|
hotel_ids = fields.Many2many('hotel.property', string='Hotels', required=False,
|
||||||
|
ondelete='restrict')
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ class HotelRoomTypeClass(models.Model):
|
|||||||
category without removing it.")
|
category without removing it.")
|
||||||
sequence = fields.Integer('Sequence', default=0)
|
sequence = fields.Integer('Sequence', default=0)
|
||||||
code_class = fields.Char('Code')
|
code_class = fields.Char('Code')
|
||||||
|
hotel_ids = fields.Many2many('hotel.property', string='Hotels', required=False,
|
||||||
|
ondelete='restrict')
|
||||||
|
|
||||||
_sql_constraints = [('code_class_unique', 'unique(code_class)',
|
_sql_constraints = [('code_class_unique', 'unique(code_class)',
|
||||||
'code must be unique!')]
|
'code must be unique!')]
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ from odoo import models, fields, api
|
|||||||
class HotelRoomTypeRestriction(models.Model):
|
class HotelRoomTypeRestriction(models.Model):
|
||||||
_name = 'hotel.room.type.restriction'
|
_name = 'hotel.room.type.restriction'
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _get_default_hotel(self):
|
||||||
|
return self.env.user.hotel_id
|
||||||
|
|
||||||
name = fields.Char('Restriction Plan Name', required=True)
|
name = fields.Char('Restriction Plan Name', required=True)
|
||||||
item_ids = fields.One2many('hotel.room.type.restriction.item',
|
item_ids = fields.One2many('hotel.room.type.restriction.item',
|
||||||
'restriction_id', string='Restriction Items',
|
'restriction_id', string='Restriction Items',
|
||||||
@@ -14,6 +18,8 @@ class HotelRoomTypeRestriction(models.Model):
|
|||||||
help='If unchecked, it will allow you to hide the \
|
help='If unchecked, it will allow you to hide the \
|
||||||
restriction plan without removing it.',
|
restriction plan without removing it.',
|
||||||
default=True)
|
default=True)
|
||||||
|
hotel_id = fields.Many2one('hotel.property', default=_get_default_hotel,
|
||||||
|
required=True, ondelete='cascade')
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
@api.depends('name')
|
@api.depends('name')
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ class HotelRoomTypeRestrictionItem(models.Model):
|
|||||||
closed = fields.Boolean('Closed')
|
closed = fields.Boolean('Closed')
|
||||||
closed_departure = fields.Boolean('Closed Departure')
|
closed_departure = fields.Boolean('Closed Departure')
|
||||||
closed_arrival = fields.Boolean('Closed Arrival')
|
closed_arrival = fields.Boolean('Closed Arrival')
|
||||||
|
hotel_id = fields.Many2one('hotel.property', store=True, readonly=True,
|
||||||
|
related='restriction_id.hotel_id')
|
||||||
|
|
||||||
_sql_constraints = [('room_type_registry_unique',
|
_sql_constraints = [('room_type_registry_unique',
|
||||||
'unique(restriction_id, room_type_id, date)',
|
'unique(restriction_id, room_type_id, date)',
|
||||||
|
|||||||
@@ -132,6 +132,8 @@ class HotelService(models.Model):
|
|||||||
# Non-stored related field to allow portal user to see the image of the product he has ordered
|
# Non-stored related field to allow portal user to see the image of the product he has ordered
|
||||||
product_image = fields.Binary('Product Image', related="product_id.image", store=False, related_sudo=True)
|
product_image = fields.Binary('Product Image', related="product_id.image", store=False, related_sudo=True)
|
||||||
company_id = fields.Many2one(related='folio_id.company_id', string='Company', store=True, readonly=True)
|
company_id = fields.Many2one(related='folio_id.company_id', string='Company', store=True, readonly=True)
|
||||||
|
hotel_id = fields.Many2one('hotel.property', store=True, readonly=True,
|
||||||
|
related='folio_id.hotel_id')
|
||||||
invoice_status = fields.Selection([
|
invoice_status = fields.Selection([
|
||||||
('invoiced', 'Fully Invoiced'),
|
('invoiced', 'Fully Invoiced'),
|
||||||
('to invoice', 'To Invoice'),
|
('to invoice', 'To Invoice'),
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ class HotelServiceLine(models.Model):
|
|||||||
string='Taxes',
|
string='Taxes',
|
||||||
related="service_id.tax_ids",
|
related="service_id.tax_ids",
|
||||||
readonly="True")
|
readonly="True")
|
||||||
|
hotel_id = fields.Many2one('hotel.property', store=True, readonly=True,
|
||||||
|
related='service_id.hotel_id')
|
||||||
|
|
||||||
def _cancel_discount(self):
|
def _cancel_discount(self):
|
||||||
for record in self:
|
for record in self:
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ class HotelSharedRoom(models.Model):
|
|||||||
required=True, ondelete='restrict',
|
required=True, ondelete='restrict',
|
||||||
domain=[('shared_room', '=', True)]
|
domain=[('shared_room', '=', True)]
|
||||||
)
|
)
|
||||||
|
hotel_id = fields.Many2one('hotel.property', store=True, readonly=True,
|
||||||
|
related='room_type_id.hotel_id')
|
||||||
floor_id = fields.Many2one('hotel.floor', 'Ubication',
|
floor_id = fields.Many2one('hotel.floor', 'Ubication',
|
||||||
help='At which floor the room is located.',
|
help='At which floor the room is located.',
|
||||||
ondelete='restrict',)
|
ondelete='restrict',)
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ class AccountInvoice(models.Model):
|
|||||||
from_folio = fields.Boolean(compute='_computed_folio_origin')
|
from_folio = fields.Boolean(compute='_computed_folio_origin')
|
||||||
folio_ids = fields.Many2many(
|
folio_ids = fields.Many2many(
|
||||||
comodel_name='hotel.folio', compute='_computed_folio_origin')
|
comodel_name='hotel.folio', compute='_computed_folio_origin')
|
||||||
|
hotel_id = fields.Many2one('hotel.property')
|
||||||
outstanding_folios_debits_widget = fields.Text(compute='_get_outstanding_folios_JSON')
|
outstanding_folios_debits_widget = fields.Text(compute='_get_outstanding_folios_JSON')
|
||||||
has_folios_outstanding = fields.Boolean(compute='_get_outstanding_folios_JSON')
|
has_folios_outstanding = fields.Boolean(compute='_get_outstanding_folios_JSON')
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ class PaymentReturn(models.Model):
|
|||||||
_inherit = 'payment.return'
|
_inherit = 'payment.return'
|
||||||
|
|
||||||
folio_id = fields.Many2one('hotel.folio', string='Folio')
|
folio_id = fields.Many2one('hotel.folio', string='Folio')
|
||||||
|
hotel_id = fields.Many2one('hotel.property', store=True, readonly=True,
|
||||||
|
related='folio_id.hotel_id')
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def action_confirm(self):
|
def action_confirm(self):
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ class ProductPricelist(models.Model):
|
|||||||
cancelation_rule_id = fields.Many2one(
|
cancelation_rule_id = fields.Many2one(
|
||||||
'hotel.cancelation.rule',
|
'hotel.cancelation.rule',
|
||||||
string="Cancelation Policy")
|
string="Cancelation Policy")
|
||||||
|
hotel_ids = fields.Many2many('hotel.property', string='Hotels', required=False,
|
||||||
|
ondelete='restrict')
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
@api.depends('name')
|
@api.depends('name')
|
||||||
|
|||||||
@@ -16,3 +16,5 @@ class ProductTemplate(models.Model):
|
|||||||
is_extra_bed = fields.Boolean('Is extra bed', default=False)
|
is_extra_bed = fields.Boolean('Is extra bed', default=False)
|
||||||
show_in_calendar = fields.Boolean('Show in Calendar', default=False,
|
show_in_calendar = fields.Boolean('Show in Calendar', default=False,
|
||||||
help='Specifies if the product is shown in the calendar information.')
|
help='Specifies if the product is shown in the calendar information.')
|
||||||
|
hotel_ids = fields.Many2many('hotel.property', string='Hotels', required=False,
|
||||||
|
ondelete='restrict')
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
<form string="Board Service Line">
|
<form string="Board Service Line">
|
||||||
<group>
|
<group>
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
|
<field name="hotel_ids" widget="many2many_tags"
|
||||||
|
options="{'no_create': True,'no_open': True}"/>
|
||||||
<field name="amount"/>
|
<field name="amount"/>
|
||||||
<field name="board_service_line_ids">
|
<field name="board_service_line_ids">
|
||||||
<tree editable="bottom">
|
<tree editable="bottom">
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
<sheet>
|
<sheet>
|
||||||
<h3>
|
<h3>
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
|
<field name="hotel_ids" widget="many2many_tags"
|
||||||
|
options="{'no_create': True,'no_open': True}"/>
|
||||||
<separator />
|
<separator />
|
||||||
<label for="name" string="Max. days InTime before Checkin" />
|
<label for="name" string="Max. days InTime before Checkin" />
|
||||||
<field name="days_intime" />
|
<field name="days_intime" />
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
<group name="group_left">
|
<group name="group_left">
|
||||||
<field name="partner_id" required="True"
|
<field name="partner_id" required="True"
|
||||||
domain="[('is_company','=', False)]"/>
|
domain="[('is_company','=', False)]"/>
|
||||||
|
<field name="hotel_id" invisible="1"/>
|
||||||
<field name="enter_date"/>
|
<field name="enter_date"/>
|
||||||
<field name="exit_date"/>
|
<field name="exit_date"/>
|
||||||
<field name="arrival_hour"/>
|
<field name="arrival_hour"/>
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
<group>
|
<group>
|
||||||
<field name="name" colspan="1" />
|
<field name="name" colspan="1" />
|
||||||
<field name="sequence" select="1" />
|
<field name="sequence" select="1" />
|
||||||
|
<field name="hotel_ids" widget="many2many_tags"
|
||||||
|
options="{'no_create': True,'no_open': True}"/>
|
||||||
</group>
|
</group>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="pricelist_id" />
|
<field name="pricelist_id" />
|
||||||
<field name="company_id" />
|
<field name="hotel_id" invisible="1"/>
|
||||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
||||||
<field name="reservation_type" attrs="{'readonly':[('state','not in',('draft'))]}"/>
|
<field name="reservation_type" attrs="{'readonly':[('state','not in',('draft'))]}"/>
|
||||||
<field name="channel_type" attrs="{'required':[('reservation_type','=','normal')]}"/>
|
<field name="channel_type" attrs="{'required':[('reservation_type','=','normal')]}"/>
|
||||||
|
|||||||
@@ -236,6 +236,7 @@
|
|||||||
</group>
|
</group>
|
||||||
<group invisible="1">
|
<group invisible="1">
|
||||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
||||||
|
<field name="hotel_id" invisible="1"/>
|
||||||
<!-- <field name="check_rooms" invisible="1"/> -->
|
<!-- <field name="check_rooms" invisible="1"/> -->
|
||||||
<field name="checkin_partner_pending_count" invisible="1"/>
|
<field name="checkin_partner_pending_count" invisible="1"/>
|
||||||
<!-- <field name="product_uom" string="Rent(UOM)" invisible="1" /> -->
|
<!-- <field name="product_uom" string="Rent(UOM)" invisible="1" /> -->
|
||||||
@@ -254,6 +255,8 @@
|
|||||||
<tree string="Services" editable="bottom"
|
<tree string="Services" editable="bottom"
|
||||||
decoration-success="is_board_service == True">
|
decoration-success="is_board_service == True">
|
||||||
<field name="is_board_service" invisible="1" />
|
<field name="is_board_service" invisible="1" />
|
||||||
|
<field name="company_id" invisible="0"/>
|
||||||
|
<field name="hotel_id" invisible="0"/>
|
||||||
<button type="object" class="oe_stat_button"
|
<button type="object" class="oe_stat_button"
|
||||||
icon="fa fa-1x fa-bed"
|
icon="fa fa-1x fa-bed"
|
||||||
name="open_service_lines"
|
name="open_service_lines"
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
<sheet>
|
<sheet>
|
||||||
<group>
|
<group>
|
||||||
<field name="name" string="Amenity Type" />
|
<field name="name" string="Amenity Type" />
|
||||||
|
<field name="hotel_ids" widget="many2many_tags"
|
||||||
|
options="{'no_create': True,'no_open': True}"/>
|
||||||
<!-- <field name="parent_id" domain="[('isamenitytype','=',True)]" /> -->
|
<!-- <field name="parent_id" domain="[('isamenitytype','=',True)]" /> -->
|
||||||
<!-- <field name="isamenitytype" invisible="1" /> -->
|
<!-- <field name="isamenitytype" invisible="1" /> -->
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
<notebook>
|
<notebook>
|
||||||
<page string="Information">
|
<page string="Information">
|
||||||
<group colspan="4" col="4">
|
<group colspan="4" col="4">
|
||||||
|
<field name="hotel_ids" widget="many2many_tags"
|
||||||
|
options="{'no_create': True,'no_open': True}"/>
|
||||||
<field name="room_amenity_type_id" select="2" string="Amenity Type" />
|
<field name="room_amenity_type_id" select="2" string="Amenity Type" />
|
||||||
<!-- <field name="categ_id" select="1"
|
<!-- <field name="categ_id" select="1"
|
||||||
domain="[('isamenitytype','=',True)]" /> -->
|
domain="[('isamenitytype','=',True)]" /> -->
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
<sheet>
|
<sheet>
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
<field name="description" />
|
<field name="description" />
|
||||||
|
<field name="hotel_ids" widget="many2many_tags"
|
||||||
|
options="{'no_create': True,'no_open': True}"/>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<group colspan="4">
|
<group colspan="4">
|
||||||
<group>
|
<group>
|
||||||
|
<field name="hotel_ids" widget="many2many_tags"
|
||||||
|
options="{'no_create': True,'no_open': True}"/>
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
<field name="code_class" />
|
<field name="code_class" />
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
@@ -15,12 +15,15 @@
|
|||||||
options='{"terminology": "archive"}'/>
|
options='{"terminology": "archive"}'/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<label for="name" string="Name" />
|
<label for="name" string="Name" />
|
||||||
<h1>
|
<h1>
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
<group>
|
||||||
|
<field name="hotel_id" invisible="1"/>
|
||||||
|
</group>
|
||||||
<div>
|
<div>
|
||||||
<separator string="Pricelist Items"/>
|
<separator string="Pricelist Items"/>
|
||||||
<field name="item_ids" nolabel="1">
|
<field name="item_ids" nolabel="1">
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
<field name="class_id" />
|
<field name="class_id" />
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
|
<field name="hotel_id" invisible="1"/>
|
||||||
<field name="list_price" widget='monetary' options="{'currency_field': 'currency_id', 'field_digits': True}"/>
|
<field name="list_price" widget='monetary' options="{'currency_field': 'currency_id', 'field_digits': True}"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
<notebook>
|
<notebook>
|
||||||
<page name="information_hotel_room" string="Information">
|
<page name="information_hotel_room" string="Information">
|
||||||
<group colspan="4" col="4">
|
<group colspan="4" col="4">
|
||||||
|
<field name="hotel_id" invisible="1"/>
|
||||||
<field name="floor_id" string="Ubication"
|
<field name="floor_id" string="Ubication"
|
||||||
attrs="{'readonly':[('shared_room_id','!=', False)]}" />
|
attrs="{'readonly':[('shared_room_id','!=', False)]}" />
|
||||||
<!-- <field name="categ_id" select="1" domain="[('isroomtype','=',True)]" string="Room Type" /> -->
|
<!-- <field name="categ_id" select="1" domain="[('isroomtype','=',True)]" string="Room Type" /> -->
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
<field name="day_qty"/>
|
<field name="day_qty"/>
|
||||||
<field name="date" />
|
<field name="date" />
|
||||||
<field name="price_unit" />
|
<field name="price_unit" />
|
||||||
|
<field name="hotel_id" invisible="1"/>
|
||||||
</group>
|
</group>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
@@ -28,6 +29,7 @@
|
|||||||
<field name="product_id" />
|
<field name="product_id" />
|
||||||
<field name="day_qty"/>
|
<field name="day_qty"/>
|
||||||
<field name="date" />
|
<field name="date" />
|
||||||
|
<field name="hotel_id" invisible="1"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<odoo>
|
|
||||||
|
|
||||||
<!--======================= Hotel Service Type =========================== -->
|
|
||||||
<!-- Form view of hotel service type -->
|
|
||||||
<record model="ir.ui.view" id="hotel_service_type_view_form">
|
|
||||||
<field name="name">hotel.service_type.form</field>
|
|
||||||
<field name="model">hotel.service.type</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<form string="Service Type">
|
|
||||||
<sheet>
|
|
||||||
<group>
|
|
||||||
<field name="name" select="1" string="Service Name" />
|
|
||||||
<!-- <field name="parent_id" domain="[('isservicetype','=',True)]"
|
|
||||||
select="1" /> -->
|
|
||||||
<!-- <field name="isservicetype" invisible="1" /> -->
|
|
||||||
</group>
|
|
||||||
</sheet>
|
|
||||||
</form>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- Tree view of hotel service type -->
|
|
||||||
<record model="ir.ui.view" id="hotel_service_type_view_tree">
|
|
||||||
<field name="name">hotel.service_type.tree</field>
|
|
||||||
<field name="model">hotel.service.type</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<tree string="Service Type">
|
|
||||||
<field name="name" />
|
|
||||||
</tree>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- Action for hotel service type -->
|
|
||||||
<record model="ir.actions.act_window" id="open_hotel_service_type_form_tree">
|
|
||||||
<field name="name">Service Type</field>
|
|
||||||
<field name="res_model">hotel.service.type</field>
|
|
||||||
<!-- <field name="context">{'default_isservicetype':1}</field> -->
|
|
||||||
<field name="view_type">form</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
</record>
|
|
||||||
<menuitem id="menu_hotel_service" name="Services"
|
|
||||||
parent="hotel.hotel_configuration_menu" sequence="2" />
|
|
||||||
<menuitem name="Service Types" id="menu_open_hotel_service_type_form_tree"
|
|
||||||
action="open_hotel_service_type_form_tree" sequence="9"
|
|
||||||
parent="hotel.menu_hotel_service" />
|
|
||||||
|
|
||||||
</odoo>
|
|
||||||
@@ -14,6 +14,8 @@
|
|||||||
<field name="per_day" invisible="1"/>
|
<field name="per_day" invisible="1"/>
|
||||||
<field name="is_board_service" invisible="1" />
|
<field name="is_board_service" invisible="1" />
|
||||||
<field name="folio_id" invisible="1"/>
|
<field name="folio_id" invisible="1"/>
|
||||||
|
<field name="company_id" invisible="1"/>
|
||||||
|
<field name="hotel_id" invisible="1"/>
|
||||||
<field name="product_id"
|
<field name="product_id"
|
||||||
domain="[('sale_ok', '=', True)]"
|
domain="[('sale_ok', '=', True)]"
|
||||||
options="{'create': False, 'create_edit': False}"
|
options="{'create': False, 'create_edit': False}"
|
||||||
@@ -58,6 +60,8 @@
|
|||||||
attrs="{'invisible':[('is_board_service','=', False)]}" />
|
attrs="{'invisible':[('is_board_service','=', False)]}" />
|
||||||
<field name="per_day" invisible="1" readonly="1"/>
|
<field name="per_day" invisible="1" readonly="1"/>
|
||||||
<field name="folio_id" invisible="1"/>
|
<field name="folio_id" invisible="1"/>
|
||||||
|
<field name="company_id" invisible="1"/>
|
||||||
|
<field name="hotel_id" invisible="1"/>
|
||||||
<field name="ser_room_line"
|
<field name="ser_room_line"
|
||||||
attrs = "{'required': [('per_day','=',True)]}" />
|
attrs = "{'required': [('per_day','=',True)]}" />
|
||||||
<field name="product_id"
|
<field name="product_id"
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
<xpath expr="//field[@name='date_invoice']" position="after">
|
<xpath expr="//field[@name='date_invoice']" position="after">
|
||||||
<field name="folio_ids" widget="many2many_tags"/>
|
<field name="folio_ids" widget="many2many_tags"/>
|
||||||
<field name="from_folio" invisible="1" />
|
<field name="from_folio" invisible="1" />
|
||||||
|
<field name="hotel_id" invisible="1"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//button[@name='%(account.action_account_invoice_payment)d']" position="attributes">
|
<xpath expr="//button[@name='%(account.action_account_invoice_payment)d']" position="attributes">
|
||||||
<attribute name="attrs">{'invisible': ['|',('from_folio','=',True)]}</attribute>
|
<attribute name="attrs">{'invisible': ['|',('from_folio','=',True)]}</attribute>
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
|
|
||||||
<xpath expr="//field[@name='country_group_ids']" position="before">
|
<xpath expr="//field[@name='country_group_ids']" position="before">
|
||||||
|
<field name="hotel_ids" widget="many2many_tags"
|
||||||
|
options="{'no_create': True,'no_open': True}"/>
|
||||||
<field name="pricelist_type" />
|
<field name="pricelist_type" />
|
||||||
<field name="cancelation_rule_id" />
|
<field name="cancelation_rule_id" />
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
<page string="Hotel Service">
|
<page string="Hotel Service">
|
||||||
<group colspan="4">
|
<group colspan="4">
|
||||||
<group>
|
<group>
|
||||||
|
<field name="hotel_ids" widget="many2many_tags"
|
||||||
|
options="{'no_create': True,'no_open': True}"/>
|
||||||
<field name="is_extra_bed" />
|
<field name="is_extra_bed" />
|
||||||
<field name="daily_limit" />
|
<field name="daily_limit" />
|
||||||
<field name="show_in_calendar" />
|
<field name="show_in_calendar" />
|
||||||
|
|||||||
Reference in New Issue
Block a user