mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP] pms_api_rest: add room extra beds allowed
This commit is contained in:
@@ -19,3 +19,4 @@ class PmsRoomInfo(Datamodel):
|
|||||||
shortName = fields.String(required=False, allow_none=True)
|
shortName = fields.String(required=False, allow_none=True)
|
||||||
roomTypeClassId = fields.Integer(required=False, allow_none=True)
|
roomTypeClassId = fields.Integer(required=False, allow_none=True)
|
||||||
ubicationId = fields.Integer(required=False, allow_none=True)
|
ubicationId = fields.Integer(required=False, allow_none=True)
|
||||||
|
extraBedsAllowed = fields.Integer(required=False, allow_none=True)
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ class PmsRoomService(Component):
|
|||||||
shortName=room.short_name,
|
shortName=room.short_name,
|
||||||
roomTypeClassId=room.room_type_id.class_id,
|
roomTypeClassId=room.room_type_id.class_id,
|
||||||
ubicationId=room.ubication_id,
|
ubicationId=room.ubication_id,
|
||||||
|
extraBedsAllowed=room.extra_beds_allowed,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return result_rooms
|
return result_rooms
|
||||||
@@ -79,6 +80,7 @@ class PmsRoomService(Component):
|
|||||||
roomTypeId=room.room_type_id,
|
roomTypeId=room.room_type_id,
|
||||||
capacity=room.capacity,
|
capacity=room.capacity,
|
||||||
shortName=room.short_name,
|
shortName=room.short_name,
|
||||||
|
extraBedsAllowed=room.extra_beds_allowed,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
raise MissingError(_("Room not found"))
|
raise MissingError(_("Room not found"))
|
||||||
|
|||||||
Reference in New Issue
Block a user