Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
6286 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Najlepsza odpowiedź

hi

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
mar 24
886
2
sty 25
1317
1
kwi 23
2829
2
lip 25
1456
2
mar 25
5867