I would like to remove the editable attribute from this view element <tree string="Sales Order Lines" editable="bottom"> in my custom module.
I do not want to replace the whole tree element for the sake of removing the attribute.
How can I remove the editable attribute from the element above?
You can override fields_view_get method for that object. Get the 'arch' by calling super method and remove the "editable" attrs from tree view. You will have to use python lxml packages and use etree to convert the arch into xml. You will get lots of examples in odoo addons of overriding fields_view_get.
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
|Asked: 2/28/16, 2:23 AM|
|Seen: 485 times|
|Last updated: 2/28/16, 3:45 PM|