mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
930 lines
43 KiB
XML
930 lines
43 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<odoo>
|
|
<record model="ir.actions.act_window" id="open_pms_reservation_form_tree_all">
|
|
<field name="name">Reservation</field>
|
|
<field name="res_model">pms.reservation</field>
|
|
<field name="view_mode">tree,form,calendar,graph,pivot</field>
|
|
</record>
|
|
<record model="ir.ui.view" id="pms_reservation_view_form">
|
|
<field name="name">pms.reservation.form</field>
|
|
<field name="model">pms.reservation</field>
|
|
<field name="priority">20</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Reservation">
|
|
<header>
|
|
<field name="splitted" invisible="True" />
|
|
<field name="tax_ids" invisible="1" />
|
|
<field name="checkin_today" invisible="1" />
|
|
<field name="checkin_partner_count" invisible="1" />
|
|
<button
|
|
name="confirm"
|
|
string="Confirm"
|
|
class="oe_highlight"
|
|
type="object"
|
|
attrs="{'invisible':[('state','not in',('draft','cancelled'))]}"
|
|
/>
|
|
<button
|
|
name="action_cancel"
|
|
string="Cancel Reservation"
|
|
type="object"
|
|
attrs="{'invisible':['|',('folio_id', '=', False),('state','not in',('confirm','onboard'))]}"
|
|
/>
|
|
<button
|
|
name="action_reservation_checkout"
|
|
string="Check Out"
|
|
states="onboard,no_checkout"
|
|
type="object"
|
|
/>
|
|
<button
|
|
name="draft"
|
|
string="Set to Draft"
|
|
states="cancelled"
|
|
class="oe_highlight"
|
|
type="object"
|
|
/>
|
|
<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 try to
|
|
unify the reservation here
|
|
<bold>
|
|
<button
|
|
class="alert-link"
|
|
type="object"
|
|
name="open_reservation_wizard"
|
|
string="Unify the reservation"
|
|
/>
|
|
</bold>
|
|
</div>
|
|
<sheet>
|
|
<field name="shared_folio" invisible="1" />
|
|
<field name="left_for_checkin" invisible="1" />
|
|
<field name="ready_for_checkin" invisible="1" />
|
|
<field name="departure_today" invisible="1" />
|
|
<div
|
|
class="oe_button_box"
|
|
name="button_box"
|
|
attrs="{'invisible': [('folio_id','=',False)]}"
|
|
>
|
|
<button
|
|
type="object"
|
|
class="oe_stat_button"
|
|
icon="fa-file"
|
|
name="open_folio"
|
|
>
|
|
<div class="o_field_widget o_stat_info">
|
|
<span class="o_stat_text">
|
|
<field name="folio_id" readonly="1" nolabel="1" />
|
|
</span>
|
|
</div>
|
|
</button>
|
|
<button
|
|
type="object"
|
|
class="oe_stat_button"
|
|
id="payment_smart_button"
|
|
icon="fa-money"
|
|
name="action_pay_folio"
|
|
attrs="{'invisible': [('folio_pending_amount','<=',0)]}"
|
|
>
|
|
<div class="o_field_widget o_stat_info">
|
|
<span class="o_stat_value">
|
|
<field
|
|
name="folio_pending_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"
|
|
name="action_onboard"
|
|
attrs="{'invisible': [
|
|
('ready_for_checkin', '!=', True),
|
|
]}"
|
|
>
|
|
<field
|
|
name="checkins_ratio"
|
|
string="On Board"
|
|
widget="percentpie"
|
|
/>
|
|
</button>
|
|
<button
|
|
type="object"
|
|
class="oe_stat_button"
|
|
name="action_checks"
|
|
attrs="{'invisible': [
|
|
('left_for_checkin', '!=', True),
|
|
]}"
|
|
>
|
|
<field
|
|
name="ratio_checkin_data"
|
|
string="Checkin Data"
|
|
widget="percentpie"
|
|
/>
|
|
</button>
|
|
</div>
|
|
<widget
|
|
name="web_ribbon"
|
|
title="Paid"
|
|
attrs="{'invisible': [('folio_payment_state', '!=', 'paid')]}"
|
|
/>
|
|
<widget
|
|
name="web_ribbon"
|
|
title="Partial"
|
|
bg_color="bg-warning"
|
|
attrs="{'invisible': [('folio_payment_state', '!=', 'partial')]}"
|
|
/>
|
|
<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 nolabel="1" colspan="2" name="name" />
|
|
<field
|
|
name="room_type_id"
|
|
placeholder="Room Type"
|
|
on_change="1"
|
|
nolabel="1"
|
|
context="{'checkin': checkin, 'checkout': checkout, 'pms_property_id':pms_property_id, 'pricelist_id':pricelist_id}"
|
|
options="{'no_create': True,'no_open': True}"
|
|
attrs="{'readonly':[('state','not in',('draft'))]}"
|
|
style="margin-right: 30px;"
|
|
/>
|
|
<field
|
|
name="partner_id"
|
|
default_focus="1"
|
|
placeholder="Lastname, Firstname"
|
|
attrs="{'invisible':[('reservation_type','in',('out'))]}"
|
|
required="1"
|
|
/>
|
|
<field
|
|
name="closure_reason_id"
|
|
default_focus="1"
|
|
options="{'no_create': True,'no_open': True}"
|
|
placeholder="Closure Reason"
|
|
attrs="{'invisible':[('reservation_type','not in',('out'))]}"
|
|
/>
|
|
</h1>
|
|
<h3>
|
|
<field
|
|
name="preferred_room_id"
|
|
select="1"
|
|
nolabel="1"
|
|
options="{'no_create': True,'no_open': True}"
|
|
placeholder="Room"
|
|
style="margin-right: 30px;"
|
|
attrs="{'invisible': [('splitted','=',True)]}"
|
|
/>
|
|
<field
|
|
name="checkin"
|
|
widget="daterange"
|
|
nolabel="1"
|
|
class="oe_inline"
|
|
options="{'related_end_date': 'checkout'}"
|
|
/>
|
|
<i
|
|
class="fa fa-long-arrow-right mx-2"
|
|
aria-label="Arrow icon"
|
|
title="Arrow"
|
|
/>
|
|
<field
|
|
name="checkout"
|
|
widget="daterange"
|
|
nolabel="1"
|
|
class="oe_inline"
|
|
options="{'related_start_date': 'checkin'}"
|
|
/>
|
|
</h3>
|
|
<field
|
|
name="out_service_description"
|
|
placeholder="Out service description"
|
|
attrs="{'invisible':[('reservation_type','not in',('out'))]}"
|
|
/>
|
|
<group col="8">
|
|
<group
|
|
colspan="2"
|
|
col="3"
|
|
string="General Info"
|
|
name="contact_details"
|
|
>
|
|
<field
|
|
name="email"
|
|
colspan="2"
|
|
nolabel="1"
|
|
placeholder="email"
|
|
widget="email"
|
|
force_save="1"
|
|
attrs="{'invisible': [('reservation_type','in',('out'))],
|
|
'readonly': [('partner_id', '!=', False),
|
|
('email','!=', False)]}"
|
|
/>
|
|
<field
|
|
name="mobile"
|
|
colspan="2"
|
|
nolabel="1"
|
|
placeholder="mobile"
|
|
widget="phone"
|
|
force_save="1"
|
|
attrs="{'invisible': [('reservation_type','in',('out'))],
|
|
'readonly': [('partner_id', '!=', False),
|
|
('mobile','!=', False)]}"
|
|
/>
|
|
<field
|
|
placeholder="Partner Notes"
|
|
colspan="2"
|
|
nolabel="1"
|
|
name="partner_internal_comment"
|
|
string="Partner Note"
|
|
attrs="{'invisible': [('reservation_type','in',('out'))]}"
|
|
/>
|
|
<field name="nights" />
|
|
<field placeholder="Arrival Hour" name="arrival_hour" />
|
|
<field placeholder="Departure Hour" name="departure_hour" />
|
|
</group>
|
|
<group
|
|
colspan="2"
|
|
col="3"
|
|
string="Reservation Details"
|
|
name="reservation_details"
|
|
>
|
|
<field name="show_update_pricelist" invisible="1" />
|
|
<field
|
|
name="pricelist_id"
|
|
options="{'no_open':True,'no_create': True}"
|
|
/>
|
|
<button
|
|
name="update_prices"
|
|
type="object"
|
|
string=" Update Prices"
|
|
help="Recompute all prices based on this pricelist"
|
|
class="btn-link mb-1 px-0"
|
|
icon="fa-refresh"
|
|
confirm="This will update all unit prices based on the currently set pricelist."
|
|
attrs="{'invisible': ['|', ('show_update_pricelist', '=', False), ('state', 'in', ['done'])]}"
|
|
/>
|
|
<!--<field
|
|
name="agency_id"
|
|
options="{'no_create': True,'no_open': True}"
|
|
/>-->
|
|
<field
|
|
name="cancelled_reason"
|
|
attrs="{'invisible': [('state', 'not in', ('cancelled'))]}"
|
|
/>
|
|
<field
|
|
name="adults"
|
|
attrs="{'invisible': [('reservation_type','in',('out'))]}"
|
|
/>
|
|
<field
|
|
name="children"
|
|
attrs="{'invisible': [('reservation_type','in',('out'))]}"
|
|
/>
|
|
<field
|
|
name="children_occupying"
|
|
attrs="{'invisible': [('children', '=', 0)]}"
|
|
/>
|
|
<field name="qty_invoiced" invisible="1" />
|
|
<field name="qty_to_invoice" invisible="1" />
|
|
<field name="allowed_room_ids" invisible="1" />
|
|
<field name="folio_payment_state" invisible="1" />
|
|
<!-- TODO: How to filter to avoid show False (generic) pricelist board when exist a specific pricelist board¿? -->
|
|
<field
|
|
name="board_service_room_id"
|
|
domain="[
|
|
('pms_room_type_id', '=', room_type_id),
|
|
('pricelist_id', 'in', [pricelist_id, False])]"
|
|
options="{'no_create': True,'no_open': True}"
|
|
attrs="{'invisible': [('reservation_type','in',('out'))]}"
|
|
/>
|
|
<field
|
|
name="folio_internal_comment"
|
|
colspan="2"
|
|
nolabel="1"
|
|
placeholder="Reservation Notes"
|
|
/>
|
|
<field name="agency_id" />
|
|
<field
|
|
name="channel_type_id"
|
|
attrs="{'readonly':[('agency_id','!=', False)]}"
|
|
/>
|
|
</group>
|
|
<group
|
|
colspan="2"
|
|
class="oe_subtotal_footer oe_right"
|
|
name="reservation_total"
|
|
string="Amounts"
|
|
>
|
|
<field
|
|
name="price_services"
|
|
string="Only Services"
|
|
widget="monetary"
|
|
options="{'currency_field': 'currency_id'}"
|
|
/>
|
|
<field
|
|
name="price_total"
|
|
string="Only Room"
|
|
widget="monetary"
|
|
options="{'currency_field': 'currency_id'}"
|
|
/>
|
|
<field
|
|
name="discount"
|
|
string="Discount Room"
|
|
widget="monetary"
|
|
options="{'currency_field': 'currency_id'}"
|
|
/>
|
|
<field name="price_subtotal" invisible="1" />
|
|
<div
|
|
class="oe_subtotal_footer_separator oe_inline o_td_label"
|
|
>
|
|
<label
|
|
for="price_room_services_set"
|
|
string="Reservation Total"
|
|
/>
|
|
</div>
|
|
<field
|
|
name="price_room_services_set"
|
|
nolabel="1"
|
|
class="oe_subtotal_footer_separator"
|
|
widget="monetary"
|
|
options="{'currency_field': 'currency_id'}"
|
|
/>
|
|
<field
|
|
name="commission_percent"
|
|
string="Commission percent (%)"
|
|
/>
|
|
<field
|
|
name="commission_amount"
|
|
string="Commission Amount"
|
|
widget='monetary'
|
|
options="{'currency_field': 'currency_id'}"
|
|
/>
|
|
<field name="invoice_status" invisible="1" />
|
|
<field name="currency_id" invisible="1" />
|
|
<field
|
|
name="preconfirm"
|
|
attrs="{'invisible':[('folio_id', '!=', False)]}"
|
|
/>
|
|
<field
|
|
name="credit_card_details"
|
|
nolabel="1"
|
|
placeholder="Credit Card Details"
|
|
colspan="2"
|
|
attrs="{'invisible':[('folio_id','!=',False),('folio_pending_amount','<=',0)]}"
|
|
/>
|
|
</group>
|
|
<div class="oe_clear" />
|
|
</group>
|
|
<group invisible="1">
|
|
<field
|
|
name="company_id"
|
|
options="{'no_create': True}"
|
|
groups="base.group_multi_company"
|
|
/>
|
|
<field name="pms_property_id" invisible="1" />
|
|
<!-- <field name="check_rooms" invisible="1"/> -->
|
|
<field name="checkin_partner_pending_count" invisible="1" />
|
|
<!-- <field name="product_uom" string="Rent(UOM)" invisible="1" /> -->
|
|
</group>
|
|
<notebook>
|
|
<page name="detail" string="Detail">
|
|
<field name="reservation_line_ids" nolabel="1">
|
|
<tree create="false" delete="false" editable="bottom">
|
|
<field
|
|
name="room_id"
|
|
attrs="{'column_invisible': [('parent.splitted','=', False)]}"
|
|
/>
|
|
<field name="date" readonly="1" force_save="1" />
|
|
<field name="price" />
|
|
<field name="discount" />
|
|
<field name="move_line_ids" invisible="1" />
|
|
<field
|
|
name="cancel_discount"
|
|
attrs="{'column_invisible': [('parent.state','!=','cancelled')]}"
|
|
/>
|
|
</tree>
|
|
</field>
|
|
<group string="Services" name="reservation_services">
|
|
<field
|
|
name="service_ids"
|
|
context="{'default_reservation_id': active_id, 'default_folio_id': folio_id, 'form_view_ref':'pms.pms_service_view_form'}"
|
|
nolabel="1"
|
|
>
|
|
<!-- If charge this view with tree_view_ref, its !crash! (field not found) when open reservation form from folio form... ¿?-->
|
|
<tree
|
|
string="Services"
|
|
editable="bottom"
|
|
decoration-success="is_board_service == True"
|
|
>
|
|
<field name="is_board_service" invisible="1" />
|
|
<field name="company_id" invisible="0" />
|
|
<field name="pms_property_id" invisible="0" />
|
|
<button
|
|
type="object"
|
|
class="oe_stat_button"
|
|
icon="fa-1x fa-bed"
|
|
name="open_service_ids"
|
|
attrs="{'invisible':[('is_board_service','=', False)]}"
|
|
/>
|
|
<field
|
|
name="per_day"
|
|
invisible="1"
|
|
readonly="1"
|
|
/>
|
|
<field name="folio_id" invisible="1" />
|
|
<field
|
|
name="reservation_id"
|
|
invisible="1"
|
|
attrs="{'required': [('per_day','=',True)]}"
|
|
/>
|
|
<field
|
|
name="product_id"
|
|
domain="[('sale_ok', '=', True)]"
|
|
options="{'no_create': True,'no_open': True}"
|
|
/>
|
|
<field name="name" />
|
|
<field
|
|
name="product_qty"
|
|
attrs="{'readonly': [('per_day','=',True)]}"
|
|
force_save="1"
|
|
/>
|
|
<button
|
|
type="object"
|
|
class="oe_stat_button"
|
|
icon="fa-2x fa-bars"
|
|
name="open_service_ids"
|
|
attrs="{'invisible': [('per_day','=',False)]}"
|
|
/>
|
|
<field name="price_unit" />
|
|
<field name="discount" />
|
|
<field name="tax_ids" widget="many2many_tags" />
|
|
<field name="price_subtotal" />
|
|
<field name="price_tax" />
|
|
<field name="price_total" />
|
|
<field name="service_line_ids" invisible="1">
|
|
<tree string="Days">
|
|
<field name="date" />
|
|
<field name="day_qty" />
|
|
</tree>
|
|
</field>
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
</page>
|
|
<page
|
|
name="persons"
|
|
string="Persons"
|
|
attrs="{'invisible': [('reservation_type','in',('out'))]}"
|
|
>
|
|
<group colspan="2" cols="6">
|
|
<field
|
|
name="segmentation_ids"
|
|
widget="many2many_tags"
|
|
placeholder="Segmentation..."
|
|
options="{'no_create': True,'no_open': True}"
|
|
/>
|
|
</group>
|
|
<field
|
|
name="checkin_partner_ids"
|
|
mode="kanban"
|
|
options="{'no_create': True, 'no_delete': True}"
|
|
context="{
|
|
'kanban_view_ref':'pms.pms_checkin_partner_kanban_view',
|
|
}"
|
|
/>
|
|
</page>
|
|
<page
|
|
name="invoicing"
|
|
string="Invoicing"
|
|
attrs="{'invisible': [('reservation_type','in',('out'))]}"
|
|
>
|
|
<group>
|
|
<field
|
|
name="partner_invoice_id"
|
|
string="Contact Invoiced"
|
|
/>
|
|
</group>
|
|
</page>
|
|
<page name="others" string="Others">
|
|
<div class="row">
|
|
<div class="col-6">
|
|
<group>
|
|
<field name="user_id" />
|
|
<field name="pms_property_id" />
|
|
<field name="localizator" />
|
|
<field name="overbooking" />
|
|
</group>
|
|
<group>
|
|
<!--<field
|
|
name="channel_type"
|
|
attrs="{'required':[('reservation_type','not in',('staff','out'))]}"
|
|
/>-->
|
|
<field name="reservation_type" />
|
|
</group>
|
|
</div>
|
|
<div class="col-6">
|
|
<group>
|
|
<field name="requests" />
|
|
</group>
|
|
</div>
|
|
</div>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids" />
|
|
<field name="activity_ids" />
|
|
<field name="message_ids" />
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Calendar -->
|
|
<record id="pms_reservation_view_calendar" model="ir.ui.view">
|
|
<field name="name">pms.reservation.view.calendar</field>
|
|
<field name="model">pms.reservation</field>
|
|
<field name="arch" type="xml">
|
|
<calendar
|
|
date_start="checkin_datetime"
|
|
date_stop="checkout_datetime"
|
|
string="Reservations"
|
|
quick_add="False"
|
|
mode="month"
|
|
color="room_type_id"
|
|
scales="month,year"
|
|
>
|
|
<field name="room_type_id" filters="1" />
|
|
<field name="preferred_room_id" filters="1" />
|
|
<field name="partner_id" avatar_field="image_128" />
|
|
<field name="rooms" />
|
|
</calendar>
|
|
</field>
|
|
</record>
|
|
<record model="ir.ui.view" id="pms_reservation_view_tree">
|
|
<field name="name">pms.reservation.tree</field>
|
|
<field name="model">pms.reservation</field>
|
|
<field name="arch" type="xml">
|
|
<tree
|
|
string="Reservation"
|
|
multi_edit="1"
|
|
sample="1"
|
|
class="o_sale_order"
|
|
decoration-warning="splitted"
|
|
decoration-bf="splitted"
|
|
js_class="pms_booking_engine_request_tree"
|
|
>
|
|
<!--TODO: charget booking engine button (view type list is not present
|
|
in the view registry -->
|
|
<!--js_class="pms_booking_engine_request_tree"-->
|
|
<field name="splitted" invisible="1" />
|
|
<field name="pricelist_id" invisible="1" />
|
|
<field name="rooms" />
|
|
<field name="checkin" />
|
|
<field name="checkout" widget="date" />
|
|
<field name="nights" />
|
|
<button
|
|
type="object"
|
|
class="oe_stat_button"
|
|
icon="fa-file"
|
|
name="open_folio"
|
|
/>
|
|
<field name="folio_id" decoration-bf="1" />
|
|
<field name="allowed_room_ids" invisible="1" />
|
|
<field name="partner_id" />
|
|
<field name="room_type_id" optional="show" />
|
|
<field name="adults" optional="show" />
|
|
<field name="ratio_checkin_data" widget="progressbar" optional="show" />
|
|
<field name="overbooking" invisible="1" />
|
|
<field name="activity_ids" widget="list_activity" optional="show" />
|
|
<field name="user_id" optional="show" widget="many2one_avatar_user" />
|
|
<!-- <field name="origin" /> -->
|
|
<field name="checkin_partner_ids" invisible="1" />
|
|
<field name="to_assign" invisible="1" />
|
|
<field name="checkin_partner_pending_count" invisible="1" />
|
|
<field name="tax_ids" invisible="1" />
|
|
<field name="price_subtotal" invisible="1" />
|
|
<field name="price_total" />
|
|
<field name="folio_pending_amount" string="Folio Pending Amount" />
|
|
<field
|
|
name="state"
|
|
decoration-success="state == 'onboard'"
|
|
decoration-info="state == 'confirm'"
|
|
decoration-primary="state == 'no_checkout'"
|
|
decoration-danger="state == 'cancelled'"
|
|
decoration-bf="state == 'draft'"
|
|
decoration-warning="state == 'no_show'"
|
|
widget="badge"
|
|
optional="show"
|
|
/>
|
|
<field
|
|
name="folio_payment_state"
|
|
decoration-success="folio_payment_state == 'paid'"
|
|
decoration-danger="folio_payment_state == 'not_paid' and state in ['cancelled','onboard','done','no_show','no_checkout']"
|
|
decoration-info="folio_payment_state == 'not_paid' and state in ['draft','confirm',]"
|
|
decoration-warning="folio_payment_state == 'partial'"
|
|
widget="badge"
|
|
optional="show"
|
|
/>
|
|
<field
|
|
name="company_id"
|
|
groups="base.group_multi_company"
|
|
optional="show"
|
|
readonly="1"
|
|
/>
|
|
<field
|
|
name="pms_property_id"
|
|
groups="base.group_multi_company"
|
|
optional="show"
|
|
readonly="1"
|
|
/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<!-- Tree editable BOTTOM view of reservation -->
|
|
<record model="ir.ui.view" id="pms_reservation_view_bottom_tree">
|
|
<field name="name">pms.reservation.tree</field>
|
|
<field name="model">pms.reservation</field>
|
|
<field name="inherit_id" ref="pms.pms_reservation_view_tree" />
|
|
<field name="mode">primary</field>
|
|
<field name="arch" type="xml">
|
|
<tree position="attributes">
|
|
<attribute name="editable">bottom</attribute>
|
|
<attribute name="delete">false</attribute>
|
|
<attribute name="string">Rooms</attribute>
|
|
</tree>
|
|
<xpath expr="//field[@name='state']" position="before">
|
|
<button
|
|
type="object"
|
|
class="oe_stat_button"
|
|
icon="fa-2x fa-suitcase"
|
|
name="open_reservation_form"
|
|
help="Open Reservation Room Detail"
|
|
/>
|
|
</xpath>
|
|
<xpath expr="//field[@name='folio_id']" position="attributes">
|
|
<attribute name="invisible">1</attribute>
|
|
</xpath>
|
|
<!-- <xpath expr="//button[@name='open_folio'][1]" position="attributes">
|
|
<attribute name="invisible">True</attribute>
|
|
</xpath>
|
|
<xpath expr="//button[@name='open_folio'][2]" position="attributes">
|
|
<attribute name="invisible">True</attribute>
|
|
</xpath>
|
|
<xpath
|
|
expr="//button[@name='%(open_pms_reservation_form_tree_all)d']"
|
|
position="attributes"
|
|
>
|
|
<attribute name="invisible">True</attribute>
|
|
</xpath> -->
|
|
<xpath expr="//field[@name='partner_id']" position="attributes">
|
|
<attribute name="invisible">True</attribute>
|
|
</xpath>
|
|
<xpath expr="//field[@name='folio_pending_amount']" position="attributes">
|
|
<attribute name="invisible">True</attribute>
|
|
</xpath>
|
|
<xpath expr="//field[@name='user_id']" position="attributes">
|
|
<attribute name="invisible">True</attribute>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
<record model="ir.ui.view" id="pms_reservation_view_search">
|
|
<field name="name">pms.reservation.search</field>
|
|
<field name="model">pms.reservation</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Reservation Detail">
|
|
<field name="partner_id" />
|
|
<field name="folio_id" />
|
|
<field name="agency_id" />
|
|
<filter
|
|
string="My Reservations"
|
|
name="my_reservations"
|
|
domain="[('user_id', '=', uid)]"
|
|
/>
|
|
<filter
|
|
string="Cancelled"
|
|
name="cancelled"
|
|
domain="[('state', '=', 'cancelled')]"
|
|
/>
|
|
<filter
|
|
string="On Board"
|
|
name="on_board"
|
|
domain="[('state','in',['onboard'])]"
|
|
help="Current Booking"
|
|
/>
|
|
<filter
|
|
string="To enter"
|
|
name="to_enter"
|
|
domain="[('left_for_checkin', '=', True)]"
|
|
/>
|
|
<filter
|
|
string="Overbookings"
|
|
name="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', 'in', ['confirm','onboard'])]"
|
|
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', 'in', ['confirm','onboard'])]"
|
|
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', 'in', ['confirm','onboard'])]"
|
|
help="Show all reservations for which date enter is before than aprox. 1 month"
|
|
/>
|
|
<filter
|
|
string="To Assign"
|
|
name="to_assign"
|
|
domain="[('to_assign','=',True)]"
|
|
/>
|
|
<separator />
|
|
<!--<filter
|
|
string="Web"
|
|
name="web"
|
|
domain="[('channel_type', '=', 'web')]"
|
|
/>
|
|
<filter
|
|
string="Door"
|
|
name="door"
|
|
domain="[('channel_type', '=', 'door')]"
|
|
/>
|
|
<filter
|
|
string="Mail"
|
|
name="mail"
|
|
domain="[('channel_type', '=', 'mail')]"
|
|
/>
|
|
<filter
|
|
string="Phone"
|
|
name="phone"
|
|
domain="[('channel_type', '=', 'phone')]"
|
|
/>-->
|
|
<separator />
|
|
<filter
|
|
string="Still to be paid"
|
|
name="still_to_be_paid"
|
|
domain="[('folio_id.pending_amount','>',0)]"
|
|
/>
|
|
<filter
|
|
string="Late Payment"
|
|
name="late_payment"
|
|
domain="[('folio_id.pending_amount','>',0),('state','in',['done'])]"
|
|
/>
|
|
<filter
|
|
string="Lates and NoShows"
|
|
name="lates_and_noshows"
|
|
domain="[('cancelled_reason','in',['late','noshow'])]"
|
|
/>
|
|
<separator />
|
|
<filter
|
|
string="Staff"
|
|
name="staff"
|
|
domain="[('reservation_type','in',['staff'])]"
|
|
/>
|
|
<filter
|
|
string="Out of Service"
|
|
name="out_of_service"
|
|
domain="[('reservation_type','in',['dontsell'])]"
|
|
/>
|
|
<group expand="0" string="Group By">
|
|
<!-- <filter string="Room Type" domain="[]"
|
|
context="{'group_by':'room_type_id'}"/> -->
|
|
<filter
|
|
string="Room Type"
|
|
domain="[]"
|
|
name="room_type"
|
|
context="{'group_by':'room_type_id'}"
|
|
/>
|
|
<filter
|
|
string="Creation Date"
|
|
domain="[]"
|
|
name="creation_date"
|
|
context="{'group_by':'create_date'}"
|
|
/>
|
|
<filter
|
|
string="Checkin Date"
|
|
domain="[]"
|
|
name="checkin_date"
|
|
context="{'group_by':'checkin'}"
|
|
/>
|
|
<filter
|
|
string="Created By"
|
|
domain="[]"
|
|
name="created_by"
|
|
context="{'group_by':'user_id'}"
|
|
/>
|
|
</group>
|
|
<searchpanel>
|
|
<field
|
|
name="state"
|
|
string="State"
|
|
enable_counters="1"
|
|
select="multi"
|
|
/>
|
|
<field
|
|
name="folio_payment_state"
|
|
string="Payment State"
|
|
enable_counters="1"
|
|
select="multi"
|
|
/>
|
|
<field
|
|
name="room_type_id"
|
|
string="Room Type"
|
|
enable_counters="1"
|
|
icon="fa-hotel"
|
|
color="#784f73"
|
|
/>
|
|
<field
|
|
name="pricelist_id"
|
|
string="Pricelist"
|
|
enable_counters="1"
|
|
icon="fa-bookmark"
|
|
color="#875A7B"
|
|
/>
|
|
<field
|
|
name="channel_type_id"
|
|
string="Channel"
|
|
enable_counters="1"
|
|
icon="fa-sitemap"
|
|
expand="1"
|
|
/>
|
|
</searchpanel>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="pms_reservation_pivot" model="ir.ui.view">
|
|
<field name="name">pms.reservation.pivot</field>
|
|
<field name="model">pms.reservation</field>
|
|
<field name="arch" type="xml">
|
|
<pivot string="Reservations">
|
|
<field name="checkout" type="row" interval="month" />
|
|
<field name="room_type_id" type="col" />
|
|
<field name="price_total" type="measure" />
|
|
</pivot>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="pms_reservation_graph" model="ir.ui.view">
|
|
<field name="name">pms.reservation.graph</field>
|
|
<field name="model">pms.reservation</field>
|
|
<field name="arch" type="xml">
|
|
<graph string="Reservations">
|
|
<field name="checkout" type="row" interval="day" />
|
|
<field name="room_type_id" type="col" />
|
|
<field name="price_total" type="measure" />
|
|
</graph>
|
|
</field>
|
|
</record>
|
|
|
|
<menuitem
|
|
name="Reservation Rooms"
|
|
id="menu_reservation_rooms"
|
|
action="open_pms_reservation_form_tree_all"
|
|
sequence="5"
|
|
parent="pms.menu_reservations"
|
|
/>
|
|
</odoo>
|