mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX] pms-api-rest: fix filter by property (filter param in pms_property_ids or pms_property_ids = false ) @ cancelation rules service
This commit is contained in:
committed by
Darío Lodeiros
parent
cfaf41a225
commit
800910b47a
@@ -30,17 +30,20 @@ class PmsCancelationRuleService(Component):
|
||||
|
||||
if cancelation_rule_search_param.pricelistId:
|
||||
domain.append(
|
||||
("pricelist_ids", "in", cancelation_rule_search_param.pricelistId)
|
||||
("pricelist_ids", "in", [cancelation_rule_search_param.pricelistId])
|
||||
)
|
||||
if cancelation_rule_search_param.pmsPropertyId:
|
||||
domain.append(
|
||||
(
|
||||
"pms_property_ids",
|
||||
"in",
|
||||
[cancelation_rule_search_param.pmsPropertyId],
|
||||
domain.extend(
|
||||
[
|
||||
'|',
|
||||
(
|
||||
"pms_property_ids",
|
||||
"in",
|
||||
[cancelation_rule_search_param.pmsPropertyId],
|
||||
),
|
||||
("pms_property_ids", "=", False),
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
result_cancelation_rules = []
|
||||
PmsCancelationRuleInfo = self.env.datamodels["pms.cancelation.rule.info"]
|
||||
for cancelation_rule in self.env["pms.cancelation.rule"].search(
|
||||
|
||||
Reference in New Issue
Block a user