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
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 1/13/15, 9:05 AM|
|Seen: 606 times|
|Last updated: 5/21/16, 3:32 AM|