<?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>
        <menuitem name="Invoices" parent="account.menu_account"
            id="menu_invoices" sequence="20"/>

        <record model="ir.action.wizard" id="wizard_pay">
            <field name="name">Pay Invoice</field>
            <field name="wiz_name">account.invoice.pay</field>
            <field name="model">account.invoice</field>
        </record>

        <record model="ir.ui.view" id="invoice_view_form">
            <field name="model">account.invoice</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Invoice" col="6" cursor="party">
                    <label name="type"/>
                    <field name="type"/>
                    <label name="journal"/>
                    <field name="journal"/>
                    <label name="number"/>
                    <field name="number"/>
                    <label name="party"/>
                    <field name="party"/>
                    <label name="invoice_address"/>
                    <field name="invoice_address"/>
                    <newline/>
                    <label name="description"/>
                    <field name="description" colspan="3"/>
                    <label name="reference"/>
                    <field name="reference"/>
                    <notebook colspan="6">
                        <page string="Invoice" id="invoice" col="6">
                            <label name="invoice_date"/>
                            <field name="invoice_date"/>
                            <label name="payment_term"/>
                            <field name="payment_term"/>
                            <label name="currency"/>
                            <field name="currency"/>
                            <field name="lines" colspan="6"
                                view_ids="account_invoice.invoice_line_view_tree_sequence"/>
                            <group col="2" colspan="6" id="taxes_amount_state_buttons">
                                <group col="1" colspan="1" id="taxes">
                                    <field name="taxes"
                                        view_ids="account_invoice.invoice_tax_view_tree_sequence"/>
                                </group>
                                <group col="4" colspan="1" id="amount_state_buttons">
                                    <group col="2" colspan="2" id="reconciled_state">
                                        <label name="reconciled"/>
                                        <field name="reconciled" xexpand="0"/>
                                        <label name="state"/>
                                        <field name="state"/>
                                    </group>
                                    <group col="2" colspan="2" id="amount">
                                        <label name="untaxed_amount" xalign="1.0" xexpand="1"/>
                                        <field name="untaxed_amount" xalign="1.0" xexpand="0"/>
                                        <label name="tax_amount" xalign="1.0" xexpand="1"/>
                                        <field name="tax_amount" xalign="1.0" xexpand="0"/>
                                        <label name="total_amount" xalign="1.0" xexpand="1"/>
                                        <field name="total_amount" xalign="1.0" xexpand="0"/>
                                    </group>
                                    <group col="5" colspan="4" id="buttons">
                                        <button name="cancel" string="_Cancel"
                                            icon="tryton-cancel"/>
                                        <button name="draft" string="_Draft"
                                            type="object"
                                            icon="tryton-go-previous"/>
                                        <button name="proforma" string="Pro For_ma"
                                            type="object"
                                            icon="tryton-go-next"/>
                                        <button name="open" string="_Open"
                                            type="object"
                                            icon="tryton-ok"/>
                                        <button name="%(wizard_pay)d" string="_Pay"
                                            type="action"
                                            states="{'invisible': Not(Equal(Eval('state'), 'open')), 'readonly': Not(In(%(account.group_account)d, Eval('groups', [])))}"
                                            icon="tryton-go-next"/>
                                    </group>
                                </group>
                            </group>
                        </page>
                        <page string="Other Info" id="info">
                            <label name="company"/>
                            <field name="company"/>
                            <label name="account"/>
                            <field name="account"/>
                            <label name="accounting_date"/>
                            <field name="accounting_date"/>
                            <label name="move"/>
                            <field name="move"/>
                            <separator name="comment" colspan="4"/>
                            <field name="comment" colspan="4"
                                spell="Eval('party_lang')"/>
                        </page>
                        <page string="Payment" id="payment">
                            <label name="amount_to_pay_today"/>
                            <field name="amount_to_pay_today"/>
                            <label name="amount_to_pay"/>
                            <field name="amount_to_pay"/>
                            <field name="payment_lines" colspan="4"
                                view_ids="account_invoice.move_line_view_list_payment"/>
                        </page>
                    </notebook>
                    <field name="currency_digits" invisible="1" colspan="6"/>
                    <field name="party_lang" invisible="1" colspan="6"/>
                </form>
                ]]>
            </field>
        </record>
        <record model="ir.ui.view" id="invoice_view_tree">
            <field name="model">account.invoice</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Invoices">
                    <field name="type"/>
                    <field name="number"/>
                    <field name="reference"/>
                    <field name="invoice_date"/>
                    <field name="party"/>
                    <field name="currency"/>
                    <field name="untaxed_amount"/>
                    <field name="tax_amount"/>
                    <field name="total_amount"/>
                    <field name="state"/>
                    <field name="amount_to_pay_today"/>
                    <field name="description"/>
                    <field name="currency_digits" tree_invisible="1"/>
                    <field name="create_date" tree_invisible="1"/>
                </tree>
                ]]>
            </field>
        </record>
        <record model="ir.action.act_window" id="act_invoice_form">
            <field name="name">All Invoices</field>
            <field name="res_model">account.invoice</field>
            <field name="search_value">[('create_date', '>=', DateTime(hour=0, minute=0, second=0, microsecond=0, delta_years=-1))]</field>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="invoice_view_tree"/>
            <field name="act_window" ref="act_invoice_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_form_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="invoice_view_form"/>
            <field name="act_window" ref="act_invoice_form"/>
        </record>
        <menuitem parent="menu_invoices" action="act_invoice_form"
            id="menu_invoice_form" sequence="5"/>

        <record model="ir.action.act_window" id="act_invoice_out_invoice_form">
            <field name="name">Invoices</field>
            <field name="res_model">account.invoice</field>
            <field name="domain">[('type', '=', 'out_invoice')]</field>
            <field name="context">{'type': 'out_invoice'}</field>
            <field name="search_value">[('create_date', '>=', DateTime(hour=0, minute=0, second=0, microsecond=0, delta_years=-1))]</field>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_out_invoice_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="invoice_view_tree"/>
            <field name="act_window" ref="act_invoice_out_invoice_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_out_invoice_form_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="invoice_view_form"/>
            <field name="act_window" ref="act_invoice_out_invoice_form"/>
        </record>
        <menuitem parent="menu_invoices" action="act_invoice_out_invoice_form"
            id="menu_invoice_out_invoice_form" sequence="1"/>

        <record model="ir.action.act_window" id="act_invoice_out_invoice_form3">
            <field name="name">Draft Invoices</field>
            <field name="res_model">account.invoice</field>
            <field name="domain">[('type', '=', 'out_invoice'), ('state', '=', 'draft')]</field>
            <field name="context">{'type': 'out_invoice'}</field>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_out_invoice_form3_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="invoice_view_tree"/>
            <field name="act_window" ref="act_invoice_out_invoice_form3"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_out_invoice_form3_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="invoice_view_form"/>
            <field name="act_window" ref="act_invoice_out_invoice_form3"/>
        </record>
        <menuitem parent="menu_invoice_out_invoice_form" action="act_invoice_out_invoice_form3"
            id="menu_invoice_out_invoice_form3" sequence="2"/>

        <record model="ir.action.act_window" id="act_invoice_out_invoice_form4">
            <field name="name">Pro Forma Invoices</field>
            <field name="res_model">account.invoice</field>
            <field name="domain">[('type', '=', 'out_invoice'), ('state', '=', 'proforma')]</field>
            <field name="context">{'type': 'out_invoice'}</field>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_out_invoice_form4_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="invoice_view_tree"/>
            <field name="act_window" ref="act_invoice_out_invoice_form4"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_out_invoice_form4_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="invoice_view_form"/>
            <field name="act_window" ref="act_invoice_out_invoice_form4"/>
        </record>
        <menuitem parent="menu_invoice_out_invoice_form" action="act_invoice_out_invoice_form4"
            id="menu_invoice_out_invoice_form4" sequence="3"/>

        <record model="ir.action.act_window" id="act_invoice_out_invoice_form5">
            <field name="name">Opened Invoices</field>
            <field name="res_model">account.invoice</field>
            <field name="domain">[('type', '=', 'out_invoice'), ('state', '=', 'open')]</field>
            <field name="context">{'type': 'out_invoice'}</field>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_out_invoice_form5_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="invoice_view_tree"/>
            <field name="act_window" ref="act_invoice_out_invoice_form5"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_out_invoice_form5_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="invoice_view_form"/>
            <field name="act_window" ref="act_invoice_out_invoice_form5"/>
        </record>
        <menuitem parent="menu_invoice_out_invoice_form" action="act_invoice_out_invoice_form5"
            id="menu_invoice_out_invoice_form5" sequence="4"/>

        <record model="ir.action.act_window" id="act_invoice_out_credit_note_form">
            <field name="name">Credit Notes</field>
            <field name="res_model">account.invoice</field>
            <field name="domain">[('type', '=', 'out_credit_note')]</field>
            <field name="context">{'type': 'out_credit_note'}</field>
            <field name="search_value">[('create_date', '>=', DateTime(hour=0, minute=0, second=0, microsecond=0, delta_years=-1))]</field>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_out_credit_note_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="invoice_view_tree"/>
            <field name="act_window" ref="act_invoice_out_credit_note_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_out_credit_note_form_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="invoice_view_form"/>
            <field name="act_window" ref="act_invoice_out_credit_note_form"/>
        </record>
        <menuitem parent="menu_invoices" action="act_invoice_out_credit_note_form"
            id="menu_invoice_out_credit_note_form" sequence="2"/>

        <record model="ir.action.act_window" id="act_invoice_out_credit_note_form3">
            <field name="name">Draft Credit Notes</field>
            <field name="res_model">account.invoice</field>
            <field name="domain">[('type', '=', 'out_credit_note'), ('state', '=', 'draft')]</field>
            <field name="context">{'type': 'out_credit_note'}</field>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_out_credit_note_form3_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="invoice_view_tree"/>
            <field name="act_window" ref="act_invoice_out_credit_note_form3"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_out_credit_note_form3_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="invoice_view_form"/>
            <field name="act_window" ref="act_invoice_out_credit_note_form3"/>
        </record>
        <menuitem parent="menu_invoice_out_credit_note_form" action="act_invoice_out_credit_note_form3"
            id="menu_invoice_out_credit_note_form3" sequence="2"/>

        <record model="ir.action.act_window" id="act_invoice_out_credit_note_form4">
            <field name="name">Pro Forma Credit Notes</field>
            <field name="res_model">account.invoice</field>
            <field name="domain">[('type', '=', 'out_credit_note'), ('state', '=', 'proforma')]</field>
            <field name="context">{'type': 'out_credit_note'}</field>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_out_credit_note_form4_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="invoice_view_tree"/>
            <field name="act_window" ref="act_invoice_out_credit_note_form4"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_out_credit_note_form4_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="invoice_view_form"/>
            <field name="act_window" ref="act_invoice_out_credit_note_form4"/>
        </record>
        <menuitem parent="menu_invoice_out_credit_note_form" action="act_invoice_out_credit_note_form4"
            id="menu_invoice_out_credit_note_form4" sequence="3"/>

        <record model="ir.action.act_window" id="act_invoice_out_credit_note_form5">
            <field name="name">Opened Credit Notes</field>
            <field name="res_model">account.invoice</field>
            <field name="domain">[('type', '=', 'out_credit_note'), ('state', '=', 'open')]</field>
            <field name="context">{'type': 'out_credit_note'}</field>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_out_credit_note_form5_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="invoice_view_tree"/>
            <field name="act_window" ref="act_invoice_out_credit_note_form5"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_out_credit_note_form5_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="invoice_view_form"/>
            <field name="act_window" ref="act_invoice_out_credit_note_form5"/>
        </record>
        <menuitem parent="menu_invoice_out_credit_note_form" action="act_invoice_out_credit_note_form5"
            id="menu_invoice_out_credit_note_form5" sequence="4"/>

        <record model="ir.action.act_window" id="act_invoice_in_invoice_form">
            <field name="name">Supplier Invoices</field>
            <field name="res_model">account.invoice</field>
            <field name="domain">[('type', '=', 'in_invoice')]</field>
            <field name="context">{'type': 'in_invoice'}</field>
            <field name="search_value">[('create_date', '>=', DateTime(hour=0, minute=0, second=0, microsecond=0, delta_years=-1))]</field>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_in_invoice_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="invoice_view_tree"/>
            <field name="act_window" ref="act_invoice_in_invoice_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_in_invoice_form_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="invoice_view_form"/>
            <field name="act_window" ref="act_invoice_in_invoice_form"/>
        </record>
        <menuitem parent="menu_invoices" action="act_invoice_in_invoice_form"
            id="menu_invoice_in_invoice_form" sequence="3"/>

        <record model="ir.action.act_window" id="act_invoice_in_invoice_form3">
            <field name="name">Draft Supplier Invoices</field>
            <field name="res_model">account.invoice</field>
            <field name="domain">[('type', '=', 'in_invoice'), ('state', '=', 'draft')]</field>
            <field name="context">{'type': 'in_invoice'}</field>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_in_invoice_form3_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="invoice_view_tree"/>
            <field name="act_window" ref="act_invoice_in_invoice_form3"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_in_invoice_form3_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="invoice_view_form"/>
            <field name="act_window" ref="act_invoice_in_invoice_form3"/>
        </record>
        <menuitem parent="menu_invoice_in_invoice_form" action="act_invoice_in_invoice_form3"
            id="menu_invoice_in_invoice_form3" sequence="2"/>

        <record model="ir.action.act_window" id="act_invoice_in_invoice_form4">
            <field name="name">Pro Forma Supplier Invoices</field>
            <field name="res_model">account.invoice</field>
            <field name="domain">[('type', '=', 'in_invoice'), ('state', '=', 'proforma')]</field>
            <field name="context">{'type': 'in_invoice'}</field>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_in_invoice_form4_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="invoice_view_tree"/>
            <field name="act_window" ref="act_invoice_in_invoice_form4"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_in_invoice_form4_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="invoice_view_form"/>
            <field name="act_window" ref="act_invoice_in_invoice_form4"/>
        </record>
        <menuitem parent="menu_invoice_in_invoice_form" action="act_invoice_in_invoice_form4"
            id="menu_invoice_in_invoice_form4" sequence="3"/>

        <record model="ir.action.act_window" id="act_invoice_in_invoice_form5">
            <field name="name">Opened Supplier Invoices</field>
            <field name="res_model">account.invoice</field>
            <field name="domain">[('type', '=', 'in_invoice'), ('state', '=', 'open')]</field>
            <field name="context">{'type': 'in_invoice'}</field>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_in_invoice_form5_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="invoice_view_tree"/>
            <field name="act_window" ref="act_invoice_in_invoice_form5"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_in_invoice_form5_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="invoice_view_form"/>
            <field name="act_window" ref="act_invoice_in_invoice_form5"/>
        </record>
        <menuitem parent="menu_invoice_in_invoice_form" action="act_invoice_in_invoice_form5"
            id="menu_invoice_in_invoice_form5" sequence="4"/>

        <record model="ir.action.act_window" id="act_invoice_in_credit_note_form">
            <field name="name">Supplier Credit Notes</field>
            <field name="res_model">account.invoice</field>
            <field name="domain">[('type', '=', 'in_credit_note')]</field>
            <field name="context">{'type': 'in_credit_note'}</field>
            <field name="search_value">[('create_date', '>=', DateTime(hour=0, minute=0, second=0, microsecond=0, delta_years=-1))]</field>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_in_credit_note_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="invoice_view_tree"/>
            <field name="act_window" ref="act_invoice_in_credit_note_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_in_credit_note_form_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="invoice_view_form"/>
            <field name="act_window" ref="act_invoice_in_credit_note_form"/>
        </record>
        <menuitem parent="menu_invoices" action="act_invoice_in_credit_note_form"
            id="menu_invoice_in_credit_note_form" sequence="4"/>

        <record model="ir.action.act_window" id="act_invoice_in_credit_note_form3">
            <field name="name">Draft Supplier Credit Notes</field>
            <field name="res_model">account.invoice</field>
            <field name="domain">[('type', '=', 'in_credit_note'), ('state', '=', 'draft')]</field>
            <field name="context">{'type': 'in_credit_note'}</field>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_in_credit_note_form3_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="invoice_view_tree"/>
            <field name="act_window" ref="act_invoice_in_credit_note_form3"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_in_credit_note_form3_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="invoice_view_form"/>
            <field name="act_window" ref="act_invoice_in_credit_note_form3"/>
        </record>
        <menuitem parent="menu_invoice_in_credit_note_form" action="act_invoice_in_credit_note_form3"
            id="menu_invoice_in_credit_note_form3" sequence="2"/>

        <record model="ir.action.act_window" id="act_invoice_in_credit_note_form4">
            <field name="name">Pro Forma Supplier Credit Notes</field>
            <field name="res_model">account.invoice</field>
            <field name="domain">[('type', '=', 'in_credit_note'), ('state', '=', 'proforma')]</field>
            <field name="context">{'type': 'in_credit_note'}</field>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_in_credit_note_form4_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="invoice_view_tree"/>
            <field name="act_window" ref="act_invoice_in_credit_note_form4"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_in_credit_note_form4_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="invoice_view_form"/>
            <field name="act_window" ref="act_invoice_in_credit_note_form4"/>
        </record>
        <menuitem parent="menu_invoice_in_credit_note_form" action="act_invoice_in_credit_note_form4"
            id="menu_invoice_in_credit_note_form4" sequence="3"/>

        <record model="ir.action.act_window" id="act_invoice_in_credit_note_form5">
            <field name="name">Opened Supplier Credit Notes</field>
            <field name="res_model">account.invoice</field>
            <field name="domain">[('type', '=', 'in_credit_note'), ('state', '=', 'open')]</field>
            <field name="context">{'type': 'in_credit_note'}</field>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_in_credit_note_form5_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="invoice_view_tree"/>
            <field name="act_window" ref="act_invoice_in_credit_note_form5"/>
        </record>
        <record model="ir.action.act_window.view" id="act_invoice_in_credit_note_form5_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="invoice_view_form"/>
            <field name="act_window" ref="act_invoice_in_credit_note_form5"/>
        </record>
        <menuitem parent="menu_invoice_in_credit_note_form" action="act_invoice_in_credit_note_form5"
            id="menu_invoice_in_credit_note_form5" sequence="4"/>

        <record model="ir.model.access" id="access_invoice">
            <field name="model" search="[('model', '=', 'account.invoice')]"/>
            <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_account">
            <field name="model" search="[('model', '=', 'account.invoice')]"/>
            <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.model.button" id="invoice_cancel_button">
            <field name="name">cancel</field>
            <field name="model" search="[('model', '=', 'account.invoice')]"/>
        </record>
        <record model="ir.model.button-res.group"
            id="invoice_cancel_button_group_account">
            <field name="button" ref="invoice_cancel_button"/>
            <field name="group" ref="account.group_account"/>
        </record>

        <record model="ir.model.button" id="invoice_draft_button">
            <field name="name">draft</field>
            <field name="model" search="[('model', '=', 'account.invoice')]"/>
        </record>
        <record model="ir.model.button-res.group"
            id="invoice_draft_button_group_account">
            <field name="button" ref="invoice_draft_button"/>
            <field name="group" ref="account.group_account"/>
        </record>

        <record model="ir.model.button" id="invoice_proforma_button">
            <field name="name">proforma</field>
            <field name="model" search="[('model', '=', 'account.invoice')]"/>
        </record>
        <record model="ir.model.button-res.group"
            id="invoice_proforma_button_group_account">
            <field name="button" ref="invoice_proforma_button"/>
            <field name="group" ref="account.group_account"/>
        </record>

        <record model="ir.model.button" id="invoice_open_button">
            <field name="name">open</field>
            <field name="model" search="[('model', '=', 'account.invoice')]"/>
        </record>
        <record model="ir.model.button-res.group"
            id="invoice_open_button_group_account">
            <field name="button" ref="invoice_open_button"/>
            <field name="group" ref="account.group_account"/>
        </record>

        <record model="ir.action.report" id="report_invoice">
            <field name="name">Invoice</field>
            <field name="model">account.invoice</field>
            <field name="report_name">account.invoice</field>
            <field name="report">account_invoice/invoice.odt</field>
            <field name="style">company/header_A4.odt</field>
        </record>
        <record model="ir.sequence.type" id="sequence_type_account_invoice">
            <field name="name">Invoice</field>
            <field name="code">account.invoice</field>
        </record>
        <record model="ir.sequence.type-res.group"
            id="sequence_type_account_invoice_group_admin">
            <field name="sequence_type" ref="sequence_type_account_invoice"/>
            <field name="group" ref="res.group_admin"/>
        </record>
        <record model="ir.sequence.type-res.group"
            id="sequence_type_account_invoice_group_account_admin">
            <field name="sequence_type" ref="sequence_type_account_invoice"/>
            <field name="group" ref="account.group_account_admin"/>
        </record>

        <record model="ir.ui.view" id="invoice_line_view_form">
            <field name="model">account.invoice.line</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Invoice Line" cursor="product">
                    <label name="invoice"/>
                    <field name="invoice" colspan="3"/>
                    <notebook colspan="4">
                        <page string="General" id="general">
                            <label name="type"/>
                            <field name="type"/>
                            <label name="sequence"/>
                            <field name="sequence"/>
                            <label name="product"/>
                            <field name="product"/>
                            <label name="account"/>
                            <field name="account"/>
                            <newline/>
                            <label name="description"/>
                            <field name="description" colspan="3"
                                spell="If(Bool(Eval('_parent_invoice')), Get(Eval('_parent_invoice', {}), 'party_lang'), Eval('party_lang'))"/>
                            <label name="quantity"/>
                            <field name="quantity"/>
                            <label name="unit"/>
                            <field name="unit"/>
                            <label name="unit_price"/>
                            <field name="unit_price"/>
                            <label name="amount"/>
                            <field name="amount"/>
                            <field name="taxes" colspan="4"/>
                        </page>
                        <page string="Notes" id="notes">
                            <separator name="note" colspan="4"/>
                            <field name="note" colspan="4"
                                spell="If(Bool(Eval('_parent_invoice')), Get(Eval('_parent_invoice', {}), 'party_lang'), Eval('party_lang'))"/>
                        </page>
                    </notebook>
                    <field name="unit_digits" invisible="1" colspan="4"/>
                    <field name="currency_digits" invisible="1" colspan="4"/>
                    <field name="party_lang" invisible="1" colspan="4"/>
                </form>
                ]]>
            </field>
        </record>
        <record model="ir.ui.view" id="invoice_line_view_tree">
            <field name="model">account.invoice.line</field>
            <field name="type">tree</field>
            <field name="priority" eval="10"/>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Invoice Lines">
                    <field name="invoice"/>
                    <field name="type"/>
                    <field name="product"/>
                    <field name="account"/>
                    <field name="description"/>
                    <field name="quantity"/>
                    <field name="unit"/>
                    <field name="unit_price"/>
                    <field name="taxes"/>
                    <field name="amount"/>
                    <field name="unit_digits" tree_invisible="1"/>
                    <field name="currency_digits" tree_invisible="1"/>
                </tree>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="invoice_line_view_tree_sequence">
            <field name="model">account.invoice.line</field>
            <field name="type">tree</field>
            <field name="priority" eval="20"/>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Invoice Lines" sequence="sequence">
                    <field name="type"/>
                    <field name="product"/>
                    <field name="account" tree_invisible="1"/>
                    <field name="description"/>
                    <field name="quantity"/>
                    <field name="unit"/>
                    <field name="unit_price"/>
                    <field name="taxes"/>
                    <field name="amount" expand="1"/>
                    <field name="unit_digits" tree_invisible="1"/>
                    <field name="currency_digits" tree_invisible="1"/>
                </tree>
                ]]>
            </field>
        </record>

        <record model="ir.model.access" id="access_invoice_line">
            <field name="model" search="[('model', '=', 'account.invoice.line')]"/>
            <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_line_account">
            <field name="model" search="[('model', '=', 'account.invoice.line')]"/>
            <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.ui.view" id="invoice_tax_view_form">
            <field name="model">account.invoice.tax</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Invoice Tax">
                    <label name="invoice"/>
                    <field name="invoice" colspan="3"/>
                    <label name="description"/>
                    <field name="description"/>
                    <label name="sequence"/>
                    <field name="sequence"/>
                    <label name="account"/>
                    <field name="account"/>
                    <label name="manual"/>
                    <field name="manual"/>
                    <group col="6" colspan="4" string="Tax Code" id="tax_code">
                        <label name="amount"/>
                        <field name="amount"/>
                        <label name="tax_code"/>
                        <field name="tax_code"/>
                        <label name="tax_sign"/>
                        <field name="tax_sign"/>
                        <label name="base"/>
                        <field name="base"/>
                        <label name="base_code"/>
                        <field name="base_code"/>
                        <label name="base_sign"/>
                        <field name="base_sign"/>
                    </group>
                    <field name="tax" colspan="4" invisible="1"/>
                </form>
                ]]>
            </field>
        </record>
        <record model="ir.ui.view" id="invoice_tax_view_tree">
            <field name="model">account.invoice.tax</field>
            <field name="type">tree</field>
            <field name="priority" eval="10"/>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Invoice Taxes">
                    <field name="invoice"/>
                    <field name="description"/>
                    <field name="account"/>
                    <field name="manual"/>
                    <field name="base"/>
                    <field name="amount"/>
                    <field name="tax" tree_invisible="1"/>
                </tree>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="invoice_tax_view_tree_sequence">
            <field name="model">account.invoice.tax</field>
            <field name="type">tree</field>
            <field name="priority" eval="20"/>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Taxes" sequence="sequence">
                    <field name="description"/>
                    <field name="base"/>
                    <field name="amount" expand="1"/>
                    <field name="sequence" tree_invisible="1"/>
                    <field name="manual" tree_invisible="1"/>
                    <field name="base_code" tree_invisible="1"/>
                    <field name="base_sign" tree_invisible="1"/>
                    <field name="tax_code" tree_invisible="1"/>
                    <field name="tax_sign" tree_invisible="1"/>
                    <field name="account" tree_invisible="1"/>
                </tree>
                ]]>
            </field>
        </record>

        <record model="ir.model.access" id="access_invoice_tax">
            <field name="model" search="[('model', '=', 'account.invoice.tax')]"/>
            <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_invoice_tax_account">
            <field name="model" search="[('model', '=', 'account.invoice.tax')]"/>
            <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.ui.view" id="pay_start_view_form">
            <field name="model">account.invoice.pay.start</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Pay Invoice">
                    <label name="amount"/>
                    <field name="amount"/>
                    <label name="currency"/>
                    <field name="currency"/>
                    <label name="description"/>
                    <field name="description" colspan="3"/>
                    <label name="journal"/>
                    <field name="journal"/>
                    <label name="date"/>
                    <field name="date"/>
                    <field name="currency_digits" colspan="4" invisible="1"/>
                </form>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="pay_ask_view_form">
            <field name="model">account.invoice.pay.ask</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Pay Invoice">
                    <label name="type"/>
                    <field name="type" colspan="3"/>
                    <label name="amount"/>
                    <field name="amount"/>
                    <label name="currency"/>
                    <field name="currency"/>
                    <label name="amount_writeoff"/>
                    <field name="amount_writeoff"/>
                    <label name="currency_writeoff"/>
                    <field name="currency_writeoff"/>
                    <label name="account_writeoff"/>
                    <field name="account_writeoff"/>
                    <label name="journal_writeoff"/>
                    <field name="journal_writeoff"/>
                    <field name="lines" colspan="4"
                        view_ids="account_invoice.move_line_view_list_to_pay"/>
                    <field name="payment_lines" colspan="4"
                        view_ids="account_invoice.move_line_view_list_payment"/>
                    <field name="company" colspan="4" invisible="1"/>
                    <field name="invoice" colspan="4" invisible="1"/>
                </form>
                ]]>
            </field>
        </record>

        <record model="ir.ui.view" id="print_warning_view_form">
            <field name="model">account.invoice.print.warning</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Print Invoice" col="2">
                    <image name="tryton-dialog-warning" xexpand="0" xfill="0"/>
                    <group col="1" id="labels">
                        <label string="You have selected more than one invoice to print."
                            id="selected"
                            yalign="0.0" xalign="0.0" xexpand="1"/>
                        <label string="The invoices will be sent &lt;i&gt;directly&lt;/i&gt; to the printer."
                            id="printer"
                            yalign="0.0" xalign="0.0" xexpand="1"/>
                    </group>
                </form>
                ]]>
            </field>
        </record>

        <record model="ir.action.wizard" id="print">
            <field name="name">Invoice</field>
            <field name="wiz_name">account.invoice.print</field>
            <field name="model">account.invoice</field>
        </record>
        <record model="ir.action.keyword" id="print_keyword">
            <field name="keyword">form_print</field>
            <field name="model">account.invoice,-1</field>
            <field name="action" ref="print"/>
        </record>

        <record model="ir.ui.view" id="credit_start_view_form">
            <field name="model">account.invoice.credit.start</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <![CDATA[
                <form string="Credit Invoice" col="2">
                    <image name="tryton-dialog-information" xexpand="0"
                        xfill="0"/>
                    <group col="2" id="credit_refund">
                        <label string="Are you sure to credit those/this invoice(s)?"
                            id="credit" colspan="2"
                            yalign="0.0" xalign="0.0" xexpand="1"/>
                        <label name="with_refund"/>
                        <field name="with_refund"/>
                    </group>
                </form>
                ]]>
            </field>
        </record>

        <record model="ir.action.wizard" id="credit">
            <field name="name">Credit</field>
            <field name="wiz_name">account.invoice.credit</field>
            <field name="model">account.invoice</field>
        </record>
        <record model="ir.action.keyword" id="credit_keyword">
            <field name="keyword">form_action</field>
            <field name="model">account.invoice,-1</field>
            <field name="action" ref="credit"/>
        </record>

        <record model="ir.rule.group" id="rule_group_invoice">
            <field name="model" search="[('model', '=', 'account.invoice')]"/>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_invoice1">
            <field name="field" search="[('name', '=', 'company'), ('model.model', '=', 'account.invoice')]"/>
            <field name="operator">=</field>
            <field name="operand">User/Current Company</field>
            <field name="rule_group" ref="rule_group_invoice"/>
        </record>

        <record model="ir.rule.group" id="rule_group_invoice_line">
            <field name="model" search="[('model', '=', 'account.invoice.line')]"/>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_invoice_line1">
            <field name="field" search="[('name', '=', 'company'), ('model.model', '=', 'account.invoice.line')]"/>
            <field name="operator">=</field>
            <field name="operand">User/Current Company</field>
            <field name="rule_group" ref="rule_group_invoice_line"/>
        </record>
    </data>
</tryton>
