[IMP]pms_api_rest: added defaultCode field in room type class datamodel

This commit is contained in:
braisab
2023-05-10 09:32:19 +02:00
committed by Darío Lodeiros
parent 8be8614044
commit 6a94e1b849
2 changed files with 2 additions and 0 deletions

View File

@@ -13,4 +13,5 @@ class PmsRoomTypeClassInfo(Datamodel):
_name = "pms.room.type.class.info"
id = fields.Integer(required=False, allow_none=True)
name = fields.String(required=False, allow_none=True)
defaultCode = fields.String(required=False, allow_none=True)
pmsPropertyIds = fields.List(fields.Integer(), required=False)

View File

@@ -49,6 +49,7 @@ class PmsRoomTypeClassService(Component):
PmsRoomTypeClassInfo(
id=room.id,
name=room.name,
defaultCode=room.default_code if room.default_code else None,
pmsPropertyIds=room.pms_property_ids.mapped("id"),
)
)