How to remove add a line in the notebook of a many2many field? odoo 12

Viewed 1826

Actually i created a many2many field and add that in the field in a notebook.i've tried giving the options="{'no_create': True,'no_create_edit':True}" in the xml file.But the add a line button is still showing.

1 Answers

If you want to remove the add line button/link on one2many or many2many list views you have to add create="0" to the tree node, for example:

<field name="my_x2many_field">
    <tree create="0">
        <field name="my_field" />
    </tree>
</field>
Related