[ADD] WorkFlow Partner checkin and duplicated

This commit is contained in:
Dario Lodeiros
2019-04-05 11:02:16 +02:00
parent 13ec4a1d7b
commit 40d039833f
15 changed files with 807 additions and 562 deletions

View File

@@ -22,7 +22,8 @@
<sheet>
<group name="group_top">
<group name="group_left">
<field name="partner_id" required="True"/>
<field name="partner_id" required="True"
domain="[('is_company','=', False)]"/>
<field name="enter_date"/>
<field name="exit_date"/>
</group>
@@ -42,25 +43,25 @@
<field name="arch" type="xml">
<tree editable="bottom" create="1"
decoration-danger="state == 'draft'"
decoration-muted="state == 'cancelled' or state =='done'"
decoration-info="state == 'done'"
decoration-muted="state == 'cancelled'"
decoration-success="state == 'booking'">
<button type="object" class="oe_stat_button"
<button type="object" class="oe_read_only oe_stat_button"
icon="fa fa-2x fa-check-circle"
name="action_on_board"
attrs="{'invisible':['|',
('state','not in', ['draft']),
('id','=',False)]}"
help="Get in"
attrs="{'invisible': [('state','!=','draft')]}"
/>
<field name="auto_booking" attrs="{'invisible':[('id','!=',False)]}" />
<field name="partner_id" required="True"/>
<field name="mobile"/>
<field name="auto_booking" invisible="1" />
<field name="partner_id" required="True"
domain="[('is_company','=', False)]"/>
<field name="mobile" />
<field name="email"/>
<field name="enter_date"/>
<field name="exit_date"/>
<field name="reservation_id" invisible="1"/>
<field name="folio_id" force_save="1" invisible="1"/>
<field name="state"/>
<field name="state" invisible="1"/>
</tree>
</field>
</record>
@@ -80,7 +81,8 @@
attrs="{'invisible':[('state','not in', ['draft'])]}"
help="Get in"
/>
<field name="partner_id" required="True"/>
<field name="partner_id" required="True"
domain="[('is_company','=', False)]"/>
<field name="mobile"/>
<field name="email"/>
<field name="enter_date"/>

View File

@@ -296,12 +296,15 @@
<page name="persons" string="Persons"
attrs="{'invisible': ['|',('reservation_type','in',('out')),
('parent_reservation','!=',False)]}">
<group>
<group colspan="2" cols="6">
<field name="segmentation_ids" widget="many2many_tags" placeholder="Segmentation..."
options="{'no_create': True,'no_open': True}" />
<field name="customer_sleep_here" />
</group>
<field name="checkin_partner_ids"
context="{
'checkin_partner_ids': checkin_partner_ids,
'include_customer': customer_sleep_here,
'default_reservation_id': id,
'reservation_id': id,
'tree_view_ref':'hotel.hotel_checkin_partner_reservation_view_tree',

View File

@@ -18,24 +18,20 @@
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
<xpath expr='//div[@name="button_box"]' position='inside'>
<button class="oe_stat_button" type="action" icon="fa-bed"
name="%(hotel.hotel_partner_reservations)d"
help="Reservations related with this contact">
<field string="Reservations" name="reservations_count" widget="statinfo"/>
</button>
</xpath>
<xpath expr='//div[@name="button_box"]' position='inside'>
<button class="oe_stat_button" type="action" icon="fa-file"
name="%(hotel.hotel_partner_folios)d"
help="Folios related with this contact">
<field string="Folios" name="folios_count" widget="statinfo"/>
</button>
</xpath>
<xpath expr='//field[@name="vat"]' position='after'>
<field name="unconfirmed" />
</xpath>
</field>
</record>