Search code examples
xmlodoo-8odoo

How do I make tree view editable but undeletable?


I want the tree view editable while editing, but I want the records to be undeletable. How do I achieve this?


Solution

  • I think you are looking for this:

    <tree delete="false">
       ...
    </tree>
    

    Add that sentence to the tag <tree> in the XML view, and users won't be able to delete the records, but they still will be able to edit them.