mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP]pms_api_rest: added firstCheckin and createDate fields in folio info datamodel
This commit is contained in:
@@ -24,7 +24,9 @@ class PmsFolioInfo(Datamodel):
|
|||||||
amountTotal = fields.Float(required=False, allow_none=True)
|
amountTotal = fields.Float(required=False, allow_none=True)
|
||||||
reservationType = fields.String(required=False, allow_none=True)
|
reservationType = fields.String(required=False, allow_none=True)
|
||||||
pendingAmount = fields.Float(required=False, allow_none=True)
|
pendingAmount = fields.Float(required=False, allow_none=True)
|
||||||
|
firstCheckin = fields.String(required=False, allow_none=True)
|
||||||
lastCheckout = fields.String(required=False, allow_none=True)
|
lastCheckout = fields.String(required=False, allow_none=True)
|
||||||
|
createDate = fields.String(required=False, allow_none=True)
|
||||||
pmsPropertyId = fields.Integer(required=False, allow_none=True)
|
pmsPropertyId = fields.Integer(required=False, allow_none=True)
|
||||||
partnerId = fields.Integer(required=False, allow_none=True)
|
partnerId = fields.Integer(required=False, allow_none=True)
|
||||||
reservations = fields.List(
|
reservations = fields.List(
|
||||||
|
|||||||
@@ -57,7 +57,9 @@ class PmsFolioService(Component):
|
|||||||
amountTotal=round(folio.amount_total, 2),
|
amountTotal=round(folio.amount_total, 2),
|
||||||
reservationType=folio.reservation_type,
|
reservationType=folio.reservation_type,
|
||||||
pendingAmount=folio.pending_amount,
|
pendingAmount=folio.pending_amount,
|
||||||
|
firstCheckin=str(folio.first_checkin),
|
||||||
lastCheckout=str(folio.last_checkout),
|
lastCheckout=str(folio.last_checkout),
|
||||||
|
createDate=folio.create_date.isoformat(),
|
||||||
internalComment=folio.internal_comment
|
internalComment=folio.internal_comment
|
||||||
if folio.internal_comment
|
if folio.internal_comment
|
||||||
else None,
|
else None,
|
||||||
|
|||||||
Reference in New Issue
Block a user