Update base_attachment_object_storage/models/ir_attachment.py

This commit is contained in:
Guewen Baconnier
2019-08-09 15:47:40 +02:00
committed by sebalix
co-authored by sebalix
parent 2f8fcedd88
commit 19126ee4f0
@@ -319,7 +319,7 @@ class IrAttachment(models.Model):
# write them back in the DB (the logic for location to write is
# in the 'datas' inverse computed field)
attachment.write({'datas': attachment.datas})
# as the file will potentially be dropped on the bucket,
# as the file will potentially be deleted from the bucket,
# we should commit the changes here
new_env.cr.commit()
if current % 100 == 0 or total - current == 0: