Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/util/records.py
Original file line number Diff line number Diff line change
Expand Up @@ -1098,10 +1098,13 @@ def add_ref(ref):

def delete_unused(cr, *xmlids, **kwargs):
"""
Remove unused records.
Remove unrestricted records.

This function will remove records pointed by `xmlids` only if they are not referenced
from any table.
This function will remove records, pointed by `xmlids`, only if they are NOT referenced
from any table with `restrict` or `set` ondelete clauses.

.. warning::
Indirect references are not checked and can cause the util to fail.

.. note::
The records that cannot be removed are set as `noupdate=True`.
Expand Down