Skip to Content
Menu
This question has been flagged
2 Replies
5641 Views

Community,

I am getting this server error when trying to download a file from a secure portal page as a portal user? The download works when i am logged in as Administrator.


Internal Server Error

{"message": "Odoo Server Error", "code": 200, "data": {"debug": "Traceback (most recent call last):\n File \"/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py\", line 69, in wrap\n return f(*args, **kwargs)\n File \"/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py\", line 1084, in saveas\n res = Model.read(cr, uid, [int(id)], fields, context)[0]\n File \"/usr/lib/python2.7/dist-packages/openerp/api.py\", line 241, in wrapper\n return old_api(self, *args, **kwargs)\n File \"/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_attachment.py\", line 318, in read\n return super(ir_attachment, self).read(cr, uid, ids, fields_to_read, context=context, load=load)\n File \"/usr/lib/python2.7/dist-packages/openerp/api.py\", line 241, in wrapper\n return old_api(self, *args, **kwargs)\n File \"/usr/lib/python2.7/dist-packages/openerp/models.py\", line 3125, in read\n result = BaseModel.read(records, fields, load=load)\n File \"/usr/lib/python2.7/dist-packages/openerp/api.py\", line 239, in wrapper\n return new_api(self, *args, **kwargs)\n File \"/usr/lib/python2.7/dist-packages/openerp/models.py\", line 3171, in read\n values[name] = field.convert_to_read(record[name], use_name_get)\n File \"/usr/lib/python2.7/dist-packages/openerp/models.py\", line 5554, in __getitem__\n return self._fields[key].__get__(self, type(self))\n File \"/usr/lib/python2.7/dist-packages/openerp/fields.py\", line 810, in __get__\n return record._cache[self]\n File \"/usr/lib/python2.7/dist-packages/openerp/models.py\", line 5910, in __getitem__\n return value.get() if isinstance(value, SpecialValue) else value\n File \"/usr/lib/python2.7/dist-packages/openerp/fields.py\", line 55, in get\n raise self.exception\nAccessError: ('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)')\n", "exception_type": "except_osv", "message": "AccessError\nThe requested operation cannot be completed due to security restrictions. Please contact your system administrator.\n\n(Document type: ir.attachment, Operation: read)", "name": "openerp.exceptions.AccessError", "arguments": ["AccessError", "The requested operation cannot be completed due to security restrictions. Please contact your system administrator.\n\n(Document type: ir.attachment, Operation: read)"]}}


Thanks

Avatar
Discard
Best Answer

You need to add permissions for model ir.attachment at least to read for the group portal assigned to the user

Avatar
Discard
Best Answer

hi

Add permission read |write  to the user.if it not solved comment the error

Avatar
Discard
Related Posts Replies Views Activity
0
Mar 24
138
0
Nov 24
56
1
Apr 23
1528
1
May 24
688
2
Feb 24
645