<?xml version="1.0"?>
<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
    <data>

        <record model="ir.ui.view" id="price_list_view_form">
            <field name="model">product.price_list</field>
            <field name="type">form</field>
            <field name="name">price_list_form</field>
        </record>

        <record model="ir.ui.view" id="price_list_view_tree">
            <field name="model">product.price_list</field>
            <field name="type">tree</field>
            <field name="name">price_list_tree</field>
        </record>

        <record model="ir.action.act_window" id="act_price_list_form">
            <field name="name">Price Lists</field>
            <field name="res_model">product.price_list</field>
            <field name="domain"
                eval="[('company', '=', Eval('company'))]" pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_price_list_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="price_list_view_tree"/>
            <field name="act_window" ref="act_price_list_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_price_list_form_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="price_list_view_form"/>
            <field name="act_window" ref="act_price_list_form"/>
        </record>
        <menuitem
            parent="product.menu_main_product"
            action="act_price_list_form"
            sequence="30"
            id="menu_price_list"/>

        <record model="ir.model.access" id="access_price_list">
            <field name="model">product.price_list</field>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.access" id="access_price_list_admin">
            <field name="model">product.price_list</field>
            <field name="group" ref="product.group_product_admin"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="True"/>
            <field name="perm_create" eval="True"/>
            <field name="perm_delete" eval="True"/>
        </record>

        <record model="ir.rule.group" id="rule_group_price_list_companies">
            <field name="name">User in companies</field>
            <field name="model">product.price_list</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_price_list_companies">
            <field name="domain"
                eval="[('company', 'in', Eval('companies', []))]"
                pyson="1"/>
            <field name="rule_group" ref="rule_group_price_list_companies"/>
        </record>

        <record model="ir.ui.view" id="price_list_line_view_form">
            <field name="model">product.price_list.line</field>
            <field name="type">form</field>
            <field name="name">price_list_line_form</field>
        </record>

        <record model="ir.ui.view" id="price_list_line_view_tree">
            <field name="model">product.price_list.line</field>
            <field name="type">tree</field>
            <field name="name">price_list_line_tree</field>
        </record>

        <record model="ir.ui.view" id="price_list_line_view_tree_sequence">
            <field name="model">product.price_list.line</field>
            <field name="type">tree</field>
            <field name="priority" eval="20"/>
            <field name="name">price_list_line_tree_sequence</field>
        </record>

    </data>
</tryton>
