Skip to Content
Menu
This question has been flagged
2789 Views
Hi,
I dont have any idea about this ...
I am taking code from odoo forum ,can anybody tell which scenario I can use this code?
 
if view_type =='form':
            doc = etree.XML(result['fields']['order_line']['views']['tree']['arch'])
            node = doc.xpath("//field[@name='product_id']")[0]
            node.set('invisible','1')
            result['fields']['order_line']['views']['tree']['arch'] = etree.tostring(doc)
        return result
Avatar
Discard

account_invoice has similar use. it might give you some ideas.

Author

What is the use? can u explain