Odoo Help

0

update attribute using node.set

By
voathnak lim
on 5/30/13, 7:29 AM 1,252 views

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

0
jamesbale
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

like

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.

Register

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)

Stats

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