Files
odoo_source/addons/purchase/invoice_view.xml
T
Nicolas Martinelli fa66886a7e [IMP] purchase: multiple improvements
- Add several PO to an invoice
- Add supplier to product if there is less than 10 suppliers
- In the invoice, write a line with a zero quantity instead of
  displaying the warning. Usefule if invoice received before delivery.
- Domain of for PO includes child of partner
- Remove unnecessary related field
2015-09-07 15:11:47 +02:00

69 lines
3.5 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"/>
</xpath>
</field>
</record>
</odoo>