Skip to content

Commit 251bd2a

Browse files
committed
[FIX] remove_inherit_from_model
Use default `bucket_size` when deleting from indirect references tables. Those tables contains a lot of data (`mail_message` can be huge) and using a low bucket size can make the deletion slower. closes #267 Signed-off-by: Christophe Simonis (chs) <[email protected]>
1 parent bdab4ce commit 251bd2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ def remove_inherit_from_model(cr, model, inherit, keep=(), skip_inherit=(), with
595595
query = cr.mogrify(
596596
format_query(cr, "DELETE FROM {} WHERE ({})", ir.table, sql.SQL(ir.model_filter())), [model]
597597
).decode()
598-
explode_execute(cr, query, table=table, bucket_size=1000)
598+
explode_execute(cr, query, table=table)
599599
remove_field(cr, model, field, skip_inherit="*") # inherits will be removed by the recursive call.
600600

601601
# down on inherits of `model`

0 commit comments

Comments
 (0)