<?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="configuration_view_form">
            <field name="model">account.configuration</field>
            <field name="inherit" ref="account.configuration_view_form"/>
            <field name="name">configuration_form</field>
        </record>

        <record model="ir.ui.view" id="invoice_deferred_view_form">
            <field name="model">account.invoice.deferred</field>
            <field name="type">form</field>
            <field name="name">invoice_deferred_form</field>
        </record>

        <record model="ir.ui.view" id="invoice_deferred_view_list">
            <field name="model">account.invoice.deferred</field>
            <field name="type">tree</field>
            <field name="name">invoice_deferred_list</field>
        </record>

        <record model="ir.action.act_window" id="act_invoice_deferred_out_form">
            <field name="name">Customer Invoices Deferred</field>
            <field name="res_model">account.invoice.deferred</field>
            <field name="domain" eval="[('type', '=', 'out')]" pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_deferred_out_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="invoice_deferred_view_list"/>
            <field name="act_window" ref="act_invoice_deferred_out_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_deferred_out_form_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="invoice_deferred_view_form"/>
            <field name="act_window" ref="act_invoice_deferred_out_form"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_invoice_deferred_out_form_domain_draft">
            <field name="name">Draft</field>
            <field name="sequence" eval="10"/>
            <field name="domain" eval="[('state', '=', 'draft')]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_invoice_deferred_out_form"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_invoice_deferred_out_form_domain_running">
            <field name="name">Running</field>
            <field name="sequence" eval="20"/>
            <field name="domain" eval="[('state', '=', 'running')]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_invoice_deferred_out_form"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_invoice_deferred_out_form_domain_all">
            <field name="name">All</field>
            <field name="sequence" eval="9999"/>
            <field name="domain" eval="[]" pyson="1"/>
            <field name="act_window" ref="act_invoice_deferred_out_form"/>
        </record>
        <menuitem
            parent="account_invoice.menu_invoices"
            action="act_invoice_deferred_out_form"
            sequence="50"
            id="menu_invoice_deferred_out_form"/>

        <record model="ir.action.act_window" id="act_invoice_deferred_in_form">
            <field name="name">Supplier Invoices Deferred</field>
            <field name="res_model">account.invoice.deferred</field>
            <field name="domain" eval="[('type', '=', 'in')]" pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_deferred_in_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="invoice_deferred_view_list"/>
            <field name="act_window" ref="act_invoice_deferred_in_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_deferred_in_form_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="invoice_deferred_view_form"/>
            <field name="act_window" ref="act_invoice_deferred_in_form"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_invoice_deferred_in_form_domain_draft">
            <field name="name">Draft</field>
            <field name="sequence" eval="10"/>
            <field name="domain" eval="[('state', '=', 'draft')]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_invoice_deferred_in_form"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_invoice_deferred_in_form_domain_running">
            <field name="name">Running</field>
            <field name="sequence" eval="20"/>
            <field name="domain" eval="[('state', '=', 'running')]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_invoice_deferred_in_form"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_invoice_deferred_in_form_domain_all">
            <field name="name">All</field>
            <field name="sequence" eval="9999"/>
            <field name="domain" eval="[]" pyson="1"/>
            <field name="act_window" ref="act_invoice_deferred_in_form"/>
        </record>
        <menuitem
            parent="account_invoice.menu_invoices"
            action="act_invoice_deferred_in_form"
            sequence="50"
            id="menu_invoice_deferred_in_form"/>

        <record model="ir.model.access" id="access_invoice_deferred">
            <field name="model">account.invoice.deferred</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_invoice_deferred_account">
            <field name="model">account.invoice.deferred</field>
            <field name="group" ref="account.group_account"/>
            <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_invoice_deferred_companies">
            <field name="name">User in companies</field>
            <field name="model">account.invoice.deferred</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_invoice_deferred_companies">
            <field name="domain"
                eval="[('company', 'in', Eval('companies', []))]"
                pyson="1"/>
            <field name="rule_group" ref="rule_group_invoice_deferred_companies"/>
        </record>

        <record model="ir.model.button" id="invoice_deferred_run_button">
            <field name="model">account.invoice.deferred</field>
            <field name="name">run</field>
            <field name="string">Run</field>
            <field name="confirm">Are you sure you want to defer the invoices?</field>
            <field name="help">Start deferring the invoice</field>
        </record>

        <record model="ir.action.wizard" id="wizard_invoice_deferred_create_moves">
            <field name="name">Create Invoices Deferred Moves</field>
            <field name="wiz_name">account.invoice.deferred.create_moves</field>
        </record>
        <menuitem
            parent="account_invoice.menu_invoices"
            sequence="90"
            action="wizard_invoice_deferred_create_moves"
            id="menu_invoice_deferred_create_moves"/>

        <record model="ir.action-res.group" id="wizard_invoice_deferred_create_moves-group_account">
            <field name="action" ref="wizard_invoice_deferred_create_moves"/>
            <field name="group" ref="account.group_account"/>
        </record>

        <record model="ir.ui.view" id="invoice_line_view_form">
            <field name="model">account.invoice.line</field>
            <field name="inherit" ref="account_invoice.invoice_line_view_form"/>
            <field name="name">invoice_line_form</field>
        </record>
    </data>
</tryton>
