mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-23 04:22:04 -06:00
fix attachments_to_filesystem
This commit is contained in:
parent
cc21d5adcb
commit
721a5b9256
@ -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",
|
||||
|
@ -86,8 +86,8 @@ class IrAttachment(models.Model):
|
||||
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']):
|
||||
|
Loading…
Reference in New Issue
Block a user