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.
I want to add fields in listview from fields_view_get method, as well as wants to fill up data for these fields.
I have data and fields in dictionary.
I got some help to update attributes of fields, but I want more than this.
from lxml import etree
arch = etree.XML(res['arch'])
for node in arch.xpath("//field[@name='code']"):
res['arch'] = etree.tostring(arch)
But I want to add new fields (dynamically n numbers of field) using code.
Can any one help me ?
Thanks in advance.
You can do it in 2 ways:
One best way to do is... add all fields in the Tree View, with invisible property, then in fields_view_get change the invisible property based on your requirement..
Other One: In fields_view_get redefining your entrie Tree View dynamically... OR have different views, and call the respective view in this method
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: 1/13/15, 9:05 AM|
|Seen: 757 times|
|Last updated: 5/21/16, 3:32 AM|