Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4517 มุมมอง

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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?