March 2018
Beginner to intermediate
336 pages
8h 22m
English
To delete a data record, we use the <delete> element, providing it with either an ID or a search domain to find the target records. For example, using a search domain to find the record to delete looks as follows:
<delete
model="ir.rule"
search="[('id','=',ref('todo_app.todo_task_user_rule'))]"
/>
If we know the specific ID to delete, we can use it with the id attribute instead. It was the case for the previous example, so it could also be written like this, for the same effect:
<delete model="ir.rule" id="todo_app.todo_task_user_rule" />
Read now
Unlock full access