<?xml version="1.0" ?>
<odoo>
    <record id="product_pricelist_item_view_form" model="ir.ui.view">
        <field name="model">product.pricelist.item</field>
        <field name="inherit_id" ref="product.product_pricelist_item_form_view" />
        <field name="arch" type="xml">
            <xpath expr="//field[@name='applied_on']" position="before">
                <field name="allowed_board_service_product_ids" invisible="1" />
                <field name="allowed_board_service_room_type_ids" invisible="1" />

                <field
                    name="board_service_room_type_id"
                    options="{'no_create': True,'no_open': True}"
                    domain="[('id', 'in',allowed_board_service_room_type_ids)]"
                />

            </xpath>
            <xpath expr="//field[@name='min_quantity']" position="before">
                <field
                    name="pms_property_ids"
                    widget="many2many_tags"
                    options="{'no_create': True,'no_open': True}"
                />
            </xpath>
            <xpath expr="//field[@name='date_end']" position="after">
                <field name="date_start_consumption" />
                <field name="date_end_consumption" />
            </xpath>
            <xpath expr="//field[@name='product_id']" position="attributes">
                <attribute
                    name="domain"
                >[('id', 'in',allowed_board_service_product_ids)]</attribute>
            </xpath>
        </field>
    </record>
    <record id="product_pricelist_item_view_tree" model="ir.ui.view">
        <field name="model">product.pricelist.item</field>
        <field name="arch" type="xml">
            <tree>
                <field name="pricelist_id" />
                <field string="Applicable on" name="name" />
                <field name="board_service_room_type_id" />
                <field string="Sale Date Start" name="date_start" />
                <field string="Sale Date End" name="date_end" />
                <field name="date_start_consumption" />
                <field name="date_end_consumption" />
                <field name="price" />
                <field name="pms_property_ids" widget="many2many_tags" />
            </tree>
        </field>
    </record>

    <record id="product_pricelist_item_action2" model="ir.actions.act_window">
        <field name="name">Pricelists Items</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">product.pricelist.item</field>
        <field name="context">{'group_by':'pricelist_id'}</field>
        <field name="view_id" ref="product_pricelist_item_view_tree" />
        <field name="view_mode">tree</field>
    </record>
</odoo>
