diff --git a/src/util/records.py b/src/util/records.py index 24d3c0b1..6b259e49 100644 --- a/src/util/records.py +++ b/src/util/records.py @@ -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`.