<?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="quantity_issue_view_form">
            <field name="model">stock.quantity.issue</field>
            <field name="type">form</field>
            <field name="name">quantity_issue_form</field>
        </record>

        <record model="ir.ui.view" id="quantity_issue_view_list">
            <field name="model">stock.quantity.issue</field>
            <field name="type">tree</field>
            <field name="name">quantity_issue_list</field>
        </record>

        <record model="ir.action.act_window" id="act_quantity_issue_form">
            <field name="name">Quantity Issues</field>
            <field name="res_model">stock.quantity.issue</field>
        </record>
        <record model="ir.action.act_window.view" id="act_quantity_issue_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="quantity_issue_view_list"/>
            <field name="act_window" ref="act_quantity_issue_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_quantity_issue_form_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="quantity_issue_view_form"/>
            <field name="act_window" ref="act_quantity_issue_form"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_quantity_issue_form_domain_open">
            <field name="name">Open</field>
            <field name="sequence" eval="10"/>
            <field name="domain" eval="[('state', '=', 'open')]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_quantity_issue_form"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_quantity_issue_form_domain_processing">
            <field name="name">Processing</field>
            <field name="sequence" eval="20"/>
            <field name="domain" eval="[('state', '=', 'processing')]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_quantity_issue_form"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_quantity_issue_form_domain_all">
            <field name="name">All</field>
            <field name="sequence" eval="9999"/>
            <field name="domain"></field>
            <field name="act_window" ref="act_quantity_issue_form"/>
        </record>

        <menuitem
            parent="stock.menu_stock"
            action="act_quantity_issue_form"
            sequence="50"
            id="menu_quantity_issue_form"/>

        <record model="ir.model.access" id="access_quantity_issue">
            <field name="model">stock.quantity.issue</field>
            <field name="perm_read" eval="False"/>
            <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_quantity_issue_group_stock">
            <field name="model">stock.quantity.issue</field>
            <field name="group" ref="stock.group_stock"/>
            <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_quantity_issue_companies">
            <field name="name">User in companies</field>
            <field name="model">stock.quantity.issue</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_quantity_issue_companies">
            <field name="domain"
                eval="[('company', 'in', Eval('companies', []))]"
                pyson="1"/>
            <field name="rule_group" ref="rule_group_quantity_issue_companies"/>
        </record>

        <record model="ir.model.button" id="quantity_issue_open_button">
            <field name="model">stock.quantity.issue</field>
            <field name="name">open</field>
            <field name="string">Reset to Open</field>
        </record>

        <record model="ir.model.button" id="quantity_issue_process_button">
            <field name="model">stock.quantity.issue</field>
            <field name="name">process</field>
            <field name="string">Process</field>
        </record>

        <record model="ir.model.button" id="quantity_issue_apply_best_planned_date_button">
            <field name="model">stock.quantity.issue</field>
            <field name="name">apply_best_planned_date</field>
            <field name="string">Apply Best Planned Date</field>
        </record>

        <record model="ir.model.button" id="quantity_issue_solve_button">
            <field name="model">stock.quantity.issue</field>
            <field name="name">solve</field>
            <field name="string">Solve</field>
        </record>

        <record model="ir.action.wizard" id="act_quantity_issue_generate">
            <field name="name">Generate Stock Quantity Issues</field>
            <field name="wiz_name">stock.quantity.issue.generate</field>
        </record>
        <record model="ir.action-res.group" id="act_quantity_issue_generate_group_stock_admin">
            <field name="action" ref="act_quantity_issue_generate"/>
            <field name="group" ref="stock.group_stock_admin"/>
        </record>

        <menuitem
            parent="stock.menu_stock"
            action="act_quantity_issue_generate"
            sequence="90"
            id="menu_quantity_issue_generate"/>
        <record model="ir.ui.menu-res.group" id="menu_quantity_issue_generate_group_stock_admin">
            <field name="menu" ref="menu_quantity_issue_generate"/>
            <field name="group" ref="stock.group_stock_admin"/>
        </record>

        <record model="ir.ui.view" id="quantity_issue_generate_start_view_form">
            <field name="model">stock.quantity.issue.generate.start</field>
            <field name="type">form</field>
            <field name="name">quantity_issue_generate_start_form</field>
        </record>
    </data>
</tryton>
