mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP]pms-api-rest: added isReselling field to reservation datamodel
This commit is contained in:
@@ -90,6 +90,7 @@ class PmsReservationInfo(Datamodel):
|
||||
)
|
||||
partnerRequests = fields.String(required=False, allow_none=True)
|
||||
nights = fields.Integer(required=False, allow_none=True)
|
||||
isReselling = fields.Boolean(required=False, allow_none=True)
|
||||
|
||||
# TODO: Refact
|
||||
# messages = fields.List(fields.Dict(required=False, allow_none=True))
|
||||
|
||||
@@ -235,6 +235,7 @@ class PmsFolioService(Component):
|
||||
if reservation.service_ids
|
||||
else 0,
|
||||
"overbooking": reservation.overbooking,
|
||||
"isReselling": any(line.is_reselling for line in reservation.reservation_line_ids),
|
||||
}
|
||||
)
|
||||
result_folios.append(
|
||||
|
||||
@@ -127,6 +127,7 @@ class PmsReservationService(Component):
|
||||
numServices=len(reservation.service_ids)
|
||||
if reservation.service_ids
|
||||
else 0,
|
||||
isReselling=any(line.is_reselling for line in reservation.reservation_line_ids),
|
||||
)
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user