mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
First Commit
This commit is contained in:
57
hotel/views/cardex.xml
Normal file
57
hotel/views/cardex.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<!-- Action to open INE Codes list -->
|
||||
<act_window
|
||||
id="action_cardex"
|
||||
name="Action cardex"
|
||||
res_model="cardex"
|
||||
view_mode="tree,form" />
|
||||
<act_window
|
||||
id="action_cardex_download"
|
||||
name="Action cardex download"
|
||||
res_model="cardex"
|
||||
view_mode="form" /> <!-- Menu item to open INE Codes list -->
|
||||
<menuitem
|
||||
id="menu_cardex"
|
||||
name="Cardex"
|
||||
parent="hotel.hotel_reports_menu"
|
||||
sequence="25"
|
||||
action="action_cardex" />
|
||||
|
||||
<record id="view_form_cardex" model="ir.ui.view">
|
||||
<field name="name">Cardex Form</field>
|
||||
<field name="model">cardex</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group name="group_top">
|
||||
<group name="group_left">
|
||||
<field name="partner_id" required="True"/>
|
||||
<field name="enter_date"/>
|
||||
<field name="exit_date"/>
|
||||
</group>
|
||||
<group name="group_left">
|
||||
<field name="reservation_id"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_tree_cardex" model="ir.ui.view">
|
||||
<field name="name">Cardex Tree</field>
|
||||
<field name="model">cardex</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="partner_id" string="Client name"/>
|
||||
<field name="enter_date"/>
|
||||
<field name="exit_date"/>
|
||||
<field name="reservation_id"/>
|
||||
<!-- button type="action" class="oe_stat_button" id="cardex_smart_button" icon="fa-bed" /-->
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
86
hotel/views/currency_exchange.xml
Normal file
86
hotel/views/currency_exchange.xml
Normal file
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!--==================================================== Currency ==================================================== -->
|
||||
<!-- Form view of currency exchange -->
|
||||
<record model="ir.ui.view" id="view_currency_exchange_form">
|
||||
<field name="name">currency.exchange.form</field>
|
||||
<field name="model">currency.exchange</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string=" Currency Exchange">
|
||||
<header>
|
||||
<button name="cur_confirm" string="Done" states='draft' icon="gtk-ok" />
|
||||
<button name="cur_cancel" string="Cancel" states='draft' icon="gtk-cancel" />
|
||||
<button name="cur_cancel_draft" string="do_draft" states='cancel' icon="gtk-ok" />
|
||||
<button name="%(report_hotel_currency)d" states='done' type="action" string="Print" class="oe_highlight" />
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,done" />
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title ">
|
||||
<label for="name" string="Name" />
|
||||
<h1>
|
||||
<field name="name" select="1" />
|
||||
</h1>
|
||||
</div>
|
||||
<separator string="Details" />
|
||||
<newline />
|
||||
<group colspan="2" col="4">
|
||||
<field name="today_date" />
|
||||
<newline />
|
||||
</group>
|
||||
<group colspan="2" col="4">
|
||||
<field name="folio_no" required="1" />
|
||||
<field name="guest_name" required="1" />
|
||||
<field name="room_number" required="1" />
|
||||
<field name="hotel_id" />
|
||||
<field name="type" />
|
||||
</group>
|
||||
<separator string="Currency Exchange" />
|
||||
<newline />
|
||||
<group colspan="2" col="4">
|
||||
<field name="input_curr" />
|
||||
<field name="in_amount" select="1" widget="monetary"
|
||||
options="{'currency_field': 'input_curr'}" />
|
||||
<field name="out_curr" />
|
||||
<field name="rate" />
|
||||
</group>
|
||||
<group colspan="2" col="4">
|
||||
<field name="out_amount" widget="monetary"
|
||||
options="{'currency_field': 'out_curr'}" />
|
||||
<newline />
|
||||
<field name="tax" style="width:15%%;" />
|
||||
</group>
|
||||
<separator string="Total Amount" />
|
||||
<newline />
|
||||
<h1>
|
||||
<field name="total" widget="monetary" options="{'currency_field': 'out_curr'}" />
|
||||
</h1>
|
||||
<group colspan="2" col="4"></group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Tree view of currency exchange -->
|
||||
<record model="ir.ui.view" id="view_currency_exchange_tree">
|
||||
<field name="name">currency.exchange.tree</field>
|
||||
<field name="model">currency.exchange</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string=" Currency Exchange">
|
||||
<field name="name" />
|
||||
<field name="today_date" />
|
||||
<field name="guest_name" />
|
||||
<field name="total" sum="Total" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action of currency exchange -->
|
||||
<record model="ir.actions.act_window" id="open_currency_exchange_tree">
|
||||
<field name="name">Currency Exchange</field>
|
||||
<field name="res_model">currency.exchange</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
210
hotel/views/hotel_dashboard.xml
Normal file
210
hotel/views/hotel_dashboard.xml
Normal file
@@ -0,0 +1,210 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="dashboard_sales_action_id" model="ir.actions.act_window">
|
||||
<field name="name">Folios</field>
|
||||
<field name="res_model">hotel.dashboard</field>
|
||||
</record>
|
||||
|
||||
<record id="dashboard_sales_order_action_id" model="ir.actions.act_window">
|
||||
<field name="name">Folios</field>
|
||||
<field name="res_model">hotel.dashboard</field>
|
||||
</record>
|
||||
|
||||
<record id="dashboard_sales_done_action_id" model="ir.actions.act_window">
|
||||
<field name="name">Folios</field>
|
||||
<field name="res_model">hotel.dashboard</field>
|
||||
</record>
|
||||
|
||||
<record id="dashboard_sales_cancel_action_id" model="ir.actions.act_window">
|
||||
<field name="name">Folios</field>
|
||||
<field name="res_model">hotel.dashboard</field>
|
||||
</record>
|
||||
|
||||
<record id="hotel_dashboard_kanban_view" model="ir.ui.view">
|
||||
<field name="name">hotel.dashboard.view</field>
|
||||
<field name="model">hotel.dashboard</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban create="false" class="oe_background_grey o_kanban_dashboard o_account_kanban">
|
||||
<field name="id"/>
|
||||
<field name="name"/>
|
||||
<field name="graph_type"/>
|
||||
<field name="show_on_dashboard"/>
|
||||
<field name="kanban_dashboard"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="#{kanban_color(0)}">
|
||||
<t t-value="JSON.parse(record.kanban_dashboard.raw_value)" t-set="dashboard"/>
|
||||
<t t-value="record.type.raw_value" t-set="journal_type"/>
|
||||
<t t-value="record.name.raw_value" t-set="dashboard_name"/>
|
||||
<t t-value="record.graph_type.raw_value" t-set="graph_type"/>
|
||||
<t t-call="JournalTop"/>
|
||||
<div class="container o_kanban_card_content o_visible">
|
||||
<div class="row">
|
||||
<t t-if="dashboard_name == 'Chekins Dashboard'" t-call="JournalBodySalePurchase"/>
|
||||
<t t-if="dashboard_name != 'Chekins Dashboard'" t-call="JournalBodySalePurchase"/>
|
||||
</div>
|
||||
<t t-call="JournalBodyGraph"/>
|
||||
</div><div class="container o_kanban_card_manage_pane o_invisible">
|
||||
<t t-call="JournalManage"/>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="JournalTop">
|
||||
<div class="o_kanban_card_header">
|
||||
<div class="o_kanban_card_header_title">
|
||||
<div class="o_primary">
|
||||
<a type="object" name="open_action"><field name="name"/></a>
|
||||
</div>
|
||||
<div class="o_secondary" t-att-title="dashboard.title">
|
||||
<field name="type"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="o_kanban_manage_button_section">
|
||||
<a class="o_kanban_manage_toggle_button" href="#">More <i class="fa fa-caret-down"/></a>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<t t-name="JournalManage">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 o_kanban_card_manage_section o_kanban_manage_view">
|
||||
<div class="o_kanban_card_manage_title">
|
||||
<span>View</span>
|
||||
</div>
|
||||
<div>
|
||||
<a>
|
||||
<span>Invoices</span>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a>
|
||||
<span>Refunds</span>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a>Payments Matching</a>
|
||||
</div>
|
||||
<div>
|
||||
<a>Journal Items</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-4 o_kanban_card_manage_section o_kanban_manage_new">
|
||||
<div class="o_kanban_card_manage_title">
|
||||
<span>New</span>
|
||||
</div>
|
||||
<div>
|
||||
<a>
|
||||
<span>Invoice</span>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a>
|
||||
<span>Refund</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-4 o_kanban_card_manage_section o_kanban_manage_reports">
|
||||
<div class="o_kanban_card_manage_title">
|
||||
<span>Reports</span>
|
||||
</div>
|
||||
<div>
|
||||
<a>Invoices Analysis</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row o_kanban_card_settings">
|
||||
<div class="col-xs-6">
|
||||
<a><i t-attf-class="fa o_dashboard_star #{record.show_on_dashboard.raw_value ? 'fa-star' : 'fa-star-o'}" title="Click to add/remove from favorite"/> Favorite</a>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<a type="edit">Settings</a>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
|
||||
<t t-name="JournalBodySalePurchase">
|
||||
<div class="col-xs-6 o_kanban_primary_left">
|
||||
<t>
|
||||
<button type="object" name="action_create_new" class="btn btn-primary btn-sm o_invoice_new">
|
||||
<span>New</span>
|
||||
</button>
|
||||
</t>
|
||||
</div>
|
||||
<div class="col-xs-6 o_kanban_primary_right">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<a type="object" name="open_action" context="{'search_default_draft': '1', 'search_default_proforma': '1'}">
|
||||
<span> Draft</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span><t t-esc="dashboard.sum_draft"/></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<a type="object" name="open_action" context="{'search_default_unpaid': '1'}">
|
||||
<span> Payments to do</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span><t t-esc="dashboard.sum_waiting"/></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="JournalBodyGraph">
|
||||
|
||||
<div class="o_kanban_graph_section">
|
||||
<span t-if="graph_type == 'line'">
|
||||
<field name="kanban_dashboard_graph" t-att-graph_type="'line'" widget="dashboard_graph"/>
|
||||
</span>
|
||||
<span t-if="graph_type == 'bar'">
|
||||
<field name="kanban_dashboard_graph" t-att-graph_type="'bar'" widget="dashboard_graph"/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="hotel_dashboard_action" model="ir.actions.act_window">
|
||||
<field name="name">Hotel Dashboard</field>
|
||||
<field name="res_model">hotel.dashboard</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="context">{}</field>
|
||||
<field name="view_mode">kanban</field>
|
||||
<field name="view_id" ref="hotel_dashboard_kanban_view"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="employees_dashboard_menu"
|
||||
parent="hotel_management_menu"
|
||||
sequence="1"
|
||||
name="Dashboard"
|
||||
action="hotel_dashboard_action"/>
|
||||
|
||||
|
||||
<data noupdate="0">
|
||||
<record model="hotel.dashboard" id="chekins_dashboard">
|
||||
<field name="name">Chekins Dashboard</field>
|
||||
<field name="type">sales</field>
|
||||
<field name="graph_type">bar</field>
|
||||
<field name="show_on_dashboard">1</field>
|
||||
</record>
|
||||
<record model="hotel.dashboard" id="onboard_dashboard">
|
||||
<field name="name">On Board</field>
|
||||
<field name="type">sales</field>
|
||||
<field name="graph_type">line</field>
|
||||
<field name="show_on_dashboard">1</field>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
</odoo>
|
||||
45
hotel/views/hotel_floor.xml
Normal file
45
hotel/views/hotel_floor.xml
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!--==================================================== Floor ==================================================== -->
|
||||
<!-- Form view of hotel floor -->
|
||||
<record model="ir.ui.view" id="view_hotel_floor_form">
|
||||
<field name="name">hotel.floor.form</field>
|
||||
<field name="model">hotel.floor</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string=" Hotel Ubication">
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name" colspan="1" />
|
||||
<field name="sequence" select="1" />
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Tree view of hotel floor -->
|
||||
<record model="ir.ui.view" id="view_hotel_floor_tree">
|
||||
<field name="name">hotel.floor.tree</field>
|
||||
<field name="model">hotel.floor</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string=" Hotel Ubications">
|
||||
<field name="name" colspan="1" />
|
||||
<field name="sequence" select="1" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action of hotel floor -->
|
||||
<record model="ir.actions.act_window" id="open_hotel_floor_form_tree">
|
||||
<field name="name">Floor Structure</field>
|
||||
<field name="res_model">hotel.floor</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Ubitacions" id="menu_open_hotel_floor_form_tree"
|
||||
action="open_hotel_floor_form_tree" sequence="21"
|
||||
parent="hotel.configuration_others" />
|
||||
|
||||
</odoo>
|
||||
611
hotel/views/hotel_folio.xml
Normal file
611
hotel/views/hotel_folio.xml
Normal file
@@ -0,0 +1,611 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!--=== Hotel Folio ==== -->
|
||||
<!-- Form view of hotel folio -->
|
||||
<record model="ir.ui.view" id="view_hotel_folio1_form">
|
||||
<field name="name">hotel.folio.form</field>
|
||||
<field name="model">hotel.folio</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Folio">
|
||||
<header>
|
||||
<!-- <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" /> -->
|
||||
<button name="action_confirm" states="draft" string="Confirm Sale"
|
||||
class="btn-primary" type="object" />
|
||||
<!-- <button name="send_reservation_mail" type="object" string="Send Confirmation Email"
|
||||
attrs="{'invisible': [('has_confirmed_reservations_to_send', '=', False)]}" class="oe_highlight"/> -->
|
||||
<!-- <button name="send_cancel_mail" type="object" string="Send Cancel Email"
|
||||
attrs="{'invisible': [('has_cancelled_reservations_to_send', '=', False)]}" class="oe_highlight"/> -->
|
||||
<!-- <button name="send_exit_mail" type="object" string="Send Exit Email"
|
||||
attrs="{'invisible': [('has_checkout_to_send', '=', False)]}" class="oe_highlight"/> -->
|
||||
<!-- <button name="%(hotel.action_view_folio_advance_payment_inv)d"
|
||||
string="Create Invoice" type="action" class="btn-primary" states="sale"
|
||||
attrs="{'invisible': [('invoice_status', '!=', 'to invoice')]}"/> -->
|
||||
<!-- <button name="action_cancel_draft" states="cancel,sale" string="Set to Draft"
|
||||
type="object" icon="fa-undo" class="oe_highlight" /> -->
|
||||
<button name="action_cancel" string="Cancel Folio" states="sale"
|
||||
type="object" icon="fa-minus-square" class="oe_highlight" />
|
||||
<button name="action_cancel" string="Cancel Folio" states="draft"
|
||||
icon="fa-minus-square" type="object" class="oe_highlight" />
|
||||
<button name="action_done" type="object" string="Set to Done"
|
||||
help="If a Hotel Folio is done, you cannot modify it manually anymore. However, you will still be able to invoice or deliver. This is used to freeze the Hotel Folio." />
|
||||
<!-- states="sale" attrs="{'invisible': [('invoice_status', '!=', 'invoiced')]}" -->
|
||||
<!-- <button name="print_quotation" string="Print" type="object" states="sent,sale"/> -->
|
||||
<field name="state" select="2" widget="statusbar"
|
||||
statusbar_visible="draft,sent,sale,done" invisible="1"/>
|
||||
</header>
|
||||
|
||||
<sheet>
|
||||
<div class=" oe_button_box">
|
||||
<button type="action" class="oe_stat_button"
|
||||
id="cardex_smart_button"
|
||||
icon="fa-user-plus"
|
||||
name="%(launch_checkin_wizard_add)d"
|
||||
attrs="{'invisible': [('cardex_pending_num','<=',0)]}"
|
||||
context="{'partner_id': partner_id,'reservation_ids': room_lines,
|
||||
'hidden_cardex': True, 'folio': active_id}">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value"><field name="cardex_pending_num"
|
||||
widget="statinfo" nolabel="1"/></span>
|
||||
<span class="o_stat_text">Pending Checks</span>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<button type="object" class="oe_stat_button"
|
||||
id="cardex_smart_button"
|
||||
icon="fa-users"
|
||||
name="action_checks"
|
||||
attrs="{'invisible': [('cardex_count','<=',0)]}">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value"><field name="cardex_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"
|
||||
name="action_payments"
|
||||
attrs="{'invisible': [('invoices_paid','<=',0)]}">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="invoices_paid" nolabel="1"
|
||||
widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Paid out</span>
|
||||
</div>
|
||||
</button> -->
|
||||
|
||||
<!-- <button type="object" class="oe_stat_button"
|
||||
id="payment_smart_button"
|
||||
icon="fa-money"
|
||||
name="action_pay"
|
||||
attrs="{'invisible': ['|',('invoices_amount','<=',0)]}">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="invoices_amount" nolabel="1"
|
||||
widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Pending Payment</span>
|
||||
</div>
|
||||
</button> -->
|
||||
|
||||
<!-- <button type="object" class="oe_stat_button"
|
||||
id="payment_smart_button"
|
||||
icon="fa-money"
|
||||
name="action_recalcule_payment"
|
||||
help="Calcule the total Price">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_text">Calcule Price</span>
|
||||
</div>
|
||||
</button> -->
|
||||
|
||||
<!-- <button type="object" class="oe_stat_button"
|
||||
id="refunds_smart_button"
|
||||
icon="fa-undo"
|
||||
name="action_return_payments"
|
||||
attrs="{'invisible': [('refund_amount','<=',0)]}">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="refund_amount" nolabel="1"
|
||||
widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Refunds</span>
|
||||
</div>
|
||||
</button> -->
|
||||
|
||||
<!-- <button type="object" class="oe_stat_button" id="invoice_button"
|
||||
icon="fa-pencil-square-o" name="open_invoices_folio"
|
||||
attrs="{'invisible': [('num_invoices', '=', 0)]}"
|
||||
context="{'default_folio_id': active_id}">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="num_invoices"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Invoices</span>
|
||||
</div>
|
||||
</button> -->
|
||||
|
||||
</div>
|
||||
<!-- <field name="image" widget="image" class="oe_avatar" options="{"preview_image": "image_medium", "size": [90, 90]}"/> -->
|
||||
<h2><field name="name"/></h2>
|
||||
<h1>
|
||||
<field name="partner_id" default_focus="1" placeholder="Guest"/>
|
||||
</h1>
|
||||
<group>
|
||||
<group>
|
||||
<field name="email" placeholder="email"/>
|
||||
<field name="mobile" placeholder="mobile"/>
|
||||
<field name="phone" />
|
||||
<field name="cancelled_reason" attrs="{'invisible':[('state','not in',('cancel'))]}"/>
|
||||
</group>
|
||||
<group>
|
||||
<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"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="internal_comment"/>
|
||||
</group>
|
||||
</group>
|
||||
<group invisible="1">
|
||||
<!-- <field name="pricelist_id" domain="[('type','=','sale')]" invisible="1"/> -->
|
||||
<!-- <field name="partner_shipping_id" invisible="1" domain="[('parent_id','=',partner_id)]" /> -->
|
||||
<!-- <field name="warehouse_id" string="Branch" invisible="1"/> -->
|
||||
<field name="invoice_ids" invisible="1"/>
|
||||
<field name="invoice_status" invisible="1" />
|
||||
<!-- <field name="hotel_invoice_id" states='progress,done,cancel'
|
||||
readonly="1" invisible="1" /> -->
|
||||
<!-- <field name="fix_price" invisible="1" /> -->
|
||||
</group>
|
||||
<notebook colspan="4" col="1">
|
||||
<page string="Lines">
|
||||
<field name="room_lines" colspan="4" string="Room Line"
|
||||
nolabel="1" context="{'room_lines':room_lines,'folio_id': id}">
|
||||
<tree string="Rooms"
|
||||
colors="red:state == 'cancelled'"
|
||||
default_order="id"
|
||||
delete="false"
|
||||
options="{'no_open': True}">
|
||||
<button type="object" class="oe_stat_button"
|
||||
id="splitted" icon="fa fa-1x fa-chain-broken"
|
||||
name="open_master"
|
||||
attrs="{'invisible':[('splitted','=', False)]}"
|
||||
/>
|
||||
<field name="folio_id" invisible="1"/>
|
||||
<field name="state" />
|
||||
<button type="action" class="oe_stat_button"
|
||||
id="cardex_smart_button" icon="fa fa-1x fa-user-plus"
|
||||
name="%(launch_checkin_wizard_add)d"
|
||||
context="{'partner_id': partner_id,'enter_date': checkin,
|
||||
'exit_date': checkout,'reservation_id': id, 'hidden_cardex': True, 'edit_cardex': True }"
|
||||
attrs="{'invisible':['|','|', ('state','not in',('confirm','booking')),
|
||||
('cardex_pending','=', False),('parent_reservation','!=',False)]}"
|
||||
/>
|
||||
<field name="partner_id"/>
|
||||
<field name="splitted" invisible="1" />
|
||||
<field name="parent_reservation" invisible="1" />
|
||||
<!-- <field name="virtual_room_id" string="Reserved Room Type"/> -->
|
||||
<field name="room_type_id" string="Reserved Room Type"/>
|
||||
<field name="nights" />
|
||||
<field name="adults" string="Persons"/>
|
||||
<field name="checkin" widget="date"/>
|
||||
<field name="checkout" widget="date"/>
|
||||
<field name="cardex_ids" invisible ="1"/>
|
||||
<field name="to_assign" invisible="1"/>
|
||||
<field name="cardex_pending" invisible="1"/>
|
||||
<!-- <field name="qty_delivered" invisible="1"/> -->
|
||||
<!-- attrs="{'readonly': [('qty_delivered_updateable', '=', False)]}"/> -->
|
||||
<!-- <field name="qty_invoiced" invisible="1"/> -->
|
||||
<!-- <field name="qty_to_invoice" invisible="1"/> -->
|
||||
<!-- <field name="product_uom"
|
||||
attrs="{'readonly': [('state', 'in', ('sale','done', 'cancel'))]}"
|
||||
context="{'company_id': parent.company_id}"
|
||||
groups="product.group_uom" options='{"no_open": True}'
|
||||
invisible="1"/> -->
|
||||
<!-- <field name="analytic_tag_ids" groups="analytic.group_analytic_accounting" widget="many2many_tags" invisible="1"/> -->
|
||||
<!-- <field name="tax_id" widget="many2many_tags" domain="[('type_tax_use','=','sale'),('company_id','=',parent.company_id)]"
|
||||
invisible="1"/> -->
|
||||
<!-- <field name="qty_delivered_updateable" invisible="1"/> -->
|
||||
<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_unit" invisible="1"/> -->
|
||||
<field name="amount_room" string="Reservation Price" readonly="1"/>
|
||||
<field name="amount_discount" string="Final Price"/>
|
||||
<button type="object" class="oe_stat_button"
|
||||
id="go_reservation" icon="fa fa-2x fa-bars"
|
||||
name="open_reservation_form"/>
|
||||
</tree>
|
||||
<form string="Reservation" >
|
||||
<sheet>
|
||||
<header>
|
||||
<field name="splitted" invisible="1" />
|
||||
<field name="shared_folio" invisible="1"/>
|
||||
<field name="folio_id" invisible="1" />
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="parent_reservation" invisible="True" />
|
||||
<!-- <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" /> -->
|
||||
<!--<button name="send_reservation_mail" type="object" string="Send Reservation Email" states="confirm" class="oe_highlight"/>-->
|
||||
<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"
|
||||
attrs="{'invisible':['|',('folio_id', '=', False),('state','not in',('confirm','booking'))]}"
|
||||
/>
|
||||
<button name="action_reservation_checkout" string="Done"
|
||||
states="booking" class="oe_highlight"
|
||||
type="object"
|
||||
/>
|
||||
<button name="draft" string="Set to Draft"
|
||||
states="cancelled" class="oe_highlight"
|
||||
type="object"
|
||||
/>
|
||||
<button name="%(action_hotel_split_reservation)d" string="Split"
|
||||
type="action" class="oe_highlight"
|
||||
icon="fa-cut"
|
||||
attrs="{'invisible':['|',('folio_id', '=', False),('state','not in',('draft','confirm','booking'))]}"
|
||||
/>
|
||||
<button name="unify" string="Unify"
|
||||
type="object" class="oe_highlight"
|
||||
icon="fa-compress"
|
||||
attrs="{'invisible':[('splitted', '=', False)]}"
|
||||
/>
|
||||
<label for="preconfirm"
|
||||
string="Autoconfirm"
|
||||
attrs="{'invisible':[('folio_id', '!=', False)]}"
|
||||
/>
|
||||
<span name="preconfirm" attrs="{'invisible':[('folio_id', '!=', False)]}">
|
||||
<field name="preconfirm" />
|
||||
</span>
|
||||
<!--button name="open_master" string="Open Master" type="object" class="oe_highlight" icon="fa-file" attrs="{'invisible':['|',['parent_reservation', '=', False]]}" /-->
|
||||
<field name="state" widget="statusbar"/>
|
||||
</header>
|
||||
<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>
|
||||
<h3>
|
||||
<!-- <field name="room_id" select="1" domain="[('isroom','=',True)]"
|
||||
nolabel="1" options="{'no_create': True,'no_open': True}" placeholder="Room"
|
||||
style="margin-right: 30px;"/> -->
|
||||
From <span class="fa fa-sign-in" style="margin: 5px;"/><field name="checkin" style="margin-right: 10px;"/> to
|
||||
<span class="fa fa-sign-out" style="margin-right: 5px;"/><field name="checkout" />
|
||||
</h3>
|
||||
|
||||
<group col="6">
|
||||
<group string="General Info" name="contact_details" invisible="1">
|
||||
<field name="email" placeholder="email" widget="email" />
|
||||
<field name="mobile" placeholder="mobile" widget="phone" />
|
||||
<field name="phone" placeholder="phone" widget="phone" />
|
||||
<field name="partner_internal_comment" string="Partner Note"/>
|
||||
</group>
|
||||
<group colspan="4" string="Reservation Details" name="reservation_details">
|
||||
<field name="cancelled_reason" attrs="{'invisible':[('state','not in',('cancelled'))]}"/>
|
||||
<field name="name"/>
|
||||
<field name="adults"/>
|
||||
<field name="children"/>
|
||||
<!-- <field name="virtual_room_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">
|
||||
<!-- <field name="amount_room" widget="monetary" options="{'currency_field': 'currency_id'}"/> -->
|
||||
<!-- <field name="discount" string="Room Discount" attrs="{'invisible': [('discount_type','=','fixed')]}" /> -->
|
||||
<field name="discount_fixed" string="Room Discount" attrs="{'invisible': [('discount_type','=','percent')]}" />
|
||||
<field name="discount_type" widget="radio" options="{'horizontal': true}" nolabel="1" colspan="2"/>
|
||||
<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"/>
|
||||
</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" invisible="1"/>
|
||||
<!-- <field name="qty_delivered_updateable" invisible="1"/> -->
|
||||
<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" invisible="1"/>
|
||||
<!-- <field name="price_unit" invisible="1"/> -->
|
||||
</group>
|
||||
</group>
|
||||
<group invisible="1">
|
||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
||||
<!-- <field name="check_rooms" invisible="1"/> -->
|
||||
<field name="cardex_pending" invisible="1"/>
|
||||
<!-- <field name="pricelist_id" invisible="1"/> -->
|
||||
<field name="nights" invisible="1"/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="days" string="Service and Days">
|
||||
<group col="9">
|
||||
<group colspan="6" string="Reservation Services" name="reservation_services" attrs="{'invisible': [('folio_id','=',False)]}">
|
||||
<field name="service_line_ids"
|
||||
context="{'default_ser_room_line': active_id, 'default_folio_id': folio_id}"
|
||||
nolabel="1" style="padding-right:10px !important;">
|
||||
<tree string="Services" editable="bottom">
|
||||
<field name="folio_id" invisible="1"/>
|
||||
<!-- <field name="layout_category_id" groups="sale.group_sale_layout"/> -->
|
||||
<field name="name"/>
|
||||
<field name="ser_room_line" invisible="1" />
|
||||
<!-- <field name="product_uom_qty"
|
||||
string="Ordered Qty"
|
||||
context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'uom':product_uom, 'company_id': parent.company_id}"
|
||||
/> -->
|
||||
<!-- <field name="qty_delivered" invisible="1"/> -->
|
||||
<!-- attrs="{'readonly': [('qty_delivered_updateable', '=', False)]}" -->
|
||||
<!-- <field name="qty_invoiced" invisible="1"/> -->
|
||||
<!-- <field name="qty_to_invoice" invisible="1"/> -->
|
||||
<!-- <field name="product_uom"
|
||||
attrs="{'readonly': [('state', 'in', ('sale','done', 'cancel'))]}"
|
||||
context="{'company_id': parent.company_id}"
|
||||
groups="product.group_uom" options='{"no_open": True}'/> -->
|
||||
<!-- <field name="analytic_tag_ids" groups="analytic.group_analytic_accounting" widget="many2many_tags"/> -->
|
||||
<!-- <field name="price_unit"
|
||||
attrs="{'readonly': [('qty_invoiced', '>', 0)]}"/> -->
|
||||
<!-- <field name="tax_id" widget="many2many_tags" invisible="1"/> -->
|
||||
<!-- <field name="discount" groups="sale.group_discount_per_so_line"/> -->
|
||||
<!-- <field name="price_subtotal" widget="monetary" invisible="1"/> -->
|
||||
<!-- <field name="price_total" widget="monetary"/> -->
|
||||
<!-- <field name="qty_delivered_updateable" invisible="1"/> -->
|
||||
<!-- <field name="state" invisible="1"/> -->
|
||||
<!-- <field name="invoice_status" invisible="1"/> -->
|
||||
<!-- <field name="customer_lead" invisible="1"/> -->
|
||||
<!-- <field name="currency_id" invisible="1"/> -->
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<group colspan="3" string="Days" name="days">
|
||||
<field name="reservation_line_ids" nolabel="1">
|
||||
<tree create="false" delete="false" editable="bottom">
|
||||
<field name="date" readonly="True" />
|
||||
<field name="price" />
|
||||
<field name="discount" />
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page name="others" string="Others">
|
||||
<group>
|
||||
<group>
|
||||
<field name="segmentation_ids" widget="many2many_tags" placeholder="Segmentation..."
|
||||
options="{'no_create': True,'no_open': True}" />
|
||||
<field name="overbooking" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="reservation_type" />
|
||||
<field name="out_service_description"
|
||||
attrs="{'invisible':[('reservation_type','not in',('out'))]}"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
<separator string="Service Lines" colspan="4"/>
|
||||
<field name="service_line_ids"
|
||||
context="{'default_folio_id': active_id}"
|
||||
nolabel="1">
|
||||
<tree string="Services" editable="bottom">
|
||||
<field name="folio_id" invisible="1"/>
|
||||
<!-- <field name="layout_category_id" groups="sale.group_sale_layout"/> -->
|
||||
<field name="product_id"
|
||||
domain="[('sale_ok', '=', True),('is_room_type', '=', False)]"
|
||||
options="{'create': False, 'create_edit': False}" />
|
||||
<field name="name"/>
|
||||
<field name="list_price"/>
|
||||
<field name="ser_room_line" options="{'create': False, 'create_edit': False}"/>
|
||||
<!-- <field name="product_uom_qty"
|
||||
string="Ordered Qty"
|
||||
context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'uom':product_uom, 'company_id': parent.company_id}"
|
||||
/> -->
|
||||
<!-- <field name="qty_delivered" invisible="1"/> -->
|
||||
<!-- attrs="{'readonly': [('qty_delivered_updateable', '=', False)]}"/> -->
|
||||
<!-- <field name="qty_invoiced" invisible="1"/> -->
|
||||
<!-- <field name="qty_to_invoice" invisible="1"/> -->
|
||||
<!-- <field name="product_uom"
|
||||
attrs="{'readonly': [('state', 'in', ('sale','done', 'cancel'))]}"
|
||||
context="{'company_id': parent.company_id}"
|
||||
groups="product.group_uom" options='{"no_open": True}'/> -->
|
||||
<!-- <field name="analytic_tag_ids" groups="analytic.group_analytic_accounting" widget="many2many_tags"/> -->
|
||||
<!-- <field name="price_unit"
|
||||
attrs="{'readonly': [('qty_invoiced', '>', 0)]}"/> -->
|
||||
<!-- <field name="tax_id" widget="many2many_tags" domain="[('type_tax_use','=','sale'),('company_id','=',parent.company_id)]"
|
||||
attrs="{'readonly': [('qty_invoiced', '>', 0)]}"/> -->
|
||||
<!-- <field name="discount" groups="sale.group_discount_per_so_line"/> -->
|
||||
<!-- <field name="price_subtotal" widget="monetary" invisible="1"/> -->
|
||||
<!-- <field name="price_total" widget="monetary"/> -->
|
||||
<!-- <field name="qty_delivered_updateable" invisible="1"/> -->
|
||||
<!-- <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="channel_type" sttrs="{'invisible':[('channel_type', '!=', 'call')]"/>
|
||||
</tree>
|
||||
</field>
|
||||
<div class="oe_clear" />
|
||||
<group>
|
||||
<field name="note" />
|
||||
</group>
|
||||
</page>
|
||||
<page string="Other data" invisible="1">
|
||||
<group>
|
||||
<field name="user_id" />
|
||||
<field name="client_order_ref" />
|
||||
</group>
|
||||
</page>
|
||||
<!-- <page string="Foreign Exchange" name="foreign exchange" invisible="1">
|
||||
<separator string="Foreign Exchange" colspan="4" />
|
||||
<field name="currrency_ids" colspan="4" nolabel="1">
|
||||
<tree>
|
||||
<field name="name" />
|
||||
<field name="today_date" />
|
||||
<field name="type" />
|
||||
<field name="in_amount" />
|
||||
<field name="input_curr" />
|
||||
<field name="total" sum="Total Amount" />
|
||||
<field name="out_curr" />
|
||||
</tree>
|
||||
</field>
|
||||
</page> -->
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Tree view of hotel folio -->
|
||||
<record model="ir.ui.view" id="view_hotel_folio1_tree">
|
||||
<field name="name">hotel.folio.tree</field>
|
||||
<field name="model">hotel.folio</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Hotel Folio" decoration-info="state == 'draft'"
|
||||
decoration-muted="state == 'cancel'"
|
||||
default_order="create_date desc">
|
||||
<field name="state"/>
|
||||
<field name="name"/>
|
||||
<field name="partner_id" select="1"/>
|
||||
<field name="date_order" select="1"/>
|
||||
<field name="rooms_char" string="Rooms"/>
|
||||
<field name="amount_total" sum="Total amount"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Folio Kanban View -->
|
||||
<record model="ir.ui.view" id="hotel_folio_kanban_view">
|
||||
<field name="name">hotel.folio.kanban</field>
|
||||
<field name="model">hotel.folio</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban class="o_res_partner_kanban" limit="80">
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="room_lines"/>
|
||||
<field name="service_line_ids"/>
|
||||
<field name="invoices_amount"/>
|
||||
<field name="refund_amount"/>
|
||||
<field name="invoices_paid"/>
|
||||
<field name="booking_pending"/>
|
||||
<field name="cardex_count"/>
|
||||
<field name="cardex_pending"/>
|
||||
<field name="cardex_pending_num"/>
|
||||
<field name="checkins_reservations"/>
|
||||
<field name="checkouts_reservations"/>
|
||||
<field name="partner_internal_comment"/>
|
||||
<field name="cancelled_reason"/>
|
||||
<field name="prepaid_warning_days"/>
|
||||
<field name="date_order"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_kanban_global_click o_res_partner_kanban">
|
||||
<div class="o_kanban_tags_section oe_kanban_partner_categories"/>
|
||||
<div class="oe_kanban_details">
|
||||
<strong class="oe_partner_heading"><field name="partner_id"/></strong>
|
||||
<ul>
|
||||
<li t-if="record.name.raw_value"><field name="name"/></li>
|
||||
<span t-if="record.cardex_count.value>0" class="badge"><i class="fa fa-fw fa-bed"/><t t-esc="record.cardex_count.value"/></span>
|
||||
<span t-if="record.cardex_pending_num.value>0" class="badge"><i class="fa fa-fw fa-user-plus"/><t t-esc="record.cardex_pending_num.value"/></span>
|
||||
</ul>
|
||||
<div class="oe_kanban_partner_links"/>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Search view of hotel folio -->
|
||||
<record model="ir.ui.view" id="view_hotel_folio_search">
|
||||
<field name="name">hotel.folio.search</field>
|
||||
<field name="model">hotel.folio</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Tables Detail">
|
||||
<field name="partner_id" />
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Customer" icon="terp-stock_symbol-selection"
|
||||
context="{'group_by':'partner_id'}" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!--graph view of hotel folio -->
|
||||
<record id="view_hotel_folio_graph" model="ir.ui.view">
|
||||
<field name="name">view.hotel.folio.graph</field>
|
||||
<field name="model">hotel.folio</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph type="bar">
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Add create invoice merge folio -->
|
||||
|
||||
<act_window id="action_view_folio_advance_payment_inv"
|
||||
name="Invoice Folio"
|
||||
src_model="hotel.folio"
|
||||
res_model="folio.advance.payment.inv"
|
||||
key2="client_action_multi" target="new"
|
||||
view_mode="form" multi="True"/>
|
||||
|
||||
<act_window name="Send Confirm Mail"
|
||||
res_model="mail.compose.message"
|
||||
src_model="hotel.folio"
|
||||
view_mode="form"
|
||||
multi="False"
|
||||
view_type="form"
|
||||
target="new"
|
||||
key2="client_action_multi"
|
||||
id="action_view_folio_send_confirm_mail"
|
||||
context="{
|
||||
'default_model': 'hotel.folio',
|
||||
'default_res_id': active_id,
|
||||
'default_use_template': True,
|
||||
'default_template_id': ref('hotel.mail_template_hotel_reservation'),
|
||||
'default_composition_mode': 'comment',
|
||||
'force_send': True,
|
||||
'mark_so_as_sent': True,
|
||||
}" />
|
||||
|
||||
<!-- Action for hotel folio -->
|
||||
<record model="ir.actions.act_window" id="open_hotel_folio1_form_tree_all">
|
||||
<field name="name">Hotel Folio</field>
|
||||
<field name="res_model">hotel.folio</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_all_folio" name="Folio"
|
||||
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" />
|
||||
|
||||
</odoo>
|
||||
24
hotel/views/hotel_report.xml
Normal file
24
hotel/views/hotel_report.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!--Report for hotel folio -->
|
||||
<report
|
||||
id="report_hotel_management"
|
||||
string="Hotel Folio"
|
||||
model="hotel.folio"
|
||||
report_type="qweb-pdf"
|
||||
file="hotel.report_hotel_folio"
|
||||
name="hotel.report_hotel_folio"
|
||||
menu="False" />
|
||||
|
||||
<!--Report for currency exchange -->
|
||||
<report
|
||||
id="report_hotel_currency"
|
||||
string="Encashment Certificate"
|
||||
model="currency.exchange"
|
||||
report_type="qweb-pdf"
|
||||
file="hotel.report_currency_exchange"
|
||||
name="hotel.report_currency_exchange"
|
||||
menu="False" />
|
||||
|
||||
</odoo>
|
||||
447
hotel/views/hotel_reservation.xml
Normal file
447
hotel/views/hotel_reservation.xml
Normal file
@@ -0,0 +1,447 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- Action for hotel reservation -->
|
||||
<record model="ir.actions.act_window" id="open_hotel_reservation_form_tree_all">
|
||||
<field name="name">Hotel Reservation</field>
|
||||
<field name="res_model">hotel.reservation</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph,pivot</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Reservation Rooms" id="menu_open_hotel_reservation_form_tree_all"
|
||||
action="open_hotel_reservation_form_tree_all" sequence="10" parent="menu_all_folio"/>
|
||||
|
||||
<!--=== Hotel Reservation ==== -->
|
||||
<!-- Form view of hotel reservation -->
|
||||
<record model="ir.ui.view" id="view_hotel_reservation_form">
|
||||
<field name="name">hotel.reservation.form</field>
|
||||
<field name="model">hotel.reservation</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Reservation" >
|
||||
<header>
|
||||
<field name="splitted" invisible="True" />
|
||||
<field name="parent_reservation" invisible="True" />
|
||||
<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" />
|
||||
<button name="send_reservation_mail" type="object" string="Send Confirmation Email"
|
||||
attrs="{'invisible': [('has_confirmed_reservations_to_send', '=', False)]}" class="oe_highlight"/>
|
||||
<button name="send_cancel_mail" type="object" string="Send Cancel Email"
|
||||
attrs="{'invisible': [('has_cancelled_reservations_to_send', '=', False)]}" class="oe_highlight"/>
|
||||
<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"/>
|
||||
<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"
|
||||
attrs="{'invisible':['|',('folio_id', '=', False),('state','not in',('confirm','booking'))]}"
|
||||
/>
|
||||
<button name="action_reservation_checkout" string="Done"
|
||||
states="booking" class="oe_highlight"
|
||||
type="object"
|
||||
/>
|
||||
<button name="draft" string="Set to Draft"
|
||||
states="cancelled" class="oe_highlight"
|
||||
type="object"
|
||||
/>
|
||||
<button name="%(action_hotel_split_reservation)d" string="Split"
|
||||
type="action" class="oe_highlight"
|
||||
icon="fa-cut"
|
||||
attrs="{'invisible':['|',('folio_id', '=', False),('state','not in',('draft','confirm','booking'))]}"
|
||||
/>
|
||||
<button name="unify" string="Unify"
|
||||
type="object" class="oe_highlight"
|
||||
icon="fa-compress"
|
||||
attrs="{'invisible':[('splitted', '=', False)]}"
|
||||
/>
|
||||
<label for="preconfirm"
|
||||
string="Autoconfirm"
|
||||
attrs="{'invisible':[('folio_id', '!=', False)]}"
|
||||
/>
|
||||
<span name="preconfirm" attrs="{'invisible':[('folio_id', '!=', False)]}">
|
||||
<field name="preconfirm" />
|
||||
</span>
|
||||
<button name="open_master" string="Open Master" type="object" class="oe_highlight" icon="fa-file" attrs="{'invisible':['|',['parent_reservation', '=', False]]}" />
|
||||
<field name="state" widget="statusbar"/>
|
||||
|
||||
</header>
|
||||
<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>
|
||||
<div class="alert alert-warning" role="alert" style="margin-bottom:0px;"
|
||||
attrs="{'invisible': [('splitted','=',False)]}">
|
||||
This reservation is part of splitted reservation!, 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>
|
||||
<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">
|
||||
<span class="o_stat_text"><field name="folio_id" readonly="1" nolabel="1"/></span>
|
||||
</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"
|
||||
context="{'search_default_partner_id': partner_id}">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_text">Books</span>
|
||||
</div>
|
||||
</button>
|
||||
<!-- <button type="object" class="oe_stat_button"
|
||||
id="payment_smart_button"
|
||||
icon="fa-money"
|
||||
name="action_recalcule_payment"
|
||||
attrs="{'invisible': [('fix_folio_pending','=',False)]}"
|
||||
help="Calcule the total Price">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_text">Calcule Price</span>
|
||||
</div>
|
||||
</button> -->
|
||||
<button type="object" class="oe_stat_button"
|
||||
id="open_master"
|
||||
icon="fa-chain-broken"
|
||||
name="open_master"
|
||||
attrs="{'invisible':[('splitted','=',False)]}">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span><field name="parent_reservation"
|
||||
nolabel="1" readonly="1"/></span>
|
||||
<span class="o_stat_text">Splitted!</span>
|
||||
</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,
|
||||
'exit_date': checkout,'reservation_id': id, 'hidden_cardex': True, 'edit_cardex': True }"
|
||||
attrs="{'invisible':['|', '|', ('state','not in',('confirm','booking')),
|
||||
('cardex_pending','=', False),('parent_reservation','!=',False)]}">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value"><field name="cardex_pending_num"
|
||||
widget="statinfo" nolabel="1"/></span>
|
||||
<span class="o_stat_text">Pending Checks</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="object" class="oe_stat_button"
|
||||
id="checkin_smart_button"
|
||||
icon="fa-users"
|
||||
name="action_checks"
|
||||
attrs="{'invisible': ['|', ('cardex_count','<=',0),
|
||||
('parent_reservation','!=',False)]}">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value"><field name="cardex_count"
|
||||
widget="statinfo" nolabel="1"/></span>
|
||||
<span class="o_stat_text">Checks</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<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>
|
||||
<h1>
|
||||
<!-- <field name="edit_room" nolabel="1" class="fa fa-bed" /> -->
|
||||
<!-- <field name="room_id" select="1" domain="[('isroom','=',True)]"
|
||||
nolabel="1" options="{'no_create': True,'no_open': True}" placeholder="Room"
|
||||
style="margin-right: 30px;"/> -->
|
||||
<field name="room_id" select="1"
|
||||
nolabel="1" options="{'no_create': True,'no_open': True}" placeholder="Room"
|
||||
style="margin-right: 30px;" required='1'/>
|
||||
<field name="partner_id" default_focus="1"
|
||||
placeholder="Lastname, Firstname"
|
||||
attrs="{'readonly':[('folio_id','!=',False)]}"
|
||||
required="1"/>
|
||||
<span class="fa fa-user" style="margin-left:20px;"/>
|
||||
</h1>
|
||||
<h3>
|
||||
From <span class="fa fa-sign-in" style="margin: 5px;"/>
|
||||
<field name="checkin" style="margin-right: 10px;"/>
|
||||
to
|
||||
<span class="fa fa-sign-out" style="margin-right: 5px;"/>
|
||||
<field name="checkout" />
|
||||
</h3>
|
||||
<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="partner_internal_comment" string="Partner Note"/>
|
||||
<field name="cancelled_reason" attrs="{'invisible':[('state','not in',('cancelled'))]}"/>
|
||||
</group>
|
||||
<group colspan="4" string="Reservation Details" name="reservation_details">
|
||||
<field name="name"/>
|
||||
<field name="adults"/>
|
||||
<field name="children"/>
|
||||
<!-- <field name="virtual_room_id" on_change="1" options="{'no_create': True,'no_open': True}"
|
||||
attrs="{'readonly':[('state','not in',('draft'))]}"/> -->
|
||||
<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="amount_room" widget="monetary" options="{'currency_field': 'currency_id'}"/> -->
|
||||
<!-- <field name="discount" string="Room Discount" attrs="{'invisible': [('discount_type','=','fixed')]}" /> -->
|
||||
<field name="discount_fixed" string="Room Discount" attrs="{'invisible': [('discount_type','=','percent')]}" />
|
||||
<field name="discount_type" widget="radio" options="{'horizontal': true}" nolabel="1" colspan="2"/>
|
||||
<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"/>
|
||||
</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" invisible="1"/>
|
||||
<!-- <field name="qty_delivered_updateable" invisible="1"/> -->
|
||||
<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" invisible="1"/>
|
||||
<!-- <field name="price_unit" invisible="1"/> -->
|
||||
<!-- <field name="fix_total" invisible="1" /> -->
|
||||
<!-- <field name="fix_folio_pending" invisible="1" /> -->
|
||||
</group>
|
||||
</group>
|
||||
<field name="folio_internal_comment" nolabel="1" placeholder="Reservation Notes"/>
|
||||
<group invisible="1">
|
||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
||||
<!-- <field name="check_rooms" invisible="1"/> -->
|
||||
<field name="cardex_pending" invisible="1"/>
|
||||
<!-- <field name="pricelist_id" invisible="1"/> -->
|
||||
<field name="nights" invisible="1"/>
|
||||
<!-- <field name="product_uom" string="Rent(UOM)" invisible="1" /> -->
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="days" string="Service and Days">
|
||||
<group col="9">
|
||||
<group colspan="6" string="Reservation Services" name="reservation_services" attrs="{'invisible': [('folio_id','=',False)]}">
|
||||
<field name="service_line_ids"
|
||||
context="{'default_ser_room_line': active_id, 'default_folio_id': folio_id}"
|
||||
nolabel="1" style="padding-right:10px !important;">
|
||||
<!-- <field name="service_line_ids"> -->
|
||||
<tree string="Services" editable="bottom">
|
||||
<!-- <field name="sequence" widget="handle"/> -->
|
||||
<field name="folio_id" invisible="1"/>
|
||||
<field name="product_id"
|
||||
domain="[('sale_ok', '=', True),('is_room_type', '=', False)]"
|
||||
options="{'create': False, 'create_edit': False}" />
|
||||
<!-- <field name="layout_category_id" groups="sale.group_sale_layout"/> -->
|
||||
<field name="name"/>
|
||||
<field name="list_price"/>
|
||||
<!-- <field name="ser_room_line" invisible="1" /> -->
|
||||
<!-- <field name="qty_delivered" invisible="1"
|
||||
attrs="{'readonly': [('qty_delivered_updateable', '=', False)]}"/> -->
|
||||
<!-- <field name="product_uom"
|
||||
attrs="{'readonly': [('state', 'in', ('sale','done', 'cancel'))]}"
|
||||
context="{'company_id': parent.company_id}"
|
||||
groups="product.group_uom" options='{"no_open": True}'/> -->
|
||||
<!-- <field name="analytic_tag_ids" groups="analytic.group_analytic_accounting" widget="many2many_tags"/> -->
|
||||
<!-- <field name="tax_id" widget="many2many_tags" invisible="1"/> -->
|
||||
<!-- <field name="qty_delivered_updateable" invisible="1"/> -->
|
||||
<!-- <field name="state" invisible="1"/> -->
|
||||
<!-- <field name="invoice_status" invisible="1"/> -->
|
||||
<!-- <field name="customer_lead" invisible="1"/> -->
|
||||
<!-- <field name="currency_id" invisible="1"/> -->
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<group colspan="4" string="Days" name="days">
|
||||
<field name="reservation_line_ids" nolabel="1">
|
||||
<tree create="false" delete="false" editable="bottom">
|
||||
<field name="date" readonly="True" />
|
||||
<field name="price" />
|
||||
<field name="discount" />
|
||||
</tree>
|
||||
</field>
|
||||
</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="reservation_type" />
|
||||
<field name="out_service_description"
|
||||
attrs="{'invisible':[('reservation_type','not in',('out'))]}"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Tree view of hotel reservation -->
|
||||
<record model="ir.ui.view" id="view_hotel_reservation_tree">
|
||||
<field name="name">hotel.reservation.tree</field>
|
||||
<field name="model">hotel.reservation</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Hotel Reservation"
|
||||
decoration-danger="folio_pending_amount > 0 and checkin <= current_date and not overbooking"
|
||||
decoration-muted="state == 'cancelled' and folio_pending_amount > 0 and not overbooking"
|
||||
decoration-success="folio_pending_amount == 0 and checkout <= current_date and not overbooking"
|
||||
decoration-warning="overbooking">
|
||||
<field name="splitted" invisible="1" />
|
||||
<button icon="fa fa-1x fa-chain-broken"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
name="open_master"
|
||||
attrs="{'invisible':[('splitted','=', False)]}" />
|
||||
<button icon="fa fa-2x fa-angellist"
|
||||
attrs="{'invisible':['|',('folio_pending_amount','>',0),('state' ,'!=', 'done')]}"
|
||||
type="object"
|
||||
name="open_folio" />
|
||||
<field name="state" />
|
||||
<button type="object" class="oe_stat_button"
|
||||
icon="fa fa-2x fa-file"
|
||||
name="open_folio"
|
||||
/>
|
||||
<field name="folio_id"/>
|
||||
<button type="action" class="oe_stat_button"
|
||||
icon="fa fa-1x fa-user-plus"
|
||||
name="%(launch_checkin_wizard_add)d"
|
||||
context="{'partner_id': partner_id,'enter_date': checkin,
|
||||
'exit_date': checkout,'reservation_id': id, 'hidden_cardex': True, 'edit_cardex': True }"
|
||||
attrs="{'invisible':['|','|', ('state','not in',('confirm','booking')),('cardex_pending','=', False),('parent_reservation','!=',False)]}"
|
||||
/>
|
||||
<button type="action" class="oe_stat_button"
|
||||
icon="fa fa-2x fa-list-ul"
|
||||
name="%(open_hotel_reservation_form_tree_all)d"
|
||||
context="{'search_default_partner_id': partner_id}"
|
||||
/>
|
||||
<field name="partner_id"/>
|
||||
<field name="parent_reservation" invisible="1" />
|
||||
<!-- <field name="virtual_room_id" string="Reserved Room Type"/> -->
|
||||
<field name="room_type_id" string="Reserved Unit Type" />
|
||||
<field name="nights" />
|
||||
<field name="adults" string="Persons"/>
|
||||
<field name="checkin" widget="date"/>
|
||||
<field name="checkout" widget="date"/>
|
||||
<field name="create_date"/>
|
||||
<field name="overbooking" invisible="1" />
|
||||
<field name="last_updated_res" string="Updated on"/>
|
||||
<field name="cardex_ids" invisible ="1"/>
|
||||
<field name="to_assign" invisible="1"/>
|
||||
<!-- cardex_smart_button attrs depends on cardex_pending to be showed -->
|
||||
<field name="cardex_pending" invisible="1"/>
|
||||
<field name="folio_pending_amount" string="Folio Pending Amount"/>
|
||||
<button type="object" class="oe_stat_button"
|
||||
icon="fa fa-3x fa-money"
|
||||
name="action_pay_folio"
|
||||
attrs="{'invisible':[('folio_pending_amount','=',0)]}"
|
||||
/>
|
||||
<field name="create_uid"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Search view of hotel reservation -->
|
||||
<record model="ir.ui.view" id="view_hotel_reservation_search">
|
||||
<field name="name">hotel.reservation.search</field>
|
||||
<field name="model">hotel.reservation</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Reservation Detail">
|
||||
<field name="partner_id" />
|
||||
<field name="folio_id" />
|
||||
<filter string="My Reservations"
|
||||
domain="[('create_uid', '=', uid)]"
|
||||
/>
|
||||
<filter string="Cancelled"
|
||||
domain="[('state', '=', 'cancelled')]"
|
||||
/>
|
||||
<filter string="On Board"
|
||||
domain="[('state','in',['booking'])]"
|
||||
help="Current Booking" />
|
||||
<filter string="To enter"
|
||||
domain="[('state', '=', 'confirm')]"
|
||||
/>
|
||||
<filter string="Overbookings"
|
||||
domain="[('overbooking', '=', 'True')]"
|
||||
/>
|
||||
<filter string="Reservations to 7 days" name="next_res_week"
|
||||
domain="[('checkin', '<', (context_today()+datetime.timedelta(days=7)).strftime('%Y-%m-%d')),
|
||||
('state', '=', 'confirm')]"
|
||||
help="Show all reservations for which date enter is before than 7 days"/>
|
||||
<filter string="Reservations to 14 days" name="next_res_2week"
|
||||
domain="[('checkin', '<', (context_today()+datetime.timedelta(days=14)).strftime('%Y-%m-%d')),
|
||||
('state', '=', 'confirm')]"
|
||||
help="Show all reservations for which date enter is before than 14 days"/>
|
||||
<filter string="Reservations to 1 month" name="next_res_week"
|
||||
domain="[('checkin', '<', (context_today()+datetime.timedelta(days=30)).strftime('%Y-%m-%d')),
|
||||
('state', '=', 'confirm')]"
|
||||
help="Show all reservations for which date enter is before than aprox. 1 month"/>
|
||||
<filter string="To Assign"
|
||||
domain="[('to_assign','=',True)]"
|
||||
/>
|
||||
<separator/>
|
||||
<filter string="Call Center"
|
||||
domain="[('channel_type', '=', 'call')]"
|
||||
/>
|
||||
<filter string="Web"
|
||||
domain="[('channel_type', '=', 'web')]"
|
||||
/>
|
||||
<filter string="Door"
|
||||
domain="[('channel_type', '=', 'door')]"
|
||||
/>
|
||||
<filter string="Mail"
|
||||
domain="[('channel_type', '=', 'mail')]"
|
||||
/>
|
||||
<filter string="Phone"
|
||||
domain="[('channel_type', '=', 'phone')]"
|
||||
/>
|
||||
<separator/>
|
||||
<filter string="Still to be paid"
|
||||
domain="[('folio_id.invoices_amount','>',0)]"
|
||||
/>
|
||||
<filter string="Late Payment"
|
||||
domain="[('folio_id.invoices_amount','>',0),('state','in',['done'])]"
|
||||
/>
|
||||
<filter string="Lates and NoShows"
|
||||
domain="[('cancelled_reason','in',['late','noshow'])]"
|
||||
/>
|
||||
<separator/>
|
||||
<filter string="Staff"
|
||||
domain="[('reservation_type','in',['staff'])]"
|
||||
/>
|
||||
<filter string="Out of Service"
|
||||
domain="[('reservation_type','in',['dontsell'])]"
|
||||
/>
|
||||
<group expand="0" string="Group By">
|
||||
<!-- <filter string="Room Type" domain="[]"
|
||||
context="{'group_by':'virtual_room_id'}"/> -->
|
||||
<filter string="Room Type" domain="[]"
|
||||
context="{'group_by':'room_type_id'}"/>
|
||||
<filter string="Creation Date" domain="[]"
|
||||
context="{'group_by':'create_date'}" />
|
||||
<filter string="Checkin Date" domain="[]"
|
||||
context="{'group_by':'checkin'}" />
|
||||
<filter string="Created By" domain="[]"
|
||||
context="{'group_by':'create_uid'}" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
89
hotel/views/hotel_reservation_workflow.xml
Normal file
89
hotel/views/hotel_reservation_workflow.xml
Normal file
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<record model="workflow" id="wkf_reservation">
|
||||
<field name="name">hotel.reservation.basic</field>
|
||||
<field name="osv">hotel.reservation</field>
|
||||
<field name="on_create">True</field>
|
||||
</record>
|
||||
|
||||
#----------------------------------------------
|
||||
# Activity
|
||||
#----------------------------------------------
|
||||
|
||||
<record model="workflow.activity" id="act_draft">
|
||||
<field name="wkf_id" ref="wkf_reservation"/>
|
||||
<field name="flow_start">True</field>
|
||||
<field name="name">draft</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="act_confirm">
|
||||
<field name="wkf_id" ref="wkf_reservation"/>
|
||||
<field name="name">confirm</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">confirmed_reservation()</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="act_done">
|
||||
<field name="wkf_id" ref="wkf_reservation"/>
|
||||
<field name="name">done</field>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">_create_folio()</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="act_checkin">
|
||||
<field name="wkf_id" ref="wkf_reservation"/>
|
||||
<field name="name">checkin</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">action_reservation_checkin()</field>
|
||||
</record>
|
||||
<record id="act_checkin" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf_reservation"/>
|
||||
<field name="name">checkin</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">action_reservation_checkin()</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="act_cancelled">
|
||||
<field name="wkf_id" ref="wkf_reservation"/>
|
||||
<field name="name">cancelled</field>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">action_cancel()</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Transition
|
||||
-->
|
||||
|
||||
<record model="workflow.transition" id="t1">
|
||||
<field name="act_from" ref="act_draft" />
|
||||
<field name="act_to" ref="act_confirm" />
|
||||
<field name="signal">confirm</field>
|
||||
</record>
|
||||
<record model="workflow.transition" id="t2">
|
||||
<field name="act_from" ref="act_confirm" />
|
||||
<field name="act_to" ref="act_done" />
|
||||
<field name="signal">done</field>
|
||||
</record>
|
||||
<record model="workflow.transition" id="t2">
|
||||
<field name="act_from" ref="act_checkin" />
|
||||
<field name="act_from" ref="act_confirm" />
|
||||
<field name="act_to" ref="act_done" />
|
||||
<field name="signal">done</field>
|
||||
</record>
|
||||
<record model="workflow.transition" id="trans_reservation_confirm_to_checkin">
|
||||
<field name="act_from" ref="act_confirm"/>
|
||||
<field name="act_to" ref="act_checkin"/>
|
||||
<field name="signal">%(launch_checkin_wizard)d</field>
|
||||
</record>
|
||||
<record model="workflow.transition" id="hotel_reservation.t2">
|
||||
<field name="act_from" ref="act_checkin" />
|
||||
<field name="act_from" ref="act_confirm" />
|
||||
<field name="act_to" ref="act_done" />
|
||||
<field name="signal">done</field>
|
||||
</record>
|
||||
<record id="trans_reservation_confirm_to_checkin" model="workflow.transition">
|
||||
<field name="act_from" ref="act_confirm"/>
|
||||
<field name="act_to" ref="act_checkin"/>
|
||||
<field name="signal">%(launch_checkin_wizard)d</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
227
hotel/views/hotel_room.xml
Normal file
227
hotel/views/hotel_room.xml
Normal file
@@ -0,0 +1,227 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- =================================================== Rooms =================================================== -->
|
||||
<!-- Form view of hotel room -->
|
||||
<record model="ir.ui.view" id="view_hotel_room_form">
|
||||
<field name="name">hotel.room.form</field>
|
||||
<field name="model">hotel.room</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Hotel Room">
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="toggle_active" type="object"
|
||||
class="oe_stat_button" icon="fa-archive">
|
||||
<field name="active" widget="boolean_button"
|
||||
options='{"terminology": "archive"}'/>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name" string="Name" />
|
||||
<h1>
|
||||
<field name="name" />
|
||||
</h1>
|
||||
<!-- <label for="to_be_cleaned" string="To be Cleaned" />
|
||||
<h2>
|
||||
<field name="to_be_cleaned"/>
|
||||
</h2> -->
|
||||
</div>
|
||||
<notebook>
|
||||
<page name="information_hotel_room" string="Information">
|
||||
<group colspan="4" col="4">
|
||||
<field name="floor_id" string="Ubication" />
|
||||
<!-- <field name="categ_id" select="1" domain="[('isroomtype','=',True)]" string="Room Type" /> -->
|
||||
<field name="room_type_id" string="Room Type" />
|
||||
<field name="capacity" />
|
||||
<field name="shared_room" help="It allows several reservations on the same room simultaneously based on the capacity of people"/>
|
||||
<!-- <field name="uom_id" invisible="1" /> -->
|
||||
</group>
|
||||
<group>
|
||||
<!-- <field name="sale_price_type" /> -->
|
||||
<!--field name="price_virtual_room_domain" invisible="1" /-->
|
||||
<!-- <field name="price_virtual_room" domain="[('room_ids.id', '=', active_id)]" attrs="{'invisible':[('sale_price_type', '!=', 'vroom')], 'required': [('sale_price_type', '=', 'vroom')]}" /> -->
|
||||
<!-- <field name="price_room_type" domain="[('room_ids.id', '=', active_id)]" attrs="{'invisible':[('sale_price_type', '!=', 'vroom')], 'required': [('sale_price_type', '=', 'vroom')]}" /> -->
|
||||
<field name="list_price" />
|
||||
</group>
|
||||
<newline />
|
||||
<!-- <separator colspan='4' string="Customer Taxes" /> -->
|
||||
<!-- <field name="taxes_id" colspan="4" nolabel='1'
|
||||
help='Customer taxes apply on the perticular room. ' /> -->
|
||||
</page>
|
||||
<page string="Room Amenities">
|
||||
<separator string=" Room Amenities" />
|
||||
<field name="room_amenities" colspan="4" nolabel="1" />
|
||||
</page>
|
||||
<page string="Descriptions">
|
||||
<group>
|
||||
<field name="description_sale" colspan="2" string="Name in reports"/>
|
||||
<!-- <field name="description" colspan="2" string="Description Sales"/> -->
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
<group>
|
||||
<field name="sequence" />
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Search view of hotel room -->
|
||||
<record model="ir.ui.view" id="view_hotel_room_search">
|
||||
<field name="name">hotel.room.search</field>
|
||||
<field name="model">hotel.room</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Hotel Room">
|
||||
<field name="name" />
|
||||
<field name="room_type_id" />
|
||||
<field name="list_price" string="Room rate" />
|
||||
<field name="capacity" />
|
||||
<newline />
|
||||
<!--<filter name="available" string="Available"
|
||||
domain="[('status','=', 'available')]" help="Available Rooms" />-->
|
||||
<!--<filter string="Reserved" domain="[('status','=', 'occupied')]"
|
||||
help="Reserved Rooms" />-->
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Tree view of hotel room -->
|
||||
<record model="ir.ui.view" id="view_hotel_room_tree">
|
||||
<field name="name">hotel.room.tree</field>
|
||||
<field name="model">hotel.room</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Hotel Room">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name" />
|
||||
<field name="room_type_id" />
|
||||
<field name="list_price" string="Room rate" />
|
||||
<field name="capacity" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- <record model="ir.ui.view" id="view_hotel_room_kanban">
|
||||
<field name="name">hotel.room.kanban</field>
|
||||
<field name="model">hotel.room</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban>
|
||||
<field name="name" />
|
||||
<field name="lst_price" />
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div
|
||||
t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
|
||||
|
||||
<div class="o_dropdown_kanban dropdown" groups="base.group_user">
|
||||
<a class="dropdown-toggle btn" data-toggle="dropdown" href="#">
|
||||
<span class="fa fa-bars fa-lg" />
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
|
||||
<t t-if="widget.editable">
|
||||
<li>
|
||||
<a type="edit">Edit</a>
|
||||
</li>
|
||||
</t>
|
||||
<t t-if="widget.deletable">
|
||||
<li>
|
||||
<a type="delete">Delete</a>
|
||||
</li>
|
||||
</t>
|
||||
<li>
|
||||
<ul class="oe_kanban_colorpicker" data-field="color" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="oe_kanban_details" style='margin-top: -5px;'>
|
||||
<div class="oe_kanban_content">
|
||||
<div class="oe_kanban_project_list">
|
||||
<H3>
|
||||
<a type="open">
|
||||
<t t-if="record.code.raw_value" style="margin-right: 10px">
|
||||
[
|
||||
<field name="code" />
|
||||
]
|
||||
</t>
|
||||
<field name="name" />
|
||||
</a>
|
||||
</H3>
|
||||
</div>
|
||||
<div name="tags" />
|
||||
<ul>
|
||||
<li>
|
||||
Rate:
|
||||
<field name="lst_price"></field>
|
||||
</li>
|
||||
<li>
|
||||
Capacity:
|
||||
<field name="capacity"></field>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_clear"></div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record> -->
|
||||
|
||||
|
||||
<!-- Action for hotel room -->
|
||||
<record model="ir.actions.act_window" id="action_hotel_room_form">
|
||||
<field name="name">Hotel Room</field>
|
||||
<field name="res_model">hotel.room</field>
|
||||
<field name="view_type">form</field>
|
||||
<!-- <field name="context">{'default_isroom':1,'default_rental':1}
|
||||
</field> -->
|
||||
<field name="view_id" ref="view_hotel_room_tree" />
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Rooms" id="menu_open_hotel_room_form" action="action_hotel_room_form"
|
||||
sequence="5" parent="hotel.menu_hotel_room" />
|
||||
|
||||
<!-- Room Categories -->
|
||||
|
||||
<!-- <record id="product_category_tree_view" model="ir.ui.view">
|
||||
<field name="name">product.category.tree</field>
|
||||
<field name="model">product.category</field>
|
||||
<field name="field_parent">child_id</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree toolbar="True" string="Product Categories">
|
||||
<field name="name" />
|
||||
</tree>
|
||||
</field>
|
||||
</record> -->
|
||||
|
||||
<!-- <record model="ir.actions.act_window" id="hotel_room_category_action">
|
||||
<field name="name">Rooms by Category</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.category</field>
|
||||
<field name="domain">[('parent_id','=',False),('isroomtype','=',True)]</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="view_id" ref="product_category_tree_view" />
|
||||
</record> -->
|
||||
|
||||
<!-- <record id="action_room_cate" model="ir.actions.act_window">
|
||||
<field name="name">Category Items</field>
|
||||
<field name="res_model">product.product</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">['|','|',('isroom','=',True), ('iscategid' , '=', True), ('isservice', '=', True)]</field>
|
||||
<field name="context">{'search_default_categ_id':active_id, 'default_categ_id':active_id}</field>
|
||||
</record> -->
|
||||
|
||||
<!--record id="ir_room_category_open" model="ir.default">
|
||||
<field eval="'tree_but_open'" name="key2"/>
|
||||
<field eval="'product.category'" name="model"/>
|
||||
<field name="name">Rooms</field>
|
||||
<field eval="'ir.actions.act_window,%d'%action_room_cate" name="value"/>
|
||||
</record-->
|
||||
|
||||
<!-- <menuitem name="Room by Type" id="menu_hotel_room_category_action"
|
||||
action="hotel_room_category_action" sequence="7" parent="hotel.menu_hotel_room" /> -->
|
||||
|
||||
</odoo>
|
||||
131
hotel/views/hotel_room_amenities.xml
Normal file
131
hotel/views/hotel_room_amenities.xml
Normal file
@@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!--===== Room Amenities ===== -->
|
||||
<!-- Form view of hotel room amenities -->
|
||||
<record id="view_hotel_room_amenities_form" model="ir.ui.view">
|
||||
<field name="name">hotel.room.amenities.form</field>
|
||||
<field name="model">hotel.room.amenities</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Hotel Room Amenities">
|
||||
<sheet>
|
||||
<h1>
|
||||
<label string="Amenity" />
|
||||
<field name="name" select="1" />
|
||||
</h1>
|
||||
<group>
|
||||
<field name="default_code" select="1" />
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Information">
|
||||
<group colspan="4" col="4">
|
||||
<field name="room_amenities_type_id" select="2" string="Amenity Type" />
|
||||
<!-- <field name="categ_id" select="1"
|
||||
domain="[('isamenitytype','=',True)]" /> -->
|
||||
</group>
|
||||
<newline />
|
||||
<separator colspan='4' string="Supplier Taxes" />
|
||||
<!-- <field name="supplier_taxes_id" colspan="4" nolabel='1'
|
||||
help='Define supplier taxes if there any on the ty. ' /> -->
|
||||
<newline />
|
||||
<separator colspan='4' string="Customer Taxes" />
|
||||
<!-- <field name="taxes_id" colspan="4" nolabel='1'
|
||||
help='List of customer taxes applied on the ty. ' /> -->
|
||||
</page>
|
||||
<page string="Procurement">
|
||||
<group colspan="4" col="4">
|
||||
<field name="active" select="2" />
|
||||
<!-- <field name="list_price" /> -->
|
||||
<!-- <field name="cost_method" string="Cost Method"/> -->
|
||||
<!-- <field name="sale_ok" select="2" /> -->
|
||||
<!-- <field name="standard_price" /> -->
|
||||
<!-- <field name="rental" select="2" /> -->
|
||||
</group>
|
||||
<newline />
|
||||
<group>
|
||||
<separator string="Suppliers" />
|
||||
<!-- <field name="seller_ids" colspan="4" nolabel="1"
|
||||
widget="one2many_list" /> -->
|
||||
</group>
|
||||
</page>
|
||||
<page string="Descriptions">
|
||||
<!-- <separator string="Description" />
|
||||
<field name="description" colspan="4" nolabel="1" />
|
||||
<separator string="Sale Description" />
|
||||
<field name="description_sale" colspan="4" nolabel="1" />
|
||||
<separator string="Purchase Description" />
|
||||
<field name="description_purchase" colspan="4" nolabel="1" /> -->
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Search view of hotel room amenities -->
|
||||
<record model="ir.ui.view" id="view_hotel_room_aenities_search">
|
||||
<field name="name">hotel.room_amenities_search</field>
|
||||
<field name="model">hotel.room.amenities</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Hotel Room Amenities">
|
||||
<field name="name" />
|
||||
<field name="room_amenities_type_id" select="1" />
|
||||
<!-- <field name="list_price" string="ty rate" /> -->
|
||||
<newline />
|
||||
<group expand="0" string="Group By...">
|
||||
<!-- <filter name="categ_id" string="Catagory"
|
||||
icon="terp-stock_symbol-selection" domain="[]"
|
||||
context="{'group_by':'categ_id'}" /> -->
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Tree view of hotel room amenities -->
|
||||
<record model="ir.ui.view" id="view_hotel_room_amenities_list">
|
||||
<field name="name">hotel.room_amenities_list</field>
|
||||
<field name="model">hotel.room.amenities</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Hotel Room Amenities">
|
||||
<field name="name" />
|
||||
<field name="room_amenities_type_id" select="1" />
|
||||
<!-- <field name="list_price" string="Ty rate" invisible="1" /> -->
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action for hotel room amenities -->
|
||||
<record model="ir.actions.act_window" id="action_hotel_room_amenities_view_form">
|
||||
<field name="name">Hotel Room Amenities</field>
|
||||
<field name="res_model">hotel.room.amenities</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<!-- <field name="context">{'default_iscategid':1}</field> -->
|
||||
<field name="view_id" ref="view_hotel_room_amenities_list" />
|
||||
</record>
|
||||
<menuitem name="Amenities" id="menu_action_hotel_room_amenities_view_form"
|
||||
action="action_hotel_room_amenities_view_form" sequence="2"
|
||||
parent="hotel.menu_amenity" />
|
||||
|
||||
<!-- Amenities Categories -->
|
||||
|
||||
<!-- <record model="ir.actions.act_window" id="hotel_ty_category_action">
|
||||
<field name="name">Amenities by Category</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.category</field>
|
||||
<field name="domain">[('parent_id','=',False),('isamenitytype','=',True)]</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="view_id" ref="product_category_tree_view" />
|
||||
</record> -->
|
||||
|
||||
<!--record id="ir_amenities_category_open" ref="model_product_category">
|
||||
<field eval="'tree_but_open'" name="key2"/>
|
||||
<field eval="'product.category'" name="model"/>
|
||||
<field name="name">Amenities</field>
|
||||
<field eval="'ir.actions.act_window,%d'%action_room_cate" name="value"/>
|
||||
</record-->
|
||||
|
||||
<!-- <menuitem name="Amenities by Type" id="menu_hotel_ty_category_action"
|
||||
action="hotel_ty_category_action" sequence="4" parent="hotel.menu_amenity" /> -->
|
||||
|
||||
</odoo>
|
||||
48
hotel/views/hotel_room_amenities_type.xml
Normal file
48
hotel/views/hotel_room_amenities_type.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!--==== Amenities Type ==== -->
|
||||
<!-- Form view of hotel room amenities type -->
|
||||
<record model="ir.ui.view" id="view_hotel_room_amenities_type_form">
|
||||
<field name="name">hotel.room_amenities_type_form</field>
|
||||
<field name="model">hotel.room.amenities.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Hotel Room Amenities Type">
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name" string="Amenity Type" />
|
||||
<!-- <field name="parent_id" domain="[('isamenitytype','=',True)]" /> -->
|
||||
<!-- <field name="isamenitytype" invisible="1" /> -->
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Tree view of hotel room amenities type -->
|
||||
<record model="ir.ui.view" id="view_hotel_room_amenities_type_list">
|
||||
<field name="name">hotel.room_amenities_type_list</field>
|
||||
<field name="model">hotel.room.amenities.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Hotel Room Amenities Type">
|
||||
<field name="name" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action for hotel room amenities type -->
|
||||
<record model="ir.actions.act_window" id="action_hotel_room_amenities_type_view_form">
|
||||
<field name="name">Hotel Room Amenities Type</field>
|
||||
<field name="res_model">hotel.room.amenities.type</field>
|
||||
<!-- <field name="context">{'default_isamenitytype':1}</field> -->
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_amenity" name="Amenity"
|
||||
parent="hotel.hotel_configuration_menu" sequence="2" />
|
||||
<menuitem name="Amenity Types"
|
||||
id="menu_action_hotel_room_amenities_type_view_form" action="action_hotel_room_amenities_type_view_form"
|
||||
sequence="3" parent="hotel.menu_amenity" />
|
||||
|
||||
</odoo>
|
||||
77
hotel/views/hotel_room_type.xml
Normal file
77
hotel/views/hotel_room_type.xml
Normal file
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- Form view of hotel room type -->
|
||||
<record model="ir.ui.view" id="view_hotel_room_type_form">
|
||||
<field name="name">hotel.room_type.form</field>
|
||||
<field name="model">hotel.room.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Hotel Room Type">
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="toggle_active" type="object"
|
||||
class="oe_stat_button" icon="fa-archive">
|
||||
<field name="active" widget="boolean_button"
|
||||
options='{"terminology": "archive"}'/>
|
||||
</button>
|
||||
</div>
|
||||
<group colspan="4">
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="code_type" />
|
||||
<field name="list_price" widget='monetary' options="{'currency_field': 'currency_id', 'field_digits': True}"/>
|
||||
<!-- <field name="parent_id" domain="[('isroomtype','=',True)]"
|
||||
select="1" />
|
||||
<field name="isroomtype" invisible="1" /> -->
|
||||
</group>
|
||||
<group>
|
||||
<field name="total_rooms_count"/>
|
||||
<field name="max_real_rooms"/>
|
||||
<!-- <field name="room_type_ids" widget="many2many_tags" options="{'no_create': True}"/> -->
|
||||
</group>
|
||||
</group>
|
||||
<group colspan="2">
|
||||
<group>
|
||||
<field name="room_ids" widget="many2many"/>
|
||||
</group>
|
||||
<!-- <group>
|
||||
<field name="service_ids"/>
|
||||
</group> -->
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Tree view of hotel room type -->
|
||||
<record model="ir.ui.view" id="view_hotel_room_type_tree">
|
||||
<field name="name">hotel.room_type.tree</field>
|
||||
<field name="model">hotel.room.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string=" Hotel Room Type">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name" />
|
||||
<field name="code_type"/>
|
||||
<field name="list_price"/>
|
||||
<field name="room_ids"/>
|
||||
<field name="total_rooms_count"/>
|
||||
<field name="max_real_rooms"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action for hotel room type -->
|
||||
<record model="ir.actions.act_window" id="open_hotel_room_type_form_tree">
|
||||
<field name="name">Room Type</field>
|
||||
<field name="res_model">hotel.room.type</field>
|
||||
<field name="view_type">form</field>
|
||||
<!-- <field name="context">{'default_isroomtype':1}</field> -->
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem id="menu_hotel_room" name="Room"
|
||||
parent="hotel.hotel_configuration_menu" sequence="2" />
|
||||
<menuitem name="Room Types" id="menu_open_hotel_room_type_form_tree"
|
||||
action="open_hotel_room_type_form_tree" sequence="6"
|
||||
parent="hotel.menu_hotel_room" />
|
||||
|
||||
</odoo>
|
||||
14
hotel/views/hotel_sequence.xml
Normal file
14
hotel/views/hotel_sequence.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
|
||||
<!-- Sequences for hotel folio -->
|
||||
<record model="ir.sequence" id="seq_hotel_folio">
|
||||
<field name="name">Hotel Folio</field>
|
||||
<field name="code">hotel.folio</field>
|
||||
<field name="prefix">F/</field>
|
||||
<field name="padding">5</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
135
hotel/views/hotel_service.xml
Normal file
135
hotel/views/hotel_service.xml
Normal file
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- Form view of hotel service -->
|
||||
<record model="ir.ui.view" id="view_hotel_services_form">
|
||||
<field name="name">.hotel.service.form</field>
|
||||
<field name="model">hotel.service</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Hotel Services">
|
||||
<sheet>
|
||||
<h1>
|
||||
<label string="Service" />
|
||||
<field name="name" select="1" />
|
||||
</h1>
|
||||
<group>
|
||||
<field name="default_code" select="1" />
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Information">
|
||||
<group>
|
||||
<group colspan="4" col="4">
|
||||
<field name="service_type_id" select="2" string="Service Type" />
|
||||
<!-- <field name="categ_id" domain="[('isservicetype','=',True)]"
|
||||
select="1" /> -->
|
||||
</group>
|
||||
</group>
|
||||
<newline />
|
||||
<separator colspan='4' string="Supplier Taxes" />
|
||||
<!-- <field name="supplier_taxes_id" colspan="4" nolabel='1'
|
||||
help='List of supplier taxes related to the service provided by hotel.' /> -->
|
||||
<newline />
|
||||
<separator colspan='4' string="Customer Taxes" />
|
||||
<!-- <field name="taxes_id" colspan="4" nolabel='1'
|
||||
help='Customer taxes applied on the service.' /> -->
|
||||
</page>
|
||||
<page string="Procurement">
|
||||
<group colspan="4" col="4">
|
||||
<field name="active" select="2" />
|
||||
<field name="list_price" />
|
||||
<!-- <field name="cost_method" string="Cost Method"/> -->
|
||||
<!-- <field name="sale_ok" select="2" /> -->
|
||||
<!-- <field name="standard_price" /> -->
|
||||
<!-- <field name="rental" select="2" /> -->
|
||||
</group>
|
||||
<newline />
|
||||
<group>
|
||||
<!-- <separator string="Suplliers" />
|
||||
<field name="seller_ids" colspan="4" nolabel="1"
|
||||
widget="one2many_list" /> -->
|
||||
</group>
|
||||
</page>
|
||||
<page string="Descriptions">
|
||||
<!-- <separator string="Description" />
|
||||
<field name="description" colspan="4" nolabel="1" />
|
||||
<separator string="Sale Description" />
|
||||
<field name="description_sale" colspan="4" nolabel="1" />
|
||||
<separator string="Purchase Description" />
|
||||
<field name="description_purchase" colspan="4" nolabel="1" /> -->
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- search view of hotel service -->
|
||||
<record model="ir.ui.view" id="view_hotel_services_search">
|
||||
<field name="name">hotel.service.search</field>
|
||||
<field name="model">hotel.service</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Hotel Services">
|
||||
<field name="name" />
|
||||
<field name="service_type_id" select="1" />
|
||||
<field name="list_price" string="Service rate" />
|
||||
<newline />
|
||||
<group expand="0" string="Group By...">
|
||||
<!-- <filter name="categ_id" string="Catagory"
|
||||
icon="terp-stock_symbol-selection" domain="[]"
|
||||
context="{'group_by':'categ_id'}" /> -->
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Tree view of hotel service -->
|
||||
<record model="ir.ui.view" id="view_hotel_services_tree">
|
||||
<field name="name">hotel.service.tree</field>
|
||||
<field name="model">hotel.service</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Hotel Services">
|
||||
<field name="name" />
|
||||
<field name="service_type_id" />
|
||||
<field name="list_price" string="Service rate" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action for hotel service -->
|
||||
<record model="ir.actions.act_window" id="action_hotel_services_form">
|
||||
<field name="name">Hotel Services</field>
|
||||
<field name="res_model">hotel.service</field>
|
||||
<field name="view_type">form</field>
|
||||
<!-- <field name="context">{'default_isservice':1}
|
||||
</field> -->
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Services" id="menu_open_hotel_services_form"
|
||||
action="action_hotel_services_form" sequence="8"
|
||||
parent="hotel.menu_hotel_service" />
|
||||
|
||||
<!-- Categories for Services -->
|
||||
|
||||
<record model="ir.actions.act_window" id="hotel_service_category_action">
|
||||
<field name="name">Services by Category</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.category</field>
|
||||
<!-- <field name="domain">[('parent_id','=',False),('isservicetype','=',True)]
|
||||
</field> -->
|
||||
<field name="view_type">tree</field>
|
||||
<!-- <field name="view_id" ref="product_category_tree_view" /> -->
|
||||
</record>
|
||||
|
||||
<!--record id="ir_service_category_open" model='ir.default'>
|
||||
<field eval="'tree_but_open'" name="key2"/>
|
||||
<field eval="'product.category'" name="model"/>
|
||||
<field name="name">Services</field>
|
||||
<field eval="'ir.actions.act_window,%d'%action_room_cate" name="value"/>
|
||||
</record-->
|
||||
|
||||
<menuitem name="Services by Type" id="menu_hotel_service_category_action"
|
||||
action="hotel_service_category_action" sequence="10"
|
||||
parent="hotel.menu_hotel_service" />
|
||||
|
||||
</odoo>
|
||||
63
hotel/views/hotel_service_line.xml
Normal file
63
hotel/views/hotel_service_line.xml
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!--=== Hotel Service Line ==== -->
|
||||
<!-- Form view of Service Line -->
|
||||
<record model="ir.ui.view" id="view_hotel_service_line_form">
|
||||
<field name="name">hotel.service.line.form</field>
|
||||
<field name="model">hotel.service.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Service Line">
|
||||
<notebook>
|
||||
<page string="Service Line">
|
||||
<group col="4" colspan="4">
|
||||
<field name="name" />
|
||||
<!-- <field name="ser_room_line" options="{'create': False, 'create_edit': False}"/> -->
|
||||
<!-- <field name="product_uom" options="{'create': False, 'create_edit': False}" invisible="1"/> -->
|
||||
<!-- <field name="order_partner_id" invisible="1"/> -->
|
||||
<field name="folio_id" invisible="1"/>
|
||||
<field name="list_price" />
|
||||
<!-- <field name="tax_id" widget="many2many_tags" invisible="1"/> -->
|
||||
|
||||
</group>
|
||||
<separator string="Manual Description" colspan="4" invisible="1"/>
|
||||
<!-- <field name="name" colspan="4" select="2"
|
||||
placeholder="-Description-" invisible="1"/> -->
|
||||
<newline />
|
||||
<group invisible="1">
|
||||
<separator string="States" colspan="4" />
|
||||
<!-- <field name="state" select="2" /> -->
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Tree view of hotel service -->
|
||||
<record model="ir.ui.view" id="view_hotel_service_line_tree">
|
||||
<field name="name">hotel.service.line.tree</field>
|
||||
<field name="model">hotel.service.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Hotel Services">
|
||||
<field name="name" />
|
||||
<field name="list_price" string="Service rate" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action for hotel service -->
|
||||
<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>
|
||||
<field name="view_type">form</field>
|
||||
<!-- <field name="context">{'default_isservice':1}
|
||||
</field> -->
|
||||
<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" />
|
||||
|
||||
</odoo>
|
||||
48
hotel/views/hotel_service_type.xml
Normal file
48
hotel/views/hotel_service_type.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!--======================= Hotel Service Type =========================== -->
|
||||
<!-- Form view of hotel service type -->
|
||||
<record model="ir.ui.view" id="view_hotel_service_type_form">
|
||||
<field name="name">hotel.service_type.form</field>
|
||||
<field name="model">hotel.service.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Service Type">
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name" select="1" string="Service Name" />
|
||||
<!-- <field name="parent_id" domain="[('isservicetype','=',True)]"
|
||||
select="1" /> -->
|
||||
<!-- <field name="isservicetype" invisible="1" /> -->
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Tree view of hotel service type -->
|
||||
<record model="ir.ui.view" id="view_hotel_service_type_tree">
|
||||
<field name="name">hotel.service_type.tree</field>
|
||||
<field name="model">hotel.service.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Service Type">
|
||||
<field name="name" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action for hotel service type -->
|
||||
<record model="ir.actions.act_window" id="open_hotel_service_type_form_tree">
|
||||
<field name="name">Service Type</field>
|
||||
<field name="res_model">hotel.service.type</field>
|
||||
<!-- <field name="context">{'default_isservicetype':1}</field> -->
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem id="menu_hotel_service" name="Services"
|
||||
parent="hotel.hotel_configuration_menu" sequence="2" />
|
||||
<menuitem name="Service Types" id="menu_open_hotel_service_type_form_tree"
|
||||
action="open_hotel_service_type_form_tree" sequence="9"
|
||||
parent="hotel.menu_hotel_service" />
|
||||
|
||||
</odoo>
|
||||
26
hotel/views/inherit_account_invoice_views.xml
Normal file
26
hotel/views/inherit_account_invoice_views.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<record id="invoice_form" model="ir.ui.view">
|
||||
<field name="model">account.invoice</field>
|
||||
<field name="inherit_id" ref="account.invoice_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//header" position="after">
|
||||
<div class="alert alert-danger" role="alert" style="margin-bottom:0px;"
|
||||
attrs="{'invisible': [('dif_customer_payment','=',False)]}">
|
||||
You have payments on the related folio associated with other customers than the current one on the invoice.
|
||||
Make sure to <bold><button class="alert-link" type="object" name="action_folio_payments" string="modify the payment"/></bold> from the folio if necessary before paying this invoice
|
||||
</div>
|
||||
<field name="dif_customer_payment" invisible="1" />
|
||||
<field name="from_folio" invisible="1" />
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='date_invoice']" position="after">
|
||||
<field name="folio_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>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
72
hotel/views/inherit_account_payment_views.xml
Normal file
72
hotel/views/inherit_account_payment_views.xml
Normal file
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<record id="account_payment_form" model="ir.ui.view">
|
||||
<field name="model">account.payment</field>
|
||||
<field name="inherit_id" ref="account.view_account_payment_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='communication']" position="after">
|
||||
<field name="folio_id"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_payment_folio_form" model="ir.ui.view">
|
||||
<field name="name">account.payment.folio.form</field>
|
||||
<field name="model">account.payment</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Register Payment" version="7">
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button class="oe_stat_button" name="button_journal_entries" string="Journal Items" type="object" groups="account.group_account_manager" attrs="{'invisible':[('move_line_ids','=',[])]}" icon="fa-bars"/>
|
||||
<field name="move_line_ids" invisible="1"/>
|
||||
<button class="oe_stat_button" name="button_invoices" string="Invoices" type="object" attrs="{'invisible':[('has_invoices','=',False)]}" icon="fa-bars"/>
|
||||
<field name="has_invoices" invisible="1"/>
|
||||
</div>
|
||||
<group>
|
||||
<field name="payment_type" invisible="1"/>
|
||||
<field name="partner_type" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<group>
|
||||
<field name="journal_id" widget="selection"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="hide_payment_method" invisible="1"/>
|
||||
<field name="payment_method_id" widget="radio" attrs="{'invisible': [('hide_payment_method', '=', True)]}"/>
|
||||
<field name="payment_method_code" invisible="1"/>
|
||||
<label for="amount"/>
|
||||
<div name="amount_div" class="o_row">
|
||||
<field name="amount"/>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="payment_date"/>
|
||||
<field name="communication"/>
|
||||
<field name="folio_id"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': [('payment_difference', '=', 0.0)]}">
|
||||
<label for="payment_difference"/>
|
||||
<div>
|
||||
<field name="payment_difference"/>
|
||||
<field name="payment_difference_handling" widget="radio" nolabel="1"/>
|
||||
</div>
|
||||
<field name="writeoff_account_id" string="Post Difference In"
|
||||
attrs="{'invisible': [('payment_difference_handling','=','open')], 'required': [('payment_difference_handling', '=', 'reconcile')]}"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
<footer>
|
||||
<button string="Validate" name="post" type="object" class="btn-primary"
|
||||
attrs="{'invisible': [('state','!=','draft')]}"/>
|
||||
<button string="Modify" name="modify" type="object" class="btn-primary"
|
||||
attrs="{'invisible': [('state','=','draft')]}"/>
|
||||
<button string="Return" name="return_payment_folio" type="object" class="btn-primary"
|
||||
attrs="{'invisible': [('state','=','draft')]}"/>
|
||||
<button string="Delete" name="delete" type="object" class="btn-primary"
|
||||
attrs="{'invisible': [('state','=','draft')]}"/>
|
||||
<button string="Cancel" class="btn-default" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
15
hotel/views/inherit_product_product.xml
Normal file
15
hotel/views/inherit_product_product.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_product_product_form_inherited" model="ir.ui.view">
|
||||
<field name="name">view.product.product.form.inherited</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='active']" position="after">
|
||||
<field name="is_room_type" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
42
hotel/views/inherit_res_partner.xml
Normal file
42
hotel/views/inherit_res_partner.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="hotel_partner_reservations" model="ir.actions.act_window">
|
||||
<field name="name">Reservations</field>
|
||||
<field name="res_model">hotel.reservation</field>
|
||||
<field name="domain">[('partner_id', '=',active_id)]</field>
|
||||
</record>
|
||||
|
||||
<record id="hotel_partner_folios" model="ir.actions.act_window">
|
||||
<field name="name">Folios</field>
|
||||
<field name="res_model">hotel.folio</field>
|
||||
<field name="domain">[('partner_id', '=',active_id)]</field>
|
||||
</record>
|
||||
|
||||
<record id="view_partner_form" model="ir.ui.view">
|
||||
<field name="name"> hotel.view.partner.form </field>
|
||||
<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>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Customers" id="menu_hotel_customer"
|
||||
action="base.action_partner_form" sequence="500"
|
||||
parent="menu_all_folio"/>
|
||||
|
||||
</odoo>
|
||||
22
hotel/views/inherit_reservation_workflow.xml
Executable file
22
hotel/views/inherit_reservation_workflow.xml
Executable file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="act_checkin" model="workflow.activity">
|
||||
<field name="wkf_id" ref="hotel_reservation.wkf_reservation"/>
|
||||
<field name="name">checkin</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">action_reservation_checkin()</field>
|
||||
</record>
|
||||
<record model="workflow.transition" id="hotel_reservation.t2">
|
||||
<field name="act_from" ref="act_checkin" />
|
||||
<field name="act_from" ref="hotel_reservation.act_confirm" />
|
||||
<field name="act_to" ref="hotel_reservation.act_done" />
|
||||
<field name="signal">done</field>
|
||||
</record>
|
||||
<record id="trans_reservation_confirm_to_checkin" model="workflow.transition">
|
||||
<field name="act_from" ref="hotel_reservation.act_confirm"/>
|
||||
<field name="act_to" ref="act_checkin"/>
|
||||
<field name="signal">%(launch_checkin_wizard)d</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
167
hotel/views/report_hotel_management.xml
Normal file
167
hotel/views/report_hotel_management.xml
Normal file
@@ -0,0 +1,167 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!--Template for hotel folio -->
|
||||
<template id="report_hotel_folio">
|
||||
<t t-call="report.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="report.external_layout">
|
||||
<div class="page">
|
||||
<br/><br/>
|
||||
<div class="row">
|
||||
<h2>
|
||||
<span><center>Total Collection</center></span>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="row mt32 mb32">
|
||||
<div class="text-center">
|
||||
<strong>From:</strong>
|
||||
<span t-esc="formatLang(data['form']['date_start'],date=True)"/>
|
||||
<strong>To:</strong>
|
||||
<span t-esc="formatLang(data['form']['date_end'],date=True)"/>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<td><strong>Folio No.</strong></td>
|
||||
<td><strong>Customer Name</strong></td>
|
||||
<td><strong>CheckIN</strong></td>
|
||||
<td><strong>CheckOut</strong></td>
|
||||
<td><strong>Total</strong></td>
|
||||
</tr>
|
||||
<tr t-foreach="get_data(data['form']['date_start'],data['form']['date_end'])" t-as="info">
|
||||
<td><span t-field="info.name"/></td>
|
||||
<td><span t-field="info.partner_id.name"/></td>
|
||||
<td><span t-field="info.checkin_date"/></td>
|
||||
<td><span t-field="info.checkout_date"/></td>
|
||||
<td><span t-esc="formatLang(get_total(info.amount_total))"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><strong>Net Total:</strong></td>
|
||||
<td t-esc="formatLang(get_Total())"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
|
||||
<!--Template for currency exchange-->
|
||||
<template id="report_currency_exchange">
|
||||
<t t-call="report.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="report.external_layout">
|
||||
<div class="page">
|
||||
<div class="row">
|
||||
<h1>
|
||||
<u><center>Hotel <span t-field="o.hotel_id.name" ></span></center></u>
|
||||
</h1><br /><br /><br />
|
||||
<h3>
|
||||
<span><center>Encashment Certificate</center></span>
|
||||
</h3>
|
||||
</div>
|
||||
<br />
|
||||
<table width="100%" >
|
||||
<tr>
|
||||
<td width="50%" style="text-align:left;"><strong>Serial No. :</strong>
|
||||
<span t-field="o.name"/></td>
|
||||
<td width="50%" style="text-align:right;"><strong>Date :</strong>
|
||||
<span t-field="o.today_date"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%" style="text-align:left;"><strong>Room No. :</strong>
|
||||
<span t-field="o.room_number"/></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br /><br />
|
||||
<p>
|
||||
We hereby certify that we have purchased today foreign currency from Mr./Mrs.  <strong><span t-field="o.guest_name"/></strong> 
|
||||
in <strong><span t-field="o.input_curr.name"/></strong> currency and paid net amount in <strong><span t-field="o.out_curr.name"/></strong> currency .
|
||||
Details are given below:
|
||||
</p>
|
||||
<br /><br />
|
||||
<p>
|
||||
A. Details of Foreign Currency Notes Purchased
|
||||
</p>
|
||||
<table class="table table-bordered" width="100%" >
|
||||
<tr>
|
||||
<th width="25%" style="text-align:center;"><strong>Currency purchased
|
||||
(indicating cash)</strong>
|
||||
</th>
|
||||
<th width="25%" style="text-align:center;"><strong>Amount</strong></th>
|
||||
<th width="25%" style="text-align:center;"><strong>Rate
|
||||
(per unit)</strong></th>
|
||||
<th width="25%" style="text-align:center;"><strong>Equivalent Amount</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:center;"><span t-field="o.type"/></td>
|
||||
<td style="text-align:center;"><span t-field="o.in_amount"/> <span t-field="o.input_curr.name"/></td>
|
||||
<td style="text-align:center;"><span t-field="o.rate"/></td>
|
||||
<td style="text-align:center;"><span t-field="o.out_amount"/> <span t-field="o.out_curr.name"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="80%"></td>
|
||||
<td width="10%" style="text-align:left;"><strong>Subtotal :</strong></td>
|
||||
<td width="10%" style="text-align:right;"><span t-field="o.out_amount"/> <span t-field="o.out_curr.name"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="80%"> </td><td width="10%"> </td><td width="10%"> </td></tr>
|
||||
<tr>
|
||||
<td width="80%"></td>
|
||||
<td width="10%" style="text-align:left;"><strong style = "margin-left:40px">Tax :</strong></td>
|
||||
<td width="10%" style="text-align:right;" ><span t-field="o.tax"/></td>
|
||||
</tr>
|
||||
<tr><td width="80%"> </td><td width="10%"> </td><td width="10%"> </td></tr>
|
||||
<tr>
|
||||
<td width="80%"></td>
|
||||
<td width="10%" style="text-align:left;"><strong style = "margin-left:28px">Total :</strong></td>
|
||||
<td width="10%" style="text-align:right;"><span t-field="o.total"/> <span t-field="o.out_curr.name"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br /><br /><br /><br /><br />
|
||||
<br />
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="50%" style="text-align:left;"><strong>.............................................</strong></td>
|
||||
<td width="50%" style="text-align:right;"><strong>.............................................</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%" style="text-align:left;"><strong>Guest signature</strong></td>
|
||||
<td width="50%" style="text-align:right;"><strong>Manager signature</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br /><br />
|
||||
<div class="row" align = "left">
|
||||
<span><b>Kind Regards</b></span>,<br />
|
||||
<b>Reservations Team </b><br />
|
||||
[<span t-field="o.hotel_id.name" ></span>]<br />
|
||||
<span t-field="o.hotel_id.partner_id.street"></span><br />
|
||||
<span t-field="o.hotel_id.partner_id.city"></span>,<br />
|
||||
<span t-field="o.hotel_id.partner_id.country_id.name"></span><br />
|
||||
<br />
|
||||
<span t-field="o.hotel_id.partner_id.website"></span> <br />
|
||||
</div>
|
||||
<br /><br />
|
||||
<p align = "center">
|
||||
* Valid for three months from the date of purchase of foreign currency *
|
||||
</p>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
79
hotel/views/res_config.xml
Normal file
79
hotel/views/res_config.xml
Normal file
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- Hotel Settings -->
|
||||
<record id="view_hotel_config_settings" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.view.form.inherit.hotel</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="80"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" data-string="Hotel" string="Hotel" data-key="hotel" groups="hotel.group_hotel_manager">
|
||||
<h2>Hotel Parity</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<label for="parity_pricelist_id"/>
|
||||
<div class="text-muted">
|
||||
Set pricelist parity
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="mt16">
|
||||
<field name="parity_pricelist_id" required="True" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<label for="parity_restrictions_id"/>
|
||||
<div class="text-muted">
|
||||
Set restrictions parity
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="mt16">
|
||||
<field name="parity_restrictions_id" required="True" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Hotel Default Hours</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-xs-12 col-md-12 o_setting_box">
|
||||
<label for="tz_hotel"/>
|
||||
<div class="text-muted">
|
||||
Set time-zone
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="mt16">
|
||||
<field name="tz_hotel"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<label for="default_arrival_hour"/>
|
||||
<div class="text-muted">
|
||||
Set default arrival hour
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="mt16">
|
||||
<field name="default_arrival_hour" required="True" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<label for="default_departure_hour"/>
|
||||
<div class="text-muted">
|
||||
Set default departure hour
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="mt16">
|
||||
<field name="default_departure_hour" required="True" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
56
hotel/views/reservation_restriction_item_views.xml
Normal file
56
hotel/views/reservation_restriction_item_views.xml
Normal file
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<!-- FORM restriction -->
|
||||
<record id="reservation_restriction_item_view_form" model="ir.ui.view">
|
||||
<field name="name">hotel.virtual.room.restriction.item.form</field>
|
||||
<field name="model">hotel.virtual.room.restriction.item</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Restrictions">
|
||||
<group>
|
||||
<field name="applied_on" widget="radio"/>
|
||||
<!-- <field name="virtual_room_id" attrs="{'invisible':[['applied_on', '=', '1_global']]}" required="True"/> -->
|
||||
<field name="room_type_id" attrs="{'invisible':[['applied_on', '=', '1_global']]}" required="True"/>
|
||||
</group>
|
||||
<group>
|
||||
<group>
|
||||
<field name="date_start"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="date_end"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group>
|
||||
<field name="min_stay"/>
|
||||
<field name="min_stay_arrival"/>
|
||||
<field name="max_stay"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="closed"/>
|
||||
<field name="closed_departure"/>
|
||||
<field name="closed_arrival"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- TREE restriction -->
|
||||
<record id="reservation_restriction_item_view_tree" model="ir.ui.view">
|
||||
<field name="name">hotel.virtual.room.restriction.item.tree</field>
|
||||
<field name="model">hotel.virtual.room.restriction.item</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Restrictions">
|
||||
<field name="applied_on"/>
|
||||
<!-- <field name="virtual_room_id" attrs="{'invisible':[['applied_on', '=', '1_virtual_room']]}"/> -->
|
||||
<field name="room_type_id" attrs="{'invisible':[['applied_on', '=', '0_room_type']]}"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<field name="min_stay"/>
|
||||
<field name="closed"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
61
hotel/views/reservation_restriction_views.xml
Normal file
61
hotel/views/reservation_restriction_views.xml
Normal file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<!-- FORM restriction -->
|
||||
<record id="reservation_restriction_view_form" model="ir.ui.view">
|
||||
<field name="name">hotel.virtual.room.restriction.form</field>
|
||||
<field name="model">hotel.virtual.room.restriction</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Restrictions">
|
||||
<sheet>
|
||||
<group>
|
||||
<h1><field name="name"/></h1>
|
||||
</group>
|
||||
<group>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
<div>
|
||||
<separator string="Pricelist Items"/>
|
||||
<field name="item_ids" nolabel="1">
|
||||
<tree string="Restriction Items">
|
||||
<field name="applied_on"/>
|
||||
<!-- <field name="virtual_room_id" attr="{'invisible':[['applied_on', '=', '1_virtual_room']]}"/> -->
|
||||
<field name="room_type_id" attr="{'invisible':[['applied_on', '=', '0_room_type']]}"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<field name="min_stay"/>
|
||||
<field name="closed"/>
|
||||
</tree>
|
||||
</field>
|
||||
</div>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- TREE restriction -->
|
||||
<record id="reservation_restriction_view_tree" model="ir.ui.view">
|
||||
<field name="name">hotel.virtual.room.restriction.tree</field>
|
||||
<field name="model">hotel.virtual.room.restriction</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Restrictions">
|
||||
<field name="name"/>
|
||||
<field name="active"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action of reservation restriction -->
|
||||
<record model="ir.actions.act_window" id="reservation_restriction_action">
|
||||
<field name="name">Reservation restrictions</field>
|
||||
<field name="res_model">hotel.virtual.room.restriction</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<!-- MENUS -->
|
||||
<menuitem name="Restrictions" id="reservation_restriction_menu"
|
||||
action="reservation_restriction_action" sequence="22"
|
||||
parent="hotel.configuration_others"/>
|
||||
|
||||
</odoo>
|
||||
59
hotel/views/virtual_room_availability.xml
Normal file
59
hotel/views/virtual_room_availability.xml
Normal file
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<!-- FORM availability -->
|
||||
<record id="virtual_room_availability_view_form" model="ir.ui.view">
|
||||
<field name="name">hotel.virtual.room.availability.form</field>
|
||||
<field name="model">hotel.virtual.room.availability</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Availability">
|
||||
<sheet>
|
||||
<group>
|
||||
<!-- <h1><field name="virtual_room_id" required="1"/></h1> -->
|
||||
<h1><field name="room_type_id" required="1"/></h1>
|
||||
</group>
|
||||
<group>
|
||||
<field name="date" required="1"/>
|
||||
<field name="avail"/>
|
||||
<field name="no_ota"/>
|
||||
<field name="booked"/>
|
||||
</group>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- TREE restriction -->
|
||||
<record id="virtual_room_availability_view_tree" model="ir.ui.view">
|
||||
<field name="name">hotel.virtual.room.availability.tree</field>
|
||||
<field name="model">hotel.virtual.room.availability</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Restrictions">
|
||||
<!-- <field name="virtual_room_id" required="1"/> -->
|
||||
<field name="room_type_id" required="1"/>
|
||||
<field name="date" required="1"/>
|
||||
<field name="avail"/>
|
||||
<field name="no_ota"/>
|
||||
<field name="booked"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action of reservation restriction -->
|
||||
<record model="ir.actions.act_window" id="virtual_room_availability_action">
|
||||
<field name="name">Virtual Room Availability</field>
|
||||
<field name="res_model">hotel.virtual.room.availability</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<!-- MENUS -->
|
||||
<menuitem name="Availability" id="virtual_room_availability_menu"
|
||||
action="virtual_room_availability_action" sequence="22"
|
||||
parent="hotel.configuration_others"/>
|
||||
|
||||
</odoo>
|
||||
72
hotel/views/virtual_room_views.xml
Normal file
72
hotel/views/virtual_room_views.xml
Normal file
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<!-- FORM Virtual Room -->
|
||||
<record id="virtual_room_view_form" model="ir.ui.view">
|
||||
<field name="name">virtual.room.view.form</field>
|
||||
<field name="model">hotel.virtual.room</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Virtual Room">
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="toggle_active" type="object"
|
||||
class="oe_stat_button" icon="fa-archive">
|
||||
<field name="active" widget="boolean_button"
|
||||
options='{"terminology": "archive"}'/>
|
||||
</button>
|
||||
</div>
|
||||
<group colspan="4">
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="virtual_code"/>
|
||||
<field name="list_price"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="total_rooms_count"/>
|
||||
<field name="max_real_rooms"/>
|
||||
<field name="room_type_ids" widget="many2many_tags" options="{'no_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group colspan="4">
|
||||
<group>
|
||||
<field name="room_ids"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="service_ids"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- TREE Virtual Room -->
|
||||
<record id="virtual_room_view_tree" model="ir.ui.view">
|
||||
<field name="name">virtual.room.view.tree</field>
|
||||
<field name="model">hotel.virtual.room</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Virtual Rooms">
|
||||
<field name="name"/>
|
||||
<field name="virtual_code"/>
|
||||
<field name="room_ids"/>
|
||||
<field name="room_type_ids"/>
|
||||
<field name="total_rooms_count"/>
|
||||
<field name="max_real_rooms"/>
|
||||
<field name="service_ids"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="virtual_room_action_form">
|
||||
<field name="name">Virtual Rooms</field>
|
||||
<field name="res_model">hotel.virtual.room</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<!-- MENUS -->
|
||||
<menuitem name="Virtual rooms" id="virtual_room_menu"
|
||||
action="virtual_room_action_form" sequence="40"
|
||||
parent="hotel.menu_hotel_room"/>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user