Skip to content

Commit 5c481a4

Browse files
committed
[FIX] util/records: fix delete_unused DOCSTRING
`delete_unused`, in spite of its name, deletes records even if they are used, provided they are not part of a foreign key with `restrict` ondelete clause.
1 parent 5f83f3a commit 5c481a4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/util/records.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1098,10 +1098,10 @@ def add_ref(ref):
10981098

10991099
def delete_unused(cr, *xmlids, **kwargs):
11001100
"""
1101-
Remove unused records.
1101+
Remove unrestricted records.
11021102
1103-
This function will remove records pointed by `xmlids` only if they are not referenced
1104-
from any table.
1103+
This function will remove records pointed by `xmlids` only if they are NOT referenced
1104+
with `restrict` ondelete clause from any table.
11051105
11061106
.. note::
11071107
The records that cannot be removed are set as `noupdate=True`.

0 commit comments

Comments
 (0)