mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[TMP]: add amenity code in room short name
This commit is contained in:
@@ -77,14 +77,20 @@ class PmsRoomService(Component):
|
|||||||
)
|
)
|
||||||
.sorted("sequence")
|
.sorted("sequence")
|
||||||
):
|
):
|
||||||
|
# TODO: avoid, change short_name,
|
||||||
|
# set code amenities like a tag in room calendar name?
|
||||||
|
short_name = room.short_name
|
||||||
|
if room.room_amenity_ids:
|
||||||
|
for amenity in room.room_amenity_ids:
|
||||||
|
if amenity.is_add_code_room_name:
|
||||||
|
short_name += "%s" % amenity.default_code
|
||||||
result_rooms.append(
|
result_rooms.append(
|
||||||
PmsRoomInfo(
|
PmsRoomInfo(
|
||||||
id=room.id,
|
id=room.id,
|
||||||
name=room.name,
|
name=room.display_name,
|
||||||
roomTypeId=room.room_type_id,
|
roomTypeId=room.room_type_id,
|
||||||
capacity=room.capacity,
|
capacity=room.capacity,
|
||||||
shortName=room.short_name,
|
shortName=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,
|
extraBedsAllowed=room.extra_beds_allowed,
|
||||||
|
|||||||
Reference in New Issue
Block a user