[IMP]pms_api_rest: unique board_service_room_type by property

This commit is contained in:
Darío Lodeiros
2022-12-07 11:31:27 +01:00
parent f88871aa99
commit c2b68ac115
2 changed files with 4 additions and 15 deletions

View File

@@ -36,13 +36,7 @@ class PmsBoardServiceService(Component):
if board_services_search_param.pmsPropertyId:
domain.extend(
[
"|",
(
"pms_property_ids",
"in",
board_services_search_param.pmsPropertyId,
),
("pms_property_ids", "=", False),
("pms_property_id", "=", board_services_search_param.pmsPropertyId),
]
)
@@ -107,13 +101,7 @@ class PmsBoardServiceService(Component):
if pms_search_param.pmsPropertyId:
domain.extend(
[
"|",
(
"pms_property_ids",
"in",
pms_search_param.pmsPropertyId,
),
("pms_property_ids", "=", False),
("pms_property_id", "=", pms_search_param.pmsPropertyId),
]
)
result_board_service_lines = []

View File

@@ -151,7 +151,8 @@ class PmsAgencyService(Component):
pms_property_id=pms_property_id,
pricelist_id=pricelist_id,
partner_id=partner_id,
product_qty=product_qty,
product_qty=product_qty or 1,
date_consumption=date_consumption,
board_service_id=board_service.id,
)
return price