Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
6255 Vistas

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
Descartar
Mejor respuesta

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

Avatar
Descartar
Mejor respuesta

hi

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

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
mar 24
830
2
ene 25
1261
1
abr 23
2805
2
jul 25
1406
2
mar 25
5839