mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP] pms_api_rest: add agency image in folio service and it's reservations
This commit is contained in:
committed by
Darío Lodeiros
parent
f776c9dc89
commit
e8095e0471
@@ -26,3 +26,4 @@ class PmsFolioInfo(Datamodel):
|
||||
salesPerson = fields.String(required=False, allow_none=True)
|
||||
paymentState = fields.String(required=False, allow_none=True)
|
||||
propertyId = fields.Integer(required=False, allow_none=True)
|
||||
agencyImage = fields.String(required=False, allow_none=True)
|
||||
|
||||
@@ -80,6 +80,15 @@ class PmsFolioService(Component):
|
||||
"folioId": reservation.folio_id.id
|
||||
if reservation.folio_id
|
||||
else "",
|
||||
"saleChannel": reservation.channel_type_id.name
|
||||
if reservation.channel_type_id
|
||||
else "",
|
||||
"agency": reservation.agency_id.name
|
||||
if reservation.agency_id
|
||||
else "",
|
||||
"agencyImage": reservation.agency_id.image_1024.decode("utf-8")
|
||||
if reservation.agency_id
|
||||
else "",
|
||||
}
|
||||
)
|
||||
result_folios.append(
|
||||
@@ -107,6 +116,7 @@ class PmsFolioService(Component):
|
||||
if folio.payment_state
|
||||
else "",
|
||||
propertyId=folio.pms_property_id,
|
||||
agencyImage=folio.agency_id.image_1024 if folio.agency_id else "",
|
||||
)
|
||||
)
|
||||
return result_folios
|
||||
|
||||
Reference in New Issue
Block a user