[REF]pms: Change related reservation_type to compute in pms.reservation

This commit is contained in:
braisab
2021-08-09 19:39:00 +02:00
parent 39f8a35f05
commit dc725d4a1e
5 changed files with 87 additions and 134 deletions

View File

@@ -186,6 +186,19 @@
bg_color="bg-warning"
attrs="{'invisible': [('payment_state', '!=', 'partial')]}"
/>
<widget
name="web_ribbon"
title="Staff"
bg_color="bg-info"
attrs="{'invisible': [('reservation_type', 'not in', 'staff')]}"
/>
<widget
name="web_ribbon"
title="Out of Service"
bg_color="bg-dark"
attrs="{'invisible': [('reservation_type', 'not in', 'out')]}"
/>
<h2>
<field name="name" />
</h2>
@@ -542,12 +555,17 @@
decoration-muted="state == 'cancel'"
default_order="create_date desc"
>
<field name="name" />
<field
name="name"
decoration-info="reservation_type == 'staff'"
decoration-bf="reservation_type == 'out'"
/>
<field name="partner_id" invisible="1" />
<field name="partner_name" select="1" />
<field name="date_order" select="1" />
<field name="user_id" widget="many2one_avatar_user" optional="show" />
<field name="reservation_ids" widget="many2many_tags" optional="show" />
<field name="reservation_type" invisible="1" />
<field
name="amount_total"
sum="Total amount"

View File

@@ -223,6 +223,19 @@
title="Partial"
bg_color="bg-warning"
attrs="{'invisible': [('folio_payment_state', '!=', 'partial')]}"
/>
<widget
name="web_ribbon"
title="Staff"
bg_color="bg-info"
attrs="{'invisible': [('reservation_type', 'not in', 'staff')]}"
/>
<widget
name="web_ribbon"
title="Out of Service"
bg_color="bg-dark"
attrs="{'invisible': [('reservation_type', 'not in', 'out')]}"
/>
<div
class="card bg-danger mb8"
@@ -496,7 +509,7 @@
<group
string="Services"
name="reservation_services"
attrs="{'invisible':[('reservation_type', 'not in', ('normal'))]}"
attrs="{'invisible':[('reservation_type', 'in', ('out'))]}"
>
<field
name="service_ids"
@@ -681,8 +694,14 @@
decoration-bf="splitted"
js_class="pms_booking_engine_request_tree"
>
<field name="reservation_type" invisible="1" />
<field name="folio_id" optional="show" decoration-bf="1" />
<field name="name" optional="show" />
<field
name="name"
optional="show"
decoration-info="reservation_type == 'staff'"
decoration-bf="reservation_type == 'out'"
/>
<field name="splitted" invisible="1" />
<field name="pricelist_id" invisible="1" />
<field name="rooms" />