mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX] pms-pwa: add amenity in room name as a field in calendar service
This commit is contained in:
committed by
Darío Lodeiros
parent
913391f592
commit
8a819cb675
@@ -24,3 +24,4 @@ class PmsRoomInfo(Datamodel):
|
||||
ubicationId = fields.Integer(required=False, allow_none=True)
|
||||
extraBedsAllowed = fields.Integer(required=False, allow_none=True)
|
||||
roomAmenityIds = fields.List(fields.Integer(), required=False, allow_none=True)
|
||||
roomAmenityInName = fields.String(required=False, allow_none=True)
|
||||
|
||||
@@ -97,6 +97,8 @@ class PmsRoomService(Component):
|
||||
roomAmenityIds=room.room_amenity_ids.ids
|
||||
if room.room_amenity_ids
|
||||
else None,
|
||||
roomAmenityInName=room.room_amenity_ids.filtered(lambda x: x.is_add_code_room_name).name if
|
||||
room.room_amenity_ids.filtered(lambda x: x.is_add_code_room_name).name else ''
|
||||
)
|
||||
)
|
||||
return result_rooms
|
||||
|
||||
Reference in New Issue
Block a user