mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX] pms-api-rest: room type class & adults if none @ services
This commit is contained in:
committed by
Darío Lodeiros
parent
68579dbd94
commit
f7121bd604
@@ -15,4 +15,5 @@ class PmsRoomTypeInfo(Datamodel):
|
||||
name = fields.String(required=False, allow_none=True)
|
||||
pmsPropertyIds = fields.List(fields.Integer(), required=False)
|
||||
defaultCode = fields.String(required=False, allow_none=True)
|
||||
classId = fields.Integer(required=False, allow_none=True)
|
||||
price = fields.Float(required=False, allow_none=True)
|
||||
|
||||
@@ -68,7 +68,7 @@ class PmsReservationService(Component):
|
||||
if reservation.channel_type_id
|
||||
else None,
|
||||
agencyId=reservation.agency_id.id if reservation.agency_id else None,
|
||||
userId=reservation.user_id.id,
|
||||
userId=reservation.user_id.id if reservation.user_id else None,
|
||||
checkin=datetime.combine(
|
||||
reservation.checkin, datetime.min.time()
|
||||
).isoformat(),
|
||||
|
||||
@@ -60,6 +60,7 @@ class PmsRoomTypeService(Component):
|
||||
pmsPropertyIds=room.pms_property_ids.mapped("id"),
|
||||
defaultCode=room.default_code,
|
||||
price=round(room.list_price, 2),
|
||||
classId=room.class_id,
|
||||
)
|
||||
)
|
||||
return result_rooms
|
||||
|
||||
Reference in New Issue
Block a user