diff --git a/pms_api_rest/datamodels/pms_room.py b/pms_api_rest/datamodels/pms_room.py index 15f3bc378..66903df39 100644 --- a/pms_api_rest/datamodels/pms_room.py +++ b/pms_api_rest/datamodels/pms_room.py @@ -17,3 +17,4 @@ class PmsRoomInfo(Datamodel): roomTypeId = fields.Integer(required=False, allow_none=True) capacity = fields.Integer(required=False, allow_none=True) shortName = fields.String(required=False, allow_none=True) + roomTypeClassId = fields.Integer(required=False, allow_none=True) diff --git a/pms_api_rest/services/pms_room_service.py b/pms_api_rest/services/pms_room_service.py index 00d427798..6a7c094ed 100644 --- a/pms_api_rest/services/pms_room_service.py +++ b/pms_api_rest/services/pms_room_service.py @@ -51,6 +51,7 @@ class PmsRoomService(Component): roomTypeId=room.room_type_id, capacity=room.capacity, shortName=room.short_name, + roomTypeClassId=room.room_type_id.class_id, ) ) return result_rooms diff --git a/pms_api_rest/services/pms_ubication_service.py b/pms_api_rest/services/pms_ubication_service.py index 3f23e0958..1f03bd5bc 100644 --- a/pms_api_rest/services/pms_ubication_service.py +++ b/pms_api_rest/services/pms_ubication_service.py @@ -29,18 +29,16 @@ class PmsUbicationService(Component): if ubication_search_param.pms_property_ids: ubication = set() for index, prop in enumerate(ubication_search_param.pms_property_ids): - ubication_with_query_property = self.env[ - "pms.ubication" - ].search([("pms_property_ids", "=", prop)]) + ubication_with_query_property = self.env["pms.ubication"].search( + [("pms_property_ids", "=", prop)] + ) if index == 0: ubication = set(ubication_with_query_property.ids) else: ubication = ubication.intersection( set(ubication_with_query_property.ids) ) - ubication_total = list( - set(list(ubication) + ubication_all_properties.ids) - ) + ubication_total = list(set(list(ubication) + ubication_all_properties.ids)) else: ubication_total = list(ubication_all_properties.ids) domain = [