Files
odoo_source/addons/purchase/invoice_view.xml
T
Nicolas Martinelli b8d2a0afba [IMP] purchase: add PO line to invoice
Some usability improvements. A field "Purchase Order" is added on the
invoice line, so it is much easier to make the link between the invoice
line and the PO.

On the other hand, the "Purchase Order" field which was used for
encoding help is kept empty since it is not meaningful.
2015-10-09 09:08:24 +02:00

81 lines
4.0 KiB
XML

<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,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 draft invoice.
</p><p>
Use this menu to control the invoices to be received from your
vendor. 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" domain="[('invoice_status', '=', 'to invoice'), ('partner_id', 'child_of', partner_id)]" attrs="{'invisible': [('state', '&lt;&gt;', 'draft')]}" class="oe_edit_only"/>
</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"/>
</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"/>
</field>
</field>
</record>
</odoo>