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
2610
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!
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Aug 24
|
419 | ||
|
2
Nov 24
|
745 | ||
|
3
Oct 23
|
13195 | ||
|
2
Feb 23
|
1228 | ||
|
1
Dec 22
|
1371 |