December 2018
Beginner to intermediate
404 pages
10h 14m
English
To delete a data record, we can 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="res.partner"
search="[('id','=',ref('library_app.res_partner_daniel'))]"
/>
If we know the specific ID to delete, we can use it with the id attribute instead. This was the case for the previous example, so it could also be written like this, for the same effect:
<delete model="res.partner" id="library_app.res_partner_daniel" />
Read now
Unlock full access