mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP] pms_api_rest: add default_pricelist in property and fix result in pricelist_service
This commit is contained in:
committed by
Darío Lodeiros
parent
276470017c
commit
bab106d5d5
@@ -15,3 +15,4 @@ class PmsPropertyInfo(Datamodel):
|
||||
id = fields.Integer(required=False, allow_none=True)
|
||||
name = fields.String(required=False, allow_none=True)
|
||||
company = fields.String(required=False, allow_none=True)
|
||||
defaultPricelistId = fields.Integer(required=False, allow_none=True)
|
||||
|
||||
@@ -151,7 +151,7 @@ class PmsPricelistService(Component):
|
||||
if rule:
|
||||
|
||||
pricelist_info.availability_rule_id = rule.id
|
||||
pricelist_info.min_stay = 8
|
||||
pricelist_info.min_stay = rule.min_stay
|
||||
pricelist_info.min_stay_arrival = rule.min_stay_arrival
|
||||
pricelist_info.max_stay = rule.max_stay
|
||||
pricelist_info.max_stay_arrival = rule.max_stay_arrival
|
||||
|
||||
@@ -33,6 +33,7 @@ class PmsPropertyService(Component):
|
||||
id=prop.id,
|
||||
name=prop.name,
|
||||
company=prop.company_id.name,
|
||||
defaultPricelistId=prop.default_pricelist_id.id,
|
||||
)
|
||||
)
|
||||
return result_properties
|
||||
@@ -60,6 +61,7 @@ class PmsPropertyService(Component):
|
||||
id=pms_property.id,
|
||||
name=pms_property.name,
|
||||
company=pms_property.company_id.name,
|
||||
defaultPricelistId=pms_property.default_pricelist_id.id,
|
||||
)
|
||||
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user