[ADD] Button service on day

This commit is contained in:
Dario Lodeiros
2019-04-27 18:05:30 +02:00
parent 1d26d30365
commit 263d1703b8
3 changed files with 6 additions and 0 deletions

View File

@@ -27,6 +27,7 @@
'wizard/massive_changes.xml',
'wizard/split_reservation.xml',
'wizard/duplicate_reservation.xml',
'wizard/service_on_day.xml',
'views/res_config.xml',
'data/menus.xml',
'views/inherited_account_payment_views.xml',

View File

@@ -34,6 +34,9 @@ class HotelServiceLine(models.Model):
@api.depends('day_qty', 'service_id.price_total')
def _compute_price_total(self):
"""
Used to reports
"""
for record in self:
record.price_total = (record.service_id.price_total * record.day_qty) / record.service_id.product_qty

View File

@@ -244,6 +244,8 @@
<page name="services" string="Services"
attrs="{'invisible': ['|',('reservation_type','in',('out')),
('parent_reservation','!=',False)]}">
<button name="%(action_service_on_day)d" string="Service on Day"
type="action" icon="fa-coffee"/>
<group string="Reservation Services" name="reservation_services">
<field name="service_ids"
context="{'default_ser_room_line': active_id, 'default_folio_id': folio_id, 'form_view_ref':'hotel.hotel_service_view_form'}"