mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
113 lines
5.3 KiB
XML
113 lines
5.3 KiB
XML
<?xml version="1.0"?>
|
|
<odoo>
|
|
|
|
<record id="hotel_reservation_view_form" model="ir.ui.view">
|
|
<field name="model">hotel.reservation</field>
|
|
<field name="inherit_id" ref="hotel.view_hotel_reservation_form" />
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='channel_type']" position="after">
|
|
<!-- field name="channel_reservation_id" attrs='{"readonly": [("able_to_modify_channel","=",False)], "invisible":[("channel_type","!=", "web")]}' string="OTA"/-->
|
|
</xpath>
|
|
<xpath expr="//field[@name='checkin_partner_pending_count']" position="before">
|
|
<group colspan="6" col="6">
|
|
<field name="is_from_ota" readonly="True" invisible="True"/>
|
|
</group>
|
|
</xpath>
|
|
|
|
<xpath expr="//field[@name='partner_internal_comment']" position="after">
|
|
<field name="able_to_modify_channel" invisible="True"/>
|
|
<!-- <field name="customer_notes" readonly="1"
|
|
attrs="{'invisible': [('channel_reservation_id','=',False)]}"
|
|
nolabel="1" colspan="2"
|
|
/> -->
|
|
</xpath>
|
|
|
|
<xpath expr="//page[@name='days']" position="after">
|
|
<page name="connector" string="Channel Connector">
|
|
<group string="Hotel Channel Bindings">
|
|
<field name="channel_bind_ids" nolabel="1">
|
|
<tree>
|
|
<field name="backend_id"/>
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
</page>
|
|
</xpath>
|
|
|
|
<!-- ALLOW ONLY-READ -->
|
|
<xpath expr="//field[@name='adults']" position="attributes">
|
|
<attribute name="attrs">{'readonly': [('is_from_ota','=',True),('able_to_modify_channel','=',False)]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//field[@name='room_type_id']" position="attributes">
|
|
<!-- attribute name="attrs">{'readonly': [('channel_reservation_id','!=',False),('able_to_modify_channel','=',False)]}</attribute-->
|
|
<attribute name="attrs">{'readonly': [('able_to_modify_channel','=',False)]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//field[@name='children']" position="attributes">
|
|
<attribute name="attrs">{'readonly': [('is_from_ota','=',True),('able_to_modify_channel','=',False)]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//field[@name='checkin']" position="attributes">
|
|
<attribute name="attrs">{'readonly': [('is_from_ota','=',True),('able_to_modify_channel','=',False)]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//field[@name='checkout']" position="attributes">
|
|
<attribute name="attrs">{'readonly': [('is_from_ota','=',True),('able_to_modify_channel','=',False)]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//field[@name='reservation_line_ids']" position="attributes">
|
|
<attribute name="attrs">{'readonly': [('is_from_ota','=',True),('able_to_modify_channel','=',False)]}</attribute>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
|
|
<!-- Tree view of hotel reservation -->
|
|
<record model="ir.ui.view" id="view_hotel_reservation_tree">
|
|
<field name="model">hotel.reservation</field>
|
|
<field name="inherit_id" ref="hotel.view_hotel_reservation_tree" />
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='checkout']" position="after">
|
|
<field name="origin_sale"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Search view of hotel reservation -->
|
|
<record model="ir.ui.view" id="view_hotel_reservation_search">
|
|
<field name="model">hotel.reservation</field>
|
|
<field name="inherit_id" ref="hotel.view_hotel_reservation_search" />
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='folio_id']" position="after">
|
|
<!-- field name="wchannel_reservation_code"/-->
|
|
</xpath>
|
|
<xpath expr="//group" position="inside">
|
|
<filter name="origin" string="Origin" domain="[]"
|
|
context="{'group_by':'origin_sale'}"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<!--graph view of hotel reservation -->
|
|
<record id="view_hotel_reservation_graph" model="ir.ui.view">
|
|
<field name="name">view.hotel.reservation.graph</field>
|
|
<field name="model">hotel.reservation</field>
|
|
<field name="arch" type="xml">
|
|
<graph type="bar">
|
|
<field name="origin_sale" string="Origin"/>
|
|
<field name="price_total" type="measure" />
|
|
</graph>
|
|
</field>
|
|
</record>
|
|
|
|
<!--pivot view of hotel reservation -->
|
|
<record id="view_hotel_pivot_graph" model="ir.ui.view">
|
|
<field name="name">view.hotel.pivot.graph</field>
|
|
<field name="model">hotel.reservation</field>
|
|
<field name="arch" type="xml">
|
|
<pivot string="Reservations">
|
|
<field name="checkin" type="row" />
|
|
<field name="origin_sale" string="Origin" type="col" />
|
|
<field name="price_total" string="Price" type="measure" />
|
|
</pivot>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|