mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP]pms: unique board_service_room_type by property
This commit is contained in:
@@ -353,7 +353,12 @@ class AvailabilityWizard(models.TransientModel):
|
||||
string="Board Service",
|
||||
help="Board Service included in the room",
|
||||
comodel_name="pms.board.service.room.type",
|
||||
domain="[('pms_room_type_id','=',room_type_id)]",
|
||||
domain="""
|
||||
[
|
||||
('pms_room_type_id','=',room_type_id),
|
||||
('pms_property_id','=',pms_property_id)
|
||||
]
|
||||
""",
|
||||
check_pms_properties=True,
|
||||
)
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@
|
||||
decoration-primary="value_num_rooms_selected > 0"
|
||||
decoration-bf="value_num_rooms_selected > 0"
|
||||
>
|
||||
<field name="pms_property_id" invisible="1" />
|
||||
<field
|
||||
name="room_type_id"
|
||||
readonly="1"
|
||||
|
||||
@@ -386,8 +386,7 @@ class WizardFolioChanges(models.TransientModel):
|
||||
lambda x: x.pms_board_service_id.id == new_board_service_id
|
||||
and (
|
||||
reservation.folio_id.pms_property_id.id
|
||||
in x.pms_property_ids.ids
|
||||
or not x.pms_property_ids
|
||||
== x.pms_property_id.ids
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user