İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
5826 Görünümler

Hello everybody,

We are trying to implement purchasing in Odoo 12 CE. The problem we are having is when a vendor clicks the link that we send them they are shown a "500 Internal Server Error". I tracked down the log entry and I will post it below. Any help in resolving this issue would be greatly appreciated.


2019-01-25 14:39:51,495 955 INFO odoo odoo.addons.base.models.ir_model: Access Denied by ACLs for operation: read, uid: 4, model: purchase.order 
2019-01-25 14:39:51,545 955 ERROR odoo odoo.addons.website.models.ir_http: 500 Internal Server Error:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 344, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_1332_4912
  File "<template>", line 2, in body_call_content_4911
  File "<template>", line 35, in foreach_4907
  File "/usr/lib/python3/dist-packages/odoo/tools/image.py", line 330, in image_data_uri
    FILETYPE_BASE64_MAGICWORD.get(base64_source[:1], 'png'),
TypeError: 'bool' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 203, in _dispatch
    result = request.dispatch()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 832, in dispatch
    r = self._call_function(**self.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 344, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 340, in checked_call
    result.flatten()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1267, in flatten
    self.response.append(self.render())
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1260, in render
    return env["ir.ui.view"].render_template(self.template, self.qcontext)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 1276, in render_template
    return self.browse(self.get_view_id(template)).render(values, engine)
  File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 231, in render
    return super(View, self).render(values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/usr/lib/python3/dist-packages/odoo/addons/web_editor/models/ir_ui_view.py", line 27, in render
    return super(IrUiView, self).render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 1285, in render
    return self.env[engine].render(self.id, qcontext)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 59, in render
    result = super(IrQWeb, self).render(id_or_xml_id, values=values, **context)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 272, in render
    self.compile(template, options)(self, body.append, values or {})
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 351, in _compiled_fn
    raise QWebException("Error to render compiling AST", e, path, node and etree.tostring(node[0], encoding='unicode'), name)
odoo.addons.base.models.qweb.QWebException: 'bool' object is not subscriptable
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 344, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_1332_4912
  File "<template>", line 2, in body_call_content_4911
  File "<template>", line 35, in foreach_4907
  File "/usr/lib/python3/dist-packages/odoo/tools/image.py", line 330, in image_data_uri
    FILETYPE_BASE64_MAGICWORD.get(base64_source[:1], 'png'),
TypeError: 'bool' object is not subscriptable

Error to render compiling AST
TypeError: 'bool' object is not subscriptable
Template: 1332
Path: /templates/t/t/div[2]/div/div[2]/t/div/div[1]/img
Node: <img t-att-src="image_data_uri(resize_to_48(ol.product_id.image))" alt="Product"/>
                  
 
2019-01-25 14:39:51,551 955 INFO odoo werkzeug: 96.92.191.54 - - [25/Jan/2019 14:39:51] "GET /my/purchase/4?model=purchase.order&res_id=4&access_token=8259b09a-7819-4dad-bab5-070b22a067fd HTTP/1.1" 500 - 53 0.021 0.045
2019-01-25 14:39:51,737 955 INFO odoo werkzeug: 96.92.191.54 - - [25/Jan/2019 14:39:51] "GET /web/webclient/qweb?mods= HTTP/1.1" 200 - 1 0.000 0.003
2019-01-25 14:39:51,739 955 INFO odoo werkzeug: 96.92.191.54 - - [25/Jan/2019 14:39:51] "POST /web/webclient/bootstrap_translations HTTP/1.1" 200 - 1 0.000 0.002
2019-01-25 14:40:06,875 955 INFO odoo werkzeug: 127.0.0.1 - - [25/Jan/2019 14:40:06] "POST /longpolling/poll HTTP/1.1" 200 - 9 0.003 50.008
Thanks in advance for any help.
Avatar
Vazgeç

Please use a meaningful title next time and not the generic error message.

Üretici En İyi Yanıt

I'm not sure that is the problem. I exported some data, I'd be very grateful if you would take a look.


id name model transient access_ids/id access_ids/name access_ids/active access_ids/perm_create access_ids/perm_unlink access_ids/group_id access_ids/group_id/id access_ids/perm_read access_ids/perm_write website_form_access field_id/id field_id/name field_id/website_form_blacklisted field_id/copied field_id/help field_id/field_description field_id/ttype field_id/groups field_id/index field_id/model field_id/relation field_id/on_delete field_id/readonly field_id/required field_id/selectable field_id/size field_id/store field_id/track_visibility field_id/translate
base.model_ir_model_access Model Access ir.model.access FALSE base.access_ir_model_access_group_erp_manager ir_model_access_group_erp_manager TRUE TRUE TRUE Administration / Access Rights base.group_erp_manager TRUE TRUE FALSE base.field_ir_model_access____last_update __last_update TRUE FALSE Last Modified on datetime FALSE FALSE ir.model.access FALSE TRUE FALSE FALSE FALSE FALSE FALSE
base.field_ir_model_access__active active TRUE TRUE If you uncheck the active field, it will disable the ACL without deleting it (if you delete a native ACL, it will be re-created when you reload the module). Active boolean FALSE FALSE ir.model.access FALSE FALSE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__create_date create_date TRUE TRUE Created on datetime FALSE FALSE ir.model.access FALSE TRUE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__create_uid create_uid TRUE TRUE Created by many2one FALSE FALSE ir.model.access res.users Set NULL TRUE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__display_name display_name TRUE FALSE Display Name char FALSE FALSE ir.model.access FALSE TRUE FALSE FALSE 0 FALSE FALSE FALSE
base.field_ir_model_access__group_id group_id TRUE TRUE Group many2one FALSE TRUE ir.model.access res.groups Cascade FALSE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__id id TRUE TRUE ID integer FALSE FALSE ir.model.access FALSE TRUE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__model_id model_id TRUE TRUE Object many2one FALSE TRUE ir.model.access ir.model Cascade FALSE TRUE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__name name TRUE TRUE Name char FALSE TRUE ir.model.access FALSE FALSE TRUE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__perm_create perm_create TRUE TRUE Create Access boolean FALSE FALSE ir.model.access FALSE FALSE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__perm_read perm_read TRUE TRUE Read Access boolean FALSE FALSE ir.model.access FALSE FALSE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__perm_unlink perm_unlink TRUE TRUE Delete Access boolean FALSE FALSE ir.model.access FALSE FALSE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__perm_write perm_write TRUE TRUE Write Access boolean FALSE FALSE ir.model.access FALSE FALSE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__write_date write_date TRUE TRUE Last Updated on datetime FALSE FALSE ir.model.access FALSE TRUE FALSE TRUE 0 TRUE FALSE FALSE
base.field_ir_model_access__write_uid write_uid TRUE TRUE Last Updated by many2one FALSE FALSE ir.model.access res.users Set NULL TRUE FALSE TRUE 0 TRUE FALSE FALSE
Avatar
Vazgeç

What link from this module to give me a better look? So it looks like the access permissions are correct, or is it some error in the module or is it some operation error

Üretici

What link do you require? The link being clicked on the user end is: /mail/view?model=purchase.order&res_id=5&access_token=7a171e82-5389-4099-838a-588e98e36adf

En İyi Yanıt

I believe the error is found in the security file ir.model.access.csv, where the perm_read permission is 0, give a verified on it.

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Ara 24
3920
0
Kas 24
1604
1
Kas 24
1699
2
Tem 24
3307
0
Nis 24
2130