mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
Merge pull request #91 from hootel/pr_workflow_checkin
Pr workflow checkin
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<act_window
|
||||
id="action_checkin_partner"
|
||||
name="Action checkin"
|
||||
res_model='hotel.checkin.partner'
|
||||
res_model="hotel.checkin.partner"
|
||||
view_mode="tree,form" />
|
||||
|
||||
<menuitem
|
||||
@@ -40,7 +40,7 @@
|
||||
<field name="model">hotel.checkin.partner</field>
|
||||
<field name="priority">20</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom"
|
||||
<tree editable="bottom" create="1"
|
||||
decoration-danger="state == 'draft'"
|
||||
decoration-muted="state == 'cancelled' or state =='done'"
|
||||
decoration-success="state == 'booking'">
|
||||
@@ -51,10 +51,13 @@
|
||||
help="Get in"
|
||||
/>
|
||||
<field name="partner_id" required="True"/>
|
||||
<field name="mobile"/>
|
||||
<field name="email"/>
|
||||
<field name="enter_date"/>
|
||||
<field name="exit_date"/>
|
||||
<field name="reservation_id"/>
|
||||
<field name="state" />
|
||||
<field name="reservation_id" invisible="1"/>
|
||||
<field name="folio_id" force_save="1" invisible="1"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -75,10 +78,13 @@
|
||||
help="Get in"
|
||||
/>
|
||||
<field name="partner_id" required="True"/>
|
||||
<field name="mobile"/>
|
||||
<field name="email"/>
|
||||
<field name="enter_date"/>
|
||||
<field name="exit_date"/>
|
||||
<field name="reservation_id"/>
|
||||
<field name="state" />
|
||||
<field name="folio_id" force_save="1" invisible="1"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -101,23 +107,38 @@
|
||||
/>
|
||||
<filter string="Checkins Tomorrow" name="enter_tomorrow"
|
||||
domain="[('enter_date', '=', (context_today()+datetime.timedelta(days=1)).strftime('%Y-%m-%d')),
|
||||
('state', '=', 'draft')]"
|
||||
('state', '=', 'confirm')]"
|
||||
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')]"
|
||||
('state', '=', 'confirm')]"
|
||||
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'])]"
|
||||
('state', 'in', ['confirm','booking'])]"
|
||||
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'}" />
|
||||
<filter string="Create by Month" name="create_date_by_month"
|
||||
context="{'group_by':'create_date', 'default_order': 'create_date asc'}"/>
|
||||
<filter string="Create by Week" name="create_date_by_week"
|
||||
context="{'group_by':'create_date:week', 'default_order': 'create_date'}"/>
|
||||
<filter string="Create by Day" name="create_date_by_week"
|
||||
context="{'group_by':'create_date:day', 'default_order': 'create_date'}"/>
|
||||
<separator/>
|
||||
<filter string="Checkin by Month" name="checkin_by_month"
|
||||
context="{'group_by':'checkin', 'default_order': 'checkin asc'}"/>
|
||||
<filter string="Checkin by Week" name="checkin_by_week"
|
||||
context="{'group_by':'checkin:week', 'default_order': 'checkin'}"/>
|
||||
<filter string="Checkin by Day" name="checkin_by_week"
|
||||
context="{'group_by':'checkin:day', 'default_order': 'checkin'}"/>
|
||||
<separator/>
|
||||
<filter string="Checkout by Month" name="checkout_by_month"
|
||||
context="{'group_by':'checkout', 'default_order': 'checkout asc'}"/>
|
||||
<filter string="Checkout by Week" name="checkout_by_week"
|
||||
context="{'group_by':'checkout:week', 'default_order': 'checkout'}"/>
|
||||
<filter string="Checkout by Day" name="checkout_by_week"
|
||||
context="{'group_by':'checkout:day', 'default_order': 'checkout'}"/>
|
||||
<separator/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
||||
@@ -39,33 +39,6 @@
|
||||
|
||||
<sheet>
|
||||
<div class=" oe_button_box">
|
||||
<button type="action" class="oe_stat_button"
|
||||
id="checkin_partner_smart_button"
|
||||
icon="fa-user-plus"
|
||||
name="%(launch_checkin_wizard_add)d"
|
||||
attrs="{'invisible': [('checkin_partner_pending_count','<=',0)]}"
|
||||
context="{'partner_id': partner_id,'reservation_ids': room_lines,
|
||||
'hidden_checkin_partner': True, 'folio': active_id}">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value"><field name="checkin_partner_pending_count"
|
||||
widget="statinfo" nolabel="1"/></span>
|
||||
<span class="o_stat_text">Pending Checks</span>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<button type="object" class="oe_stat_button"
|
||||
id="checkin_partner_smart_button"
|
||||
icon="fa-users"
|
||||
name="action_checks"
|
||||
attrs="{'invisible': [('checkin_partner_count','<=',0)]}">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value"><field name="checkin_partner_count"
|
||||
widget="statinfo" nolabel="1"/></span>
|
||||
<span class="o_stat_text">Checks</span>
|
||||
</div>
|
||||
</button>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
|
||||
<button type="object" class="oe_stat_button"
|
||||
id="invoices_smart_button"
|
||||
icon="fa-thumbs-up"
|
||||
@@ -132,7 +105,8 @@
|
||||
<field name="email" placeholder="email"/>
|
||||
<field name="mobile" placeholder="mobile"/>
|
||||
<field name="phone" />
|
||||
<field name="partner_invoice_id" />
|
||||
<field name="segmentation_ids" widget="many2many_tags" placeholder="Segmentation..."
|
||||
options="{'no_create': True,'no_open': True}" />
|
||||
<field name="cancelled_reason" attrs="{'invisible':[('state','not in',('cancel'))]}"/>
|
||||
</group>
|
||||
<group>
|
||||
@@ -141,8 +115,6 @@
|
||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
||||
<field name="reservation_type" attrs="{'readonly':[('state','not in',('draft'))]}"/>
|
||||
<field name="channel_type" attrs="{'required':[('reservation_type','=','normal')]}"/>
|
||||
<field name="segmentation_ids" widget="many2many_tags" placeholder="Segmentation..."
|
||||
options="{'no_create': True,'no_open': True}" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="partner_internal_comment"/>
|
||||
@@ -150,31 +122,76 @@
|
||||
<group>
|
||||
<field name="internal_comment"/>
|
||||
</group>
|
||||
<group colspan="2" class="oe_subtotal_footer oe_right">
|
||||
<field name="amount_untaxed" sum="Untaxed amount" widget='monetary' />
|
||||
<field name="amount_tax" widget='monetary' />
|
||||
<div class="oe_subtotal_footer_separator oe_inline">
|
||||
<label for="amount_total" />
|
||||
</div>
|
||||
<field name="amount_total" nolabel="1" sum="Total amount"
|
||||
widget='monetary' />
|
||||
</group>
|
||||
<div class="oe_clear" />
|
||||
<group>
|
||||
<field name="note" />
|
||||
</group>
|
||||
</group>
|
||||
<group invisible="1">
|
||||
<field name="invoice_ids" invisible="1"/>
|
||||
<field name="invoice_status" invisible="1" />
|
||||
<field name="currency_id" invisible="1"/>
|
||||
</group>
|
||||
<notebook colspan="4" col="1">
|
||||
<page string="Lines">
|
||||
<page string="Reservation Rooms">
|
||||
<field name="room_lines" colspan="4" string="Room Line"
|
||||
nolabel="1" context="{'from_folio':True,'room_lines':room_lines,'folio_id': id,'tree_view_ref':'hotel.hotel_reservation_view_bottom_tree', 'form_view_ref':'hotel.hotel_reservation_view_form'}"/>
|
||||
nolabel="1" context="{'from_folio':True,'room_lines':room_lines,'folio_id': id,'tree_view_ref':'hotel.hotel_reservation_view_bottom_tree', 'form_view_ref':'hotel.hotel_reservation_view_form'}"/>
|
||||
</page>
|
||||
<page string="Services">
|
||||
<separator string="Service Lines" colspan="4"/>
|
||||
<field name="service_ids"
|
||||
context="{'from_room':False,'folio_id': id,'tree_view_ref':'hotel.hotel_service_view_tree', 'form_view_ref':'hotel.hotel_service_view_form'}"
|
||||
nolabel="1" />
|
||||
<group colspan="2" class="oe_subtotal_footer oe_right">
|
||||
<field name="amount_untaxed" sum="Untaxed amount" widget='monetary' />
|
||||
<field name="amount_tax" widget='monetary' />
|
||||
<div class="oe_subtotal_footer_separator oe_inline">
|
||||
<label for="amount_total" />
|
||||
</div>
|
||||
<field name="amount_total" nolabel="1" sum="Total amount"
|
||||
widget='monetary' />
|
||||
</group>
|
||||
<div class="oe_clear" />
|
||||
</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="invoicing" string="Invoicing">
|
||||
<group>
|
||||
<field name="note" />
|
||||
<field name="partner_diff_invoicing" string="Bill to another Address"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="partner_invoice_id"
|
||||
string="Contact Invoiced"
|
||||
attrs="{'invisible':[('partner_diff_invoicing','=',False)]}"/>
|
||||
</group>
|
||||
<group>
|
||||
<group>
|
||||
<field name="partner_invoice_vat" />
|
||||
<field name="partner_invoice_email" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="partner_invoice_parent_id" />
|
||||
<field name="partner_invoice_type" />
|
||||
</group>
|
||||
<group>
|
||||
<label for="partner_invoice_street" string="Address"/>
|
||||
<div class="o_address_format">
|
||||
<field name="partner_invoice_street" placeholder="Street..." class="o_address_street"/>
|
||||
<field name="partner_invoice_street2" placeholder="Street 2..." class="o_address_street"/>
|
||||
<field name="partner_invoice_city" placeholder="City" class="o_address_city"/>
|
||||
<field name="partner_invoice_state_id" class="o_address_state" placeholder="State" options='{"no_open": True}'/>
|
||||
<field name="partner_invoice_zip" placeholder="ZIP" class="o_address_zip"/>
|
||||
<field name="partner_invoice_country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'/>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Other data" invisible="1">
|
||||
@@ -327,9 +344,9 @@
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_all_folio" name="Folio"
|
||||
<menuitem id="menu_all_folio" name="Reservations"
|
||||
parent="hotel.hotel_management_menu" sequence="4"/>
|
||||
<menuitem name="Generate Folio" id="menu_open_hotel_folio1_form_tree_all"
|
||||
action="open_hotel_folio1_form_tree_all" sequence="5" parent="menu_all_folio" />
|
||||
<menuitem name="Folios" id="menu_open_hotel_folio1_form_tree_all"
|
||||
action="open_hotel_folio1_form_tree_all" sequence="15" parent="menu_all_folio" />
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<record model="ir.ui.view" id="hotel_reservation_view_form">
|
||||
<field name="name">hotel.reservation.form</field>
|
||||
<field name="model">hotel.reservation</field>
|
||||
<field name="priority">20</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Reservation" >
|
||||
<header>
|
||||
@@ -23,24 +24,26 @@
|
||||
<field name="has_confirmed_reservations_to_send" invisible="1" />
|
||||
<field name="has_cancelled_reservations_to_send" invisible="1" />
|
||||
<field name="has_checkout_to_send" invisible="1" />
|
||||
<field name="checkin_partner_count" invisible="1" />
|
||||
<button name="open_invoices_reservation"
|
||||
string="Create Invoice" type="object" class="btn-primary" states="sale"
|
||||
attrs="{'invisible': ['|',('state', '=', 'draft'), ('reservation_type','not in',('normal'))]}" />
|
||||
<button name="send_reservation_mail" type="object" string="Send Confirmation Email"
|
||||
attrs="{'invisible': [('has_confirmed_reservations_to_send', '=', False)]}" class="oe_highlight"/>
|
||||
attrs="{'invisible': [('has_confirmed_reservations_to_send', '=', False)]}"/>
|
||||
<button name="send_cancel_mail" type="object" string="Send Cancel Email"
|
||||
attrs="{'invisible': [('has_cancelled_reservations_to_send', '=', False)]}" class="oe_highlight"/>
|
||||
attrs="{'invisible': [('has_cancelled_reservations_to_send', '=', False)]}" />
|
||||
<button name="send_exit_mail" type="object" string="Send Exit Email"
|
||||
attrs="{'invisible': [('has_checkout_to_send', '=', False)]}" class="oe_highlight"/>
|
||||
|
||||
<button name="send_reservation_mail" type="object" string="Send Reservation Email" states="confirm" class="oe_highlight"/>
|
||||
attrs="{'invisible': [('has_checkout_to_send', '=', False)]}" />
|
||||
<button name="confirm" string="Confirm" class="oe_highlight"
|
||||
type="object"
|
||||
attrs="{'invisible':[('state','not in',('draft','cancelled'))]}"
|
||||
/>
|
||||
<button name="action_cancel" string="Cancel Reservation"
|
||||
class="oe_highlight" type="object"
|
||||
type="object"
|
||||
attrs="{'invisible':['|',('folio_id', '=', False),('state','not in',('confirm','booking'))]}"
|
||||
/>
|
||||
<button name="action_reservation_checkout" string="Done"
|
||||
states="booking" class="oe_highlight"
|
||||
states="booking"
|
||||
type="object"
|
||||
/>
|
||||
<button name="draft" string="Set to Draft"
|
||||
@@ -48,12 +51,12 @@
|
||||
type="object"
|
||||
/>
|
||||
<button name="%(action_hotel_split_reservation)d" string="Split"
|
||||
type="action" class="oe_highlight"
|
||||
type="action"
|
||||
icon="fa-cut"
|
||||
attrs="{'invisible':['|',('folio_id', '=', False),('state','not in',('draft','confirm','booking'))]}"
|
||||
/>
|
||||
<button name="unify" string="Unify"
|
||||
type="object" class="oe_highlight"
|
||||
type="object"
|
||||
icon="fa-compress"
|
||||
attrs="{'invisible':[('splitted', '=', False)]}"
|
||||
/>
|
||||
@@ -90,7 +93,7 @@
|
||||
</button>
|
||||
<button type="action" class="oe_stat_button"
|
||||
icon="fa-list-ul"
|
||||
attrs="{'invisible': [('partner_id','=',False)]}"
|
||||
attrs="{'invisible': ['|', ('partner_id','=',False), ('reservation_type','in',('out'))]}"
|
||||
name="%(open_hotel_reservation_form_tree_all)d"
|
||||
context="{'search_default_partner_id': partner_id}">
|
||||
<div class="o_form_field o_stat_info">
|
||||
@@ -111,7 +114,8 @@
|
||||
</div>
|
||||
</button>
|
||||
<button type="object" class="oe_stat_button" id="invoice_button"
|
||||
icon="fa-pencil-square-o" name="open_invoices_reservation">
|
||||
icon="fa-pencil-square-o" name="open_invoices_reservation"
|
||||
attrs="{'invisible': [('invoice_count','<=',0)]}">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="invoice_count"/>
|
||||
@@ -129,28 +133,15 @@
|
||||
<span class="o_stat_text">Splitted!</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="action" class="oe_stat_button"
|
||||
icon="fa-user-plus"
|
||||
name="%(launch_checkin_wizard_add)d"
|
||||
context="{'partner_id': partner_id,'enter_date': checkin,
|
||||
'exit_date': checkout,'reservation_id': id, 'hidden_checkin_partner': True, 'edit_checkin_partner': True }"
|
||||
attrs="{'invisible':['|', '|', ('state','not in',('confirm','booking')),
|
||||
('checkin_partner_pending_count','=', 0),('parent_reservation','!=',False)]}">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value"><field name="checkin_partner_pending_count"
|
||||
widget="statinfo" nolabel="1"/></span>
|
||||
<span class="o_stat_text">Pending Checks</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="object" class="oe_stat_button"
|
||||
icon="fa-users"
|
||||
name="action_checks"
|
||||
attrs="{'invisible': ['|', ('checkin_partner_count','<=',0),
|
||||
attrs="{'invisible': ['|', ('checkin_partner_pending_count','<=',0),
|
||||
('parent_reservation','!=',False)]}">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value"><field name="checkin_partner_count"
|
||||
<span class="o_stat_value"><field name="checkin_partner_pending_count"
|
||||
widget="statinfo" nolabel="1"/></span>
|
||||
<span class="o_stat_text">Checks</span>
|
||||
<span class="o_stat_text">Pending Checks</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
@@ -187,60 +178,52 @@
|
||||
<span class="fa fa-sign-out" style="margin-right: 5px;"/>
|
||||
<field name="checkout" />
|
||||
</h3>
|
||||
<field name="out_service_description" placeholder="Out service description"
|
||||
attrs="{'invisible':[('reservation_type','not in',('out'))]}"/>
|
||||
<group col="12">
|
||||
<group colspan="5" string="General Info" name="contact_details" >
|
||||
<field name="email" placeholder="email" widget="email" />
|
||||
<field name="mobile" placeholder="mobile" widget="phone" />
|
||||
<field name="phone" placeholder="phone" widget="phone" />
|
||||
<field name="pricelist_id"/>
|
||||
<field name="partner_internal_comment" string="Partner Note"/>
|
||||
<field name="email" placeholder="email" widget="email"
|
||||
attrs="{'invisible': [('reservation_type','in',('out'))]}"/>
|
||||
<field name="mobile" placeholder="mobile" widget="phone"
|
||||
attrs="{'invisible': [('reservation_type','in',('out'))]}"/>
|
||||
<field name="phone" placeholder="phone" widget="phone"
|
||||
attrs="{'invisible': [('reservation_type','in',('out'))]}"/>
|
||||
<field name="pricelist_id"
|
||||
attrs="{'invisible': [('reservation_type','in',('out'))]}"/>
|
||||
<field name="partner_internal_comment" string="Partner Note"
|
||||
attrs="{'invisible': [('reservation_type','in',('out'))]}"/>
|
||||
<field name="cancelled_reason" attrs="{'invisible':[('state','not in',('cancelled'))]}"/>
|
||||
</group>
|
||||
<group colspan="4" string="Reservation Details" name="reservation_details">
|
||||
<field name="arrival_hour"/>
|
||||
<field name="departure_hour"/>
|
||||
<field name="nights" invisible="1"/>
|
||||
</group>
|
||||
<group colspan="4" string="Reservation Details" name="reservation_details">
|
||||
<field name="nights"/>
|
||||
<!-- TODO: How to filter to avoid show False (generic) pricelist board when exist a specific pricelist board¿? -->
|
||||
<field name="board_service_room_id" domain="[
|
||||
('hotel_room_type_id', '=', room_type_id),
|
||||
('pricelist_id', 'in', [pricelist_id, False])]"
|
||||
options="{'no_create': True,'no_open': True}" />
|
||||
options="{'no_create': True,'no_open': True}"
|
||||
attrs="{'invisible': [('reservation_type','in',('out'))]}" />
|
||||
<field name="name"/>
|
||||
<field name="adults"/>
|
||||
<field name="children"/>
|
||||
<field name="qty_invoiced" />
|
||||
<field name="qty_to_invoice" />
|
||||
<field name="adults" attrs="{'invisible': [('reservation_type','in',('out'))]}"/>
|
||||
<field name="children" attrs="{'invisible': [('reservation_type','in',('out'))]}"/>
|
||||
<field name="qty_invoiced" invisible="1"/>
|
||||
<field name="qty_to_invoice" invisible="1"/>
|
||||
<field name="room_type_id" on_change="1" options="{'no_create': True,'no_open': True}"
|
||||
attrs="{'readonly':[('state','not in',('draft'))]}"/>
|
||||
<field name="channel_type" attrs="{'required':[('reservation_type','not in',('staff','out'))]}"/>
|
||||
</group>
|
||||
<group class="oe_subtotal_footer" style="margin-right: 20px; !important" colspan="2" name="reservation_total" string="Amounts" attrs="{'invisible':[('folio_id','=', False)]}">
|
||||
<!--
|
||||
<field name="discount" string="Room Discount" attrs="{'invisible': [('discount_type','=','fixed')]}" />
|
||||
-->
|
||||
<group class="oe_subtotal_footer" style="margin-right: 20px; !important" colspan="2" name="reservation_total" string="Amounts">
|
||||
<div class="oe_subtotal_footer_separator oe_inline o_td_label">
|
||||
<!--
|
||||
<label for="amount_discount" />
|
||||
-->
|
||||
<button name="%(action_hotel_massive_price_change_reservation_days)d" string="Massive Day Prices"
|
||||
type="action" class="oe_edit_only oe_link" icon="fa-bolt"/>
|
||||
<label for="price_room_services_set" string="Reservation Total"/>
|
||||
</div>
|
||||
<!-- <field name="amount_discount" nolabel="1" widget='monetary' class="oe_subtotal_footer_separator" options="{'currency_field': 'currency_id'}"/> -->
|
||||
<!--
|
||||
<div class="oe_subtotal_footer_separator oe_inline o_td_label">
|
||||
<label for="amount_reservation_services" />
|
||||
</div>
|
||||
-->
|
||||
<!-- <field name="amount_reservation_services" nolabel="1" widget='monetary' class="oe_subtotal_footer_separator" options="{'currency_field': 'currency_id'}"/> -->
|
||||
<field name="price_total" />
|
||||
<!-- <field name="qty_delivered_updateable" invisible="1"/> -->
|
||||
<field name="price_room_services_set" nolabel="1" class="oe_subtotal_footer_separator" widget="monetary"/>
|
||||
<field name="discount" string="Discount Room" widget="monetary"/>
|
||||
<field name="price_subtotal" invisible="1"/>
|
||||
<field name="price_services" string="Only Services" widget="monetary"/>
|
||||
<field name="price_total" string="Only Room" widget="monetary"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<!-- <field name="invoice_status" invisible="1"/> -->
|
||||
<!-- <field name="customer_lead" invisible="1"/> -->
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="price_subtotal" widget="monetary"/>
|
||||
<field name="price_services" widget="monetary"/>
|
||||
<field name="price_room_services_set" widget="monetary"/>
|
||||
<field name="invoice_status" invisible="1"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<field name="folio_internal_comment" nolabel="1" placeholder="Reservation Notes"/>
|
||||
@@ -251,7 +234,8 @@
|
||||
<!-- <field name="product_uom" string="Rent(UOM)" invisible="1" /> -->
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="days" string="Service and Days">
|
||||
<page name="services" string="Services"
|
||||
attrs="{'invisible': [('reservation_type','in',('out'))]}">
|
||||
<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'}"
|
||||
@@ -293,17 +277,25 @@
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<group string="Days" name="days">
|
||||
<field name="reservation_line_ids" nolabel="1">
|
||||
<tree create="false" delete="false" editable="bottom">
|
||||
<field name="date" />
|
||||
<field name="price" />
|
||||
<field name="discount" />
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</page>
|
||||
<page name="persons" string="Persons">
|
||||
<page name="days" string="Day Pricing"
|
||||
attrs="{'invisible': [('reservation_type','in',('out'))]}">
|
||||
<button name="%(action_hotel_massive_price_change_reservation_days)d" string="Massive Day Prices"
|
||||
type="action" icon="fa-bolt"/>
|
||||
<field name="reservation_line_ids" nolabel="1">
|
||||
<tree create="false" delete="false" editable="bottom">
|
||||
<field name="date" />
|
||||
<field name="price" />
|
||||
<field name="discount" />
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page name="persons" string="Persons"
|
||||
attrs="{'invisible': [('reservation_type','in',('out'))]}">
|
||||
<group>
|
||||
<field name="segmentation_ids" widget="many2many_tags" placeholder="Segmentation..."
|
||||
options="{'no_create': True,'no_open': True}" />
|
||||
</group>
|
||||
<field name="checkin_partner_ids"
|
||||
context="{
|
||||
'default_reservation_id': id,
|
||||
@@ -312,16 +304,47 @@
|
||||
}"
|
||||
/>
|
||||
</page>
|
||||
<page name="invoicing" string="Invoicing"
|
||||
attrs="{'invisible': [('reservation_type','in',('out'))]}">
|
||||
<group>
|
||||
<field name="partner_diff_invoicing" string="Bill to another Address"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="partner_invoice_id"
|
||||
string="Contact Invoiced"
|
||||
attrs="{'invisible':[('partner_diff_invoicing','=',False)]}"/>
|
||||
</group>
|
||||
<group>
|
||||
<group>
|
||||
<field name="partner_invoice_vat" />
|
||||
<field name="partner_invoice_email" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="partner_invoice_parent_id" />
|
||||
<field name="partner_invoice_type" />
|
||||
</group>
|
||||
<group>
|
||||
<label for="partner_invoice_street" string="Address"/>
|
||||
<div class="o_address_format">
|
||||
<field name="partner_invoice_street" placeholder="Street..." class="o_address_street"/>
|
||||
<field name="partner_invoice_street2" placeholder="Street 2..." class="o_address_street"/>
|
||||
<field name="partner_invoice_city" placeholder="City" class="o_address_city"/>
|
||||
<field name="partner_invoice_state_id" class="o_address_state" placeholder="State" options='{"no_open": True}'/>
|
||||
<field name="partner_invoice_zip" placeholder="ZIP" class="o_address_zip"/>
|
||||
<field name="partner_invoice_country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'/>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page name="others" string="Others">
|
||||
<group>
|
||||
<field name="segmentation_ids" widget="many2many_tags" placeholder="Segmentation..."
|
||||
options="{'no_create': True,'no_open': True}" />
|
||||
<field name="overbooking" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="channel_type" attrs="{'required':[('reservation_type','not in',('staff','out'))]}"/>
|
||||
<field name="reservation_type" />
|
||||
<field name="out_service_description"
|
||||
attrs="{'invisible':[('reservation_type','not in',('out'))]}"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
@@ -335,6 +358,65 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Form view Checkin Partners from hotel reservation -->
|
||||
|
||||
<record model="ir.ui.view" id="hotel_reservation_checkin_view_form">
|
||||
<field name="name">hotel.reservation.checkin.form</field>
|
||||
<field name="model">hotel.reservation</field>
|
||||
<field name="priority">100</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Reservation" >
|
||||
<field name="reservation_type" invisible="1" />
|
||||
<field name="splitted" invisible="1" />
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="overbooking" invisible="1" />
|
||||
<field name="folio_id" invisible="1" />
|
||||
<field name="adults" invisible="1" />
|
||||
<field name="children" invisible="1" />
|
||||
<div class="alert alert-info" role="alert" style="margin-bottom:0px;"
|
||||
attrs="{'invisible': ['|',('shared_folio','=',False),('splitted', '=', True)]}">
|
||||
This reservation has other reservantions and/or services in the folio, you can check it in the
|
||||
<bold><button class="alert-link" type="object" name="open_folio" string="Folio Form"/></bold>
|
||||
</div>
|
||||
<field name="shared_folio" invisible="1"/>
|
||||
<sheet>
|
||||
<span class="label label-danger" attrs="{'invisible': [('state', 'not in', ('cancelled'))]}">Cancelled Reservation!</span>
|
||||
<span class="label label-warning" attrs="{'invisible': [('overbooking', '=', False)]}">OverBooking!</span>
|
||||
<h2>
|
||||
<field name="room_id" readonly="1" nolabel="1"
|
||||
options="{'no_open': True}" style="margin-right: 30px;" />
|
||||
<field name="partner_id" readonly="1" options="{'no_open': True}"/>
|
||||
<span class="fa fa-user" style="margin-left:20px;"
|
||||
attrs="{'invisible': [('reservation_type','not in',('normal'))]}"/>
|
||||
<span class="fa fa-black-tie" style="margin-left:20px; color: #C67;"
|
||||
attrs="{'invisible': [('reservation_type','not in',('staff'))]}"/>
|
||||
|
||||
<h3>
|
||||
From <span class="fa fa-sign-in" style="margin: 5px;"/>
|
||||
<field name="checkin" style="margin-right: 10px;"
|
||||
readonly="1" />
|
||||
to
|
||||
<span class="fa fa-sign-out" style="margin-right: 5px;"/>
|
||||
<field name="checkout" readonly="1" />
|
||||
</h3>
|
||||
</h2>
|
||||
<group>
|
||||
<field name="segmentation_ids" widget="many2many_tags" placeholder="Segmentation..."
|
||||
options="{'no_create': True,'no_open': True}" />
|
||||
</group>
|
||||
<field name="checkin_partner_ids"
|
||||
context="{
|
||||
'default_reservation_id': id,
|
||||
'reservation_id': id,
|
||||
'tree_view_ref':'hotel.hotel_checkin_partner_reservation_view_tree',
|
||||
}"
|
||||
/>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Tree view of hotel reservation -->
|
||||
<record model="ir.ui.view" id="hotel_reservation_view_tree">
|
||||
<field name="name">hotel.reservation.tree</field>
|
||||
@@ -361,9 +443,9 @@
|
||||
name="open_folio"
|
||||
/>
|
||||
<field name="folio_id"/>
|
||||
<button type="action" class="oe_stat_button"
|
||||
<button type="object" class="oe_stat_button"
|
||||
icon="fa fa-1x fa-user-plus"
|
||||
name="%(launch_checkin_wizard_add)d"
|
||||
name="action_checks"
|
||||
context="{'partner_id': partner_id,'enter_date': checkin,
|
||||
'exit_date': checkout,'reservation_id': id, 'hidden_checkin_partner': True, 'edit_checkin_partner': True }"
|
||||
attrs="{'invisible':['|','|', ('state','not in',('confirm','booking')),('checkin_partner_pending_count','=', 0),('parent_reservation','!=',False)]}"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<odoo>
|
||||
|
||||
<!--=== Hotel Service Line ==== -->
|
||||
|
||||
<!-- Form view of Service Line -->
|
||||
<record model="ir.ui.view" id="hotel_service_line_view_form">
|
||||
<field name="name">hotel.service.line.form</field>
|
||||
@@ -9,7 +10,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Service Line">
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="product_id" />
|
||||
<field name="day_qty"/>
|
||||
<field name="date" />
|
||||
</group>
|
||||
@@ -17,20 +18,65 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Tree view of hotel service Line -->
|
||||
<!-- Tree views of hotel service Line -->
|
||||
<record model="ir.ui.view" id="hotel_service_line_view_tree">
|
||||
<field name="name">hotel.service.line.tree</field>
|
||||
<field name="model">hotel.service.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Hotel By Day">
|
||||
<field name="name" />
|
||||
<field name="product_id" />
|
||||
<field name="day_qty"/>
|
||||
<field name="date" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action for hotel service line-->
|
||||
<record model="ir.ui.view" id="hotel_service_line_report_view_tree">
|
||||
<field name="name">hotel.service.line.report.tree</field>
|
||||
<field name="model">hotel.service.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Service By Day">
|
||||
<field name="product_id" />
|
||||
<field name="day_qty"/>
|
||||
<field name="date" />
|
||||
<field name="service_id" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Search Views -->
|
||||
|
||||
<record model="ir.ui.view" id="hotel_service_line_view_search">
|
||||
<field name="name">hotel.service.line.search</field>
|
||||
<field name="model">hotel.service.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Services By Day">
|
||||
<field name="service_id" />
|
||||
<filter string="Today"
|
||||
domain="[('date', '=', context_today().strftime('%Y-%m-%d'))]"
|
||||
help="Current Booking" />
|
||||
<filter string="Tomorrow"
|
||||
domain="[('date', '=', (context_today()+datetime.timedelta(days=1)).strftime('%Y-%m-%d'))]"
|
||||
/>
|
||||
<filter string="Next 7 days"
|
||||
domain="[('date', '>', context_today().strftime('%Y-%m-%d')),
|
||||
('date', '<', (context_today()+datetime.timedelta(days=7)).strftime('%Y-%m-%d'))]"
|
||||
/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="By Month" name="date_by_month"
|
||||
context="{'group_by':'date', 'default_order': 'date asc'}"/>
|
||||
<filter string="By Week" name="date_by_week"
|
||||
context="{'group_by':'date:week', 'default_order': 'date'}"/>
|
||||
<filter string="By Day" name="date_by_week"
|
||||
context="{'group_by':'date:day', 'default_order': 'date'}"/>
|
||||
<filter string="Product" name="product_id"
|
||||
context="{'group_by':'product_id', 'default_order': 'product_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action for hotel service line from Form Folio/Reservation-->
|
||||
<record model="ir.actions.act_window" id="action_hotel_service_line_form">
|
||||
<field name="name">Hotel Services</field>
|
||||
<field name="res_model">hotel.service.line</field>
|
||||
@@ -38,8 +84,24 @@
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
<menuitem name="Services as Products" id="menu_open_hotel_service_line_form"
|
||||
action="action_hotel_service_line_form" sequence="8"
|
||||
parent="hotel.menu_hotel_service" />
|
||||
-->
|
||||
|
||||
<act_window
|
||||
id="action_service_line"
|
||||
name="Services By Day"
|
||||
res_model="hotel.service.line"
|
||||
view_mode="tree,form"
|
||||
view_id = "hotel.hotel_service_line_report_view_tree" />
|
||||
|
||||
<menuitem
|
||||
id="menu_hotel_service_line"
|
||||
name="Services by Day"
|
||||
parent="hotel.hotel_reports_menu"
|
||||
sequence="30"
|
||||
action="action_service_line" />
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -19,10 +19,12 @@
|
||||
options="{'create': False, 'create_edit': False}"
|
||||
invisible="1" />
|
||||
<!-- <field name="layout_category_id" groups="sale.group_sale_layout"/> -->
|
||||
<field name="product_qty" invisible="0"
|
||||
attrs="{'readonly': [('per_day','=',True)]}"
|
||||
force_save="1"/>
|
||||
<field name="days_qty" invisible="0"/>
|
||||
<group>
|
||||
<field name="product_qty"
|
||||
attrs="{'readonly': [('per_day','=',True)]}"
|
||||
force_save="1"/>
|
||||
</group>
|
||||
<field name="days_qty" invisible="1"/>
|
||||
<field name="price_unit" invisible="1" />
|
||||
<field name="discount" invisible="1"/>
|
||||
<field name="tax_ids" widget="many2many_tags"
|
||||
|
||||
@@ -9,9 +9,6 @@
|
||||
<field name="folio_ids" widget="many2many_tags"/>
|
||||
<field name="from_folio" invisible="1" />
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='product_id']" position="after">
|
||||
<field name="reservation_line_ids" widget="many2many_tags"/>
|
||||
</xpath>
|
||||
<xpath expr="//button[@name='%(account.action_account_invoice_payment)d']" position="attributes">
|
||||
<attribute name="attrs">{'invisible': ['|',('from_folio','=',True)]}</attribute>
|
||||
</xpath>
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="payment_type" widget="radio" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||
<field name="partner_type" widget="selection" attrs="{'required': [('state', '=', 'draft'), ('payment_type', 'in', ('inbound', 'outbound'))], 'invisible': [('payment_type', 'not in', ('inbound', 'outbound'))], 'readonly': [('state', '!=', 'draft')]}"/>
|
||||
<field name="payment_type" invisible="1"/>
|
||||
<field name="partner_type" widget="selection" invisible="1"/>
|
||||
<field name="partner_id" attrs="{'required': [('state', '=', 'draft'), ('payment_type', 'in', ('inbound', 'outbound'))], 'invisible': [('payment_type', 'not in', ('inbound', 'outbound'))], 'readonly': [('state', '!=', 'draft')]}" context="{'default_is_company': True, 'default_supplier': payment_type == 'outbound', 'default_customer': payment_type == 'inbound'}"/>
|
||||
<label for="amount"/>
|
||||
<div name="amount_div" class="o_row">
|
||||
|
||||
Reference in New Issue
Block a user