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 | etc.
To inherit views and add new fields, I have successfully followed the steps described in this link:
I was also able to create a new tab and use <group> to organise my fields. Now I would like to add a new checkbox "Agent" below the "Supplier" field on a partner's "Sales & Purchases" tab, but the approach seems different. Simply referencing the field to insert after doesn't work.
This is the inherited view I have tried (without luck):
Inherited view: res.partner.form
<field name="supplier" position="after">
<field name="x_agent" />
...the above works fine if I replace "supplier" with "website" since it's a field on the main partner form I guess.
Any clues anyone? Did I inherit the wrong view? How do I find the right one?
I think you have the right view, you are just anchoring to the wrong instance of the field.
res.partner.form (base.view_partner_form) does contain the field 'supplier' but it is used twice. Once (invisibly) on the CONTACT tab, and the other on the SALES & PURCHASES tab.
If your field is showing up on the CONTACTS tab (only visible if the record is a company) then you need to use XPATH notation to specifiy WHICH 'supplier' field you want to anchor to.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 8/11/14, 6:56 PM|
|Seen: 1187 times|
|Last updated: 3/16/15, 8:10 AM|