mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[WIP] Checkin Workflow
This commit is contained in:
@@ -1,18 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<!-- Action to open INE Codes list -->
|
||||
<act_window
|
||||
id="action_checkin_partner"
|
||||
name="Action checkin"
|
||||
res_model='hotel.checkin.partner'
|
||||
view_mode="tree,form" />
|
||||
|
||||
<act_window
|
||||
id="action_checkin_partner_download"
|
||||
name="Action checkin download"
|
||||
res_model='hotel.checkin.partner'
|
||||
view_mode="form" />
|
||||
|
||||
<menuitem
|
||||
id="menu_hotel_checkin_partner"
|
||||
@@ -25,7 +18,7 @@
|
||||
<field name="name">Checkin Form</field>
|
||||
<field name="model">hotel.checkin.partner</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<form create="false">
|
||||
<sheet>
|
||||
<group name="group_top">
|
||||
<group name="group_left">
|
||||
@@ -42,17 +35,92 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="hotel_checkin_partner_view_tree" model="ir.ui.view">
|
||||
<field name="name">Checkin Tree</field>
|
||||
<record id="hotel_checkin_partner_reservation_view_tree" model="ir.ui.view">
|
||||
<field name="name">hotel.checkin.partner.reservation.view.tree</field>
|
||||
<field name="model">hotel.checkin.partner</field>
|
||||
<field name="priority">20</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="partner_id" string="Client name"/>
|
||||
<tree editable="bottom"
|
||||
decoration-danger="state == 'draft'"
|
||||
decoration-muted="state == 'cancelled' or state =='done'"
|
||||
decoration-success="state == 'booking'">
|
||||
<button type="object" class="oe_stat_button"
|
||||
icon="fa fa-2x fa-check-circle"
|
||||
name="action_on_board"
|
||||
attrs="{'invisible':[('state','not in', ['draft'])]}"
|
||||
help="Get in"
|
||||
/>
|
||||
<field name="partner_id" required="True"/>
|
||||
<field name="enter_date"/>
|
||||
<field name="exit_date"/>
|
||||
<field name="reservation_id"/>
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="hotel_checkin_partner_view_tree" model="ir.ui.view">
|
||||
<field name="name">hotel.checkin.partner.view.tree</field>
|
||||
<field name="model">hotel.checkin.partner</field>
|
||||
<field name="priority">10</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree create="false"
|
||||
decoration-danger="state == 'draft'"
|
||||
decoration-muted="state == 'cancelled' or state =='done'"
|
||||
decoration-success="state == 'booking'">
|
||||
<button type="object" class="oe_stat_button"
|
||||
icon="fa fa-2x fa-check-circle"
|
||||
name="action_on_board"
|
||||
attrs="{'invisible':[('state','not in', ['draft'])]}"
|
||||
help="Get in"
|
||||
/>
|
||||
<field name="partner_id" required="True"/>
|
||||
<field name="enter_date"/>
|
||||
<field name="exit_date"/>
|
||||
<field name="reservation_id"/>
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="hotel_checkin_partner_view_search">
|
||||
<field name="name">hotel.checkin.partner.search</field>
|
||||
<field name="model">hotel.checkin.partner</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Checkin Detail">
|
||||
<field name="partner_id" />
|
||||
<field name="reservation_id" />
|
||||
<filter string="On Board"
|
||||
domain="[('state','in',['booking'])]"
|
||||
help="Current Booking" />
|
||||
<filter string="To enter"
|
||||
domain="[('state', '=', 'draft')]"
|
||||
/>
|
||||
<filter string="Out"
|
||||
domain="[('state', '=', 'done')]"
|
||||
/>
|
||||
<filter string="Checkins Tomorrow" name="enter_tomorrow"
|
||||
domain="[('enter_date', '=', (context_today()+datetime.timedelta(days=1)).strftime('%Y-%m-%d')),
|
||||
('state', '=', 'draft')]"
|
||||
help="Show all checkins for enter tomorrow"/>
|
||||
<filter string="Checkins to 7 days" name="next_res_week"
|
||||
domain="[('enter_date', '<', (context_today()+datetime.timedelta(days=7)).strftime('%Y-%m-%d')),
|
||||
('state', '=', 'draft')]"
|
||||
help="Show all reservations for which date enter is before than 7 days"/>
|
||||
<filter string="On Board Tomorrow" name="next_res_2week"
|
||||
domain="[('enter_date', '<', (context_today()+datetime.timedelta(days=14)).strftime('%Y-%m-%d')),
|
||||
('state', 'in', ['confirm','draft'])]"
|
||||
help="Show all checkins for Tomorrow"/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Creation Date" domain="[]"
|
||||
context="{'group_by':'create_date'}" />
|
||||
<filter string="Checkin Date" domain="[]"
|
||||
context="{'group_by':'checkin'}" />
|
||||
<filter string="Checkout Date" domain="[]"
|
||||
context="{'group_by':'checkout'}" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -82,7 +82,6 @@
|
||||
<sheet>
|
||||
<div class="oe_button_box" attrs="{'invisible': [('folio_id','=',False)]}">
|
||||
<button type="object" class="oe_stat_button"
|
||||
id="folio_smart_button"
|
||||
icon="fa-file"
|
||||
name="open_folio">
|
||||
<div class="o_form_field o_stat_info">
|
||||
@@ -90,7 +89,6 @@
|
||||
</div>
|
||||
</button>
|
||||
<button type="action" class="oe_stat_button"
|
||||
id="books"
|
||||
icon="fa-list-ul"
|
||||
attrs="{'invisible': [('partner_id','=',False)]}"
|
||||
name="%(open_hotel_reservation_form_tree_all)d"
|
||||
@@ -109,7 +107,6 @@
|
||||
</div>
|
||||
</button>
|
||||
<button type="object" class="oe_stat_button"
|
||||
id="open_master"
|
||||
icon="fa-chain-broken"
|
||||
name="open_master"
|
||||
attrs="{'invisible':[('splitted','=',False)]}">
|
||||
@@ -120,7 +117,6 @@
|
||||
</div>
|
||||
</button>
|
||||
<button type="action" class="oe_stat_button"
|
||||
id="pending_checkins_smart_button"
|
||||
icon="fa-user-plus"
|
||||
name="%(launch_checkin_wizard_add)d"
|
||||
context="{'partner_id': partner_id,'enter_date': checkin,
|
||||
@@ -134,7 +130,6 @@
|
||||
</div>
|
||||
</button>
|
||||
<button type="object" class="oe_stat_button"
|
||||
id="checkin_smart_button"
|
||||
icon="fa-users"
|
||||
name="action_checks"
|
||||
attrs="{'invisible': ['|', ('checkin_partner_count','<=',0),
|
||||
@@ -253,7 +248,7 @@
|
||||
decoration-success="is_board_service == True">
|
||||
<field name="is_board_service" invisible="1" />
|
||||
<button type="object" class="oe_stat_button"
|
||||
id="included_in_room" icon="fa fa-1x fa-bed"
|
||||
icon="fa fa-1x fa-bed"
|
||||
name="open_service_lines"
|
||||
attrs="{'invisible':[('is_board_service','=', False)]}" />
|
||||
<field name="per_day" invisible="1"/>
|
||||
@@ -266,7 +261,7 @@
|
||||
<field name="name"/>
|
||||
<field name="product_qty" attrs="{'readonly': [('per_day','=',True)]}" force_save="1"/>
|
||||
<button type="object" class="oe_stat_button"
|
||||
id="go_service_lines" icon="fa fa-2x fa-bars"
|
||||
icon="fa fa-2x fa-bars"
|
||||
name="open_service_lines"
|
||||
attrs="{'invisible': [('per_day','=',False)]}"/>
|
||||
<field name="days_qty" invisible="1"/>
|
||||
@@ -295,6 +290,15 @@
|
||||
</field>
|
||||
</group>
|
||||
</page>
|
||||
<page name="persons" string="Persons">
|
||||
<field name="checkin_partner_ids"
|
||||
context="{
|
||||
'default_reservation_id': id,
|
||||
'reservation_id': id,
|
||||
'tree_view_ref':'hotel.hotel_checkin_partner_reservation_view_tree',
|
||||
}"
|
||||
/>
|
||||
</page>
|
||||
<page name="others" string="Others">
|
||||
<group>
|
||||
<field name="segmentation_ids" widget="many2many_tags" placeholder="Segmentation..."
|
||||
@@ -337,7 +341,6 @@
|
||||
<button icon="fa fa-2x fa-angellist"
|
||||
attrs="{'invisible':['|',('folio_pending_amount','>',0),('state' ,'!=', 'done')]}"
|
||||
type="object"
|
||||
id="open_folio"
|
||||
name="open_folio" />
|
||||
<field name="state" />
|
||||
<button type="object" class="oe_stat_button"
|
||||
@@ -396,7 +399,6 @@
|
||||
<tree position="attributes">
|
||||
<attribute name="editable">bottom</attribute>
|
||||
<attribute name="delete">false</attribute>
|
||||
<attribute name="options">{'no_open': True}</attribute>
|
||||
<attribute name="string">Rooms</attribute>
|
||||
</tree>
|
||||
<xpath expr="//field[@name='folio_id']" position="attributes">
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
decoration-success="is_board_service == True">
|
||||
<field name="is_board_service" invisible="1" />
|
||||
<button type="object" class="oe_stat_button"
|
||||
id="included_in_room" icon="fa fa-1x fa-bed"
|
||||
icon="fa fa-1x fa-bed"
|
||||
name="open_service_lines"
|
||||
attrs="{'invisible':[('is_board_service','=', False)]}" />
|
||||
<field name="per_day" invisible="1"/>
|
||||
@@ -63,7 +63,7 @@
|
||||
<field name="name"/>
|
||||
<field name="product_qty" attrs="{'readonly': [('per_day','=',True)]}" force_save="1"/>
|
||||
<button type="object" class="oe_stat_button"
|
||||
id="go_service_lines" icon="fa fa-2x fa-bars"
|
||||
icon="fa fa-2x fa-bars"
|
||||
name="open_service_lines"
|
||||
attrs="{'invisible': [('per_day','=',False)]}"/>
|
||||
<field name="days_qty" invisible="1"/>
|
||||
@@ -102,6 +102,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Action for hotel service -->
|
||||
<record model="ir.actions.act_window" id="action_hotel_services_form">
|
||||
<field name="name">Hotel Services</field>
|
||||
|
||||
Reference in New Issue
Block a user