mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[UPD] Use show_in_calendar as flag for showing services in calendar
This commit is contained in:
@@ -193,7 +193,7 @@
|
||||
<field name="per_person">False</field>
|
||||
<field name="daily_limit">1</field>
|
||||
<field name="is_extra_bed">True</field>
|
||||
<field name="is_popoverable">True</field>
|
||||
<field name="show_in_calendar">True</field>
|
||||
</record>
|
||||
|
||||
<record id="hotel_service_3" model="product.product">
|
||||
@@ -206,7 +206,7 @@
|
||||
</record>
|
||||
|
||||
<record id="hotel_service_4" model="product.product">
|
||||
<field name="name">Menú A</field>
|
||||
<field name="name">Lunch</field>
|
||||
<field name="list_price">15.0</field>
|
||||
<field name="type">service</field>
|
||||
<field name="purchase_ok">False</field>
|
||||
@@ -215,7 +215,7 @@
|
||||
</record>
|
||||
|
||||
<record id="hotel_service_5" model="product.product">
|
||||
<field name="name">Menú B</field>
|
||||
<field name="name">Dinner</field>
|
||||
<field name="list_price">20.0</field>
|
||||
<field name="type">service</field>
|
||||
<field name="purchase_ok">False</field>
|
||||
@@ -224,8 +224,8 @@
|
||||
</record>
|
||||
|
||||
<record id="hotel_service_6" model="product.product">
|
||||
<field name="name">Menú C</field>
|
||||
<field name="list_price">25.0</field>
|
||||
<field name="name">Free Bar</field>
|
||||
<field name="list_price">40.0</field>
|
||||
<field name="type">service</field>
|
||||
<field name="purchase_ok">False</field>
|
||||
<field name="per_day">True</field>
|
||||
@@ -249,7 +249,7 @@
|
||||
eval="[(5, 0), (0, 0, {
|
||||
'product_id': ref('hotel_service_0'),
|
||||
'amount': 3}),
|
||||
(0, 0, {'product_id': ref('hotel_service_4'),
|
||||
(0, 0, {'product_id': ref('hotel_service_5'),
|
||||
'amount': 8})
|
||||
]"/>
|
||||
<field name="price_type">fixed</field>
|
||||
@@ -271,7 +271,7 @@
|
||||
|
||||
<!-- hotel.board.service.room.type -->
|
||||
|
||||
<!--Room 0 Economic-->
|
||||
<!--Room 0 Economic-->
|
||||
|
||||
<record id="hotel_board_service_room_0"
|
||||
model="hotel.board.service.room.type">
|
||||
|
||||
@@ -11,5 +11,5 @@ class ProductTemplate(models.Model):
|
||||
per_person = fields.Boolean('Unit increment per person')
|
||||
daily_limit = fields.Integer('Daily limit')
|
||||
is_extra_bed = fields.Boolean('Is extra bed', default=False)
|
||||
is_popoverable = fields.Boolean('Show in Popover', default=False,
|
||||
help='Specifies if the product is shown in the popover information.')
|
||||
show_in_calendar = fields.Boolean('Show in Calendar', default=False,
|
||||
help='Specifies if the product is shown in the calendar information.')
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<group>
|
||||
<field name="is_extra_bed" />
|
||||
<field name="daily_limit" />
|
||||
<field name="is_popoverable" />
|
||||
<field name="show_in_calendar" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="per_day" />
|
||||
|
||||
@@ -197,7 +197,7 @@ class HotelReservation(models.Model):
|
||||
|
||||
pt.name as room_type,
|
||||
|
||||
array_agg(pt2.name) FILTER (WHERE pt2.is_popoverable = TRUE) as services,
|
||||
array_agg(pt2.name) FILTER (WHERE pt2.show_in_calendar = TRUE) as services,
|
||||
|
||||
rcr.name as closure_reason,
|
||||
|
||||
@@ -426,7 +426,7 @@ class HotelReservation(models.Model):
|
||||
'channel_type': self.channel_type,
|
||||
'board_service_name': self.board_service_room_id.hotel_board_service_id.name,
|
||||
'services': [service.product_id.name for service in self.service_ids
|
||||
if service.product_id.is_popoverable] or False,
|
||||
if service.product_id.show_in_calendar] or False,
|
||||
}
|
||||
|
||||
@api.multi
|
||||
|
||||
Reference in New Issue
Block a user