Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion attachments_to_filesystem/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
##############################################################################
{
"name": "Move existing attachments to filesystem",
"version": "8.0.1.0.0",
"version": "8.0.1.0.1",
"author": "Therp BV,Odoo Community Association (OCA)",
"license": "AGPL-3",
"complexity": "normal",
Expand Down
4 changes: 2 additions & 2 deletions attachments_to_filesystem/models/ir_attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def _attachments_to_filesystem_cron(self, limit=10000):
logging.info('moving %d attachments to filestore', len(attachments))
# attachments can be big, so we read every attachment on its own
for counter, attachment_id in enumerate(attachments.ids, start=1):
attachment_data = ir_attachment.read(
[attachment_id], ['datas', 'res_model']
attachment_data = self.pool['ir.attachment'].read(
self._cr, self._uid, [attachment_id], ['datas', 'res_model']
)[0]
if attachment_data['res_model'] and not self.env.registry.get(
attachment_data['res_model']):
Expand Down