How to make the tree view inline editable

If you want to edit the tree view of one2many or many2many field inline, without opening a popup window, you can do that by adding the attribute “editable” in the view definition.
Regarding your needs, if you want to add a new line at the top of the view, the value must be “top” or in a case when you need a new line at the bottom of the view the value must be “bottom”.

For example, adding a new line at the top of the tree view of the order_line field in the sale.order model should look like:

<xpath expr="//field[@name='order_line']" position="attributes">
    <attribute name="editable">top</attribute>
</xpath>
Share the knowledge!

Leave a Reply

Your email address will not be published.