Odoo Help


ir.attachment stopped working for website images

on 8/18/15, 9:51 AM 1,603 views

I am not sure why as I haven't done anything, but all the images on my website have stopped displaying. 

I think ir.attachment has stopped working as images are not displayed and new images can not be uploaded.

Everything else in relation to the database seems to be working. Running Version 8.0-20150518 on a debian server.

Here is some log from odoo-server.log

2015-08-18 13:30:37,399 2605 ERROR odoo_bilby_02 openerp.addons.website.controllers.main: Failed to upload image to attachment
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/openerp/addons/website/controllers/main.py", line 326, in attach
}, request.context)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/addons/website/models/website.py", line 740, in create
cr, uid, values, context=context)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/addons/document/document.py", line 135, in create
return super(document_file, self).create(cr, uid, vals, context)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_attachment.py", line 354, in create
return super(ir_attachment, self).create(cr, uid, values, context)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 336, in old_api
result = method(recs, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4074, in create
record = self.browse(self._create(old_vals))
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 239, in wrapper
return new_api(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 462, in new_api
result = method(self._model, cr, uid, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4259, in _create
result += self._columns[field].set(cr, self, id_new, field, vals[field], user, rel_context) or []
File "/usr/lib/python2.7/dist-packages/openerp/osv/fields.py", line 1477, in set
self._fnct_inv(obj, cr, user, id, name, value, self._fnct_inv_arg, context)
File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_attachment.py", line 176, in _data_set
fname_to_delete = attach.store_fname
File "/usr/lib/python2.7/dist-packages/openerp/fields.py", line 823, in __get__
return record._cache[self]
File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 5931, in __getitem__
return value.get() if isinstance(value, SpecialValue) else value
File "/usr/lib/python2.7/dist-packages/openerp/fields.py", line 55, in get
raise self.exception
AccessError: ('AccessError', u'The requested operation cannot be completed due to security restrictions. Please contact your system administrator.\n\n(Document type: ir.attachment, Operation: read)')

Any ideas on how to restore would be appreciated.


are you upload images from ADMIN user account ? If not then you have to give access rights to that user.

Emipro Technologies Pvt. Ltd.
on 8/19/15, 1:43 AM

Hi Thanks Emipro Technologies Pvt. Ltd., I think you're right about the access rights.  My users all have access rights, but I have just noticed that a guest to the website can see the images but once one of my users log in, they disappear for everyone except the admin user. Do you know where I could change the access rights of my users to give them permission to access images uploaded as attachmenmts to the front end website? Thanks - Mark

on 8/22/15, 8:04 PM

Had the same issue just turn up myself...

on 11/6/15, 12:47 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 8/18/15, 9:51 AM
Seen: 1603 times
Last updated: 11/6/15, 12:47 PM