Odoo Help


update attribute using node.set

Voathnak Lim
on 5/30/13, 7:29 AM 1,655 views

Hi everyone, could you please tell how can i change attribute in the view using 'node.set' please?

On 5/30/13, 8:37 AM

You can change attribute of view using node.set in py file

you find many example in openerp addons


doc = etree.XML(res['arch'])
for node in doc.xpath("//field[@name='reference']"):
    node.set('invisible', '0')

but why i can see its used only in fields_view_get function. and i want to use it in my function but i don't know how to get the etree and doc variable. could you please help me?

Voathnak Lim
on 5/31/13, 12:45 AM

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 5/30/13, 7:29 AM
Seen: 1655 times
Last updated: 3/16/15, 8:10 AM