Hello I have an issue with inheritance , I try to inherit the view of customer invoice for that I define an action view using the model account.invoice with the external ID :account.invoice_form
http://i.imgur.com/pAESugJ.png
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
2329
Views
but when I open my view I find that odoo inherit the view of the supplier invoice with the external ID :account.invoice_supplier_form normally my view should have the same external ID I don't know why odoo inherit the view of the supplier invoice
Hi Hamza,
For Inherit account view, follow below code sample :
<record id="custom_invoice_view_id" model="ir.ui.view" >
<field name="name">inherit.invoice.form.view</field>
<field name="model">account.invoice</field>
if inherit customer invoice then inherit_id account.invoice_form
<field name="inherit_id" ref="account.invoice_form"/>
if inherit supplier invoice then inherit_id account.invoice_supplier_form
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='existing_field_name']" position="after">
<field name="your_field_name"
</xpath>
</field>
</record>
I hope this helps you.
Thanks!