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
- Contabilitate
- Inventar
- PoS
- Project
- MRP
Această întrebare a fost marcată
1
Răspunde
2966
Vizualizări
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!
Înscrie-teRelated Posts | Răspunsuri | Vizualizări | Activitate | |
---|---|---|---|---|
|
4
feb. 25
|
2055 | ||
|
1
aug. 24
|
1874 | ||
|
2
nov. 24
|
2982 | ||
|
3
oct. 23
|
14597 | ||
|
2
feb. 23
|
2272 |