odoo/addons/purchase/views/account_invoice_views.xml

83 lines
4.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="action_invoice_pending" model="ir.actions.act_window">
<field name="name">Vendor Bills</field>
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,kanban,form,calendar,pivot,graph</field>
<field eval="False" name="view_id"/>
<field name="domain">[('type','=','in_invoice')]</field>
<field name="context">{'default_type':'in_invoice', 'type':'in_invoice', 'journal_type': 'purchase'}</field>
<field name="search_view_id" ref="account.view_account_invoice_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a vendor bill.
</p><p>
Use this menu to control the invoices to be received from your
vendors. When registering a new bill, set the purchase order
and Odoo will fill the bill automatically according to ordered
or received quantities.
</p>
</field>
</record>
<record id="purchase_open_invoice" model="ir.actions.act_window">
<field name="name">Vendor Bills</field>
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,kanban,form,calendar,pivot,graph</field>
<field eval="False" name="view_id"/>
<field name="domain">[('type','in',('in_invoice', 'in_refund')),('purchase_id','=',active_id)]</field>
<field name="context">{'default_type': 'in_invoice', 'type': 'in_invoice', 'journal_type': 'purchase', 'default_purchase_id': active_id}</field>
<field name="search_view_id" ref="account.view_account_invoice_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to record a vendor bill related to this purchase.
</p>
<p>
You can control the invoice from your vendor according to
what you purchased (services) or received (products).
</p>
</field>
</record>
<record id="action_invoice_supplier_tree1_view1" model="ir.actions.act_window.view">
<field eval="1" name="sequence"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="account.invoice_supplier_tree"/>
<field name="act_window_id" ref="purchase_open_invoice"/>
</record>
<record id="action_invoice__supplier_tree1_view2" model="ir.actions.act_window.view">
<field eval="2" name="sequence"/>
<field name="view_mode">form</field>
<field name="view_id" ref="account.invoice_supplier_form"/>
<field name="act_window_id" ref="purchase_open_invoice"/>
</record>
<record id="view_invoice_supplier_purchase_form" model="ir.ui.view">
<field name="name">account.invoice.supplier.purchase</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<field name="reference" position="after" >
<field name="purchase_id" attrs="{'readonly': [('state','not in',['draft'])], 'invisible': ['|', ('state', '=', 'purchase'), ('type', '=', 'in_refund')]}" class="oe_edit_only"
options="{'no_create': True}"/>
</field>
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='company_id']" position="after">
<field name="purchase_line_id" invisible="1"/>
<field name="purchase_id" invisible="1"/>
</xpath>
</field>
</record>
<record id="view_invoice_line_form_inherit_purchase" model="ir.ui.view">
<field name="name">account.invoice.line.form.inherit.purchase</field>
<field name="model">account.invoice.line</field>
<field name="inherit_id" ref="account.view_invoice_line_form"/>
<field name="arch" type="xml">
<field name="account_id" position="before">
<field name="purchase_id" invisible="context.get('type') in ('out_invoice', 'out_refund')"/>
</field>
</field>
</record>
</odoo>