Odoo Help

Welcome!

This community 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.

0

update attribute using node.set

By
voathnak lim
on 5/30/13, 7:29 AM 1,115 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

Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

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