mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP] pms_api_rest: add language in folio services
This commit is contained in:
committed by
Darío Lodeiros
parent
37bc10bed8
commit
f882a02390
@@ -44,6 +44,7 @@ class PmsFolioInfo(Datamodel):
|
||||
confirmReservations = fields.Boolean(required=False, allow_none=True)
|
||||
invoiceStatus = fields.String(required=False, allow_none=True)
|
||||
portalUrl = fields.String(required=False, allow_none=True)
|
||||
language = fields.String(required=False, allow_none=True)
|
||||
|
||||
|
||||
class PmsFolioShortInfo(Datamodel):
|
||||
|
||||
@@ -72,6 +72,7 @@ class PmsFolioService(Component):
|
||||
if folio.out_service_description
|
||||
else None,
|
||||
portalUrl=portal_url,
|
||||
language=folio.lang if folio.lang else None,
|
||||
)
|
||||
else:
|
||||
raise MissingError(_("Folio not found"))
|
||||
@@ -465,6 +466,7 @@ class PmsFolioService(Component):
|
||||
"out_service_description": pms_folio_info.outOfServiceDescription
|
||||
if pms_folio_info.outOfServiceDescription
|
||||
else None,
|
||||
"lang": pms_folio_info.language,
|
||||
}
|
||||
else:
|
||||
vals = {
|
||||
@@ -475,6 +477,7 @@ class PmsFolioService(Component):
|
||||
else False,
|
||||
"reservation_type": pms_folio_info.reservationType,
|
||||
"internal_comment": pms_folio_info.internalComment,
|
||||
"lang": pms_folio_info.language,
|
||||
}
|
||||
if pms_folio_info.partnerId:
|
||||
vals.update(
|
||||
|
||||
Reference in New Issue
Block a user