Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I am trying to show an image on a bill of materials, but I get an access error, while I am administrator. The code is more or less the same as in pricelists we use, where this is working.
<t t-foreach="[bl for bl in bomline_obj.browse(request.cr, request.uid, bomline_obj.search(request.cr, request.uid, [('bom_id','=',bom.id)], order='product_id',context=context), context=context)]" t-as="bomline">
<t t-set="pc" t-value="request.registry['product.product']"/>
<t t-set="image" t-value="pc.browse(request.cr, uid, bomline.product_id['id']).image_medium" />
<img t-att-src="'data:image/png;base64,'+image" style="max-height:200px" />
The exact error reads :
QWebException: ('AccessError', u'The requested operation cannot be completed due to security restrictions. Please contact your system administrator.\n\n(Document type: product.product, Operation: read)')
Any ideas ?
There must be some access rule defined on product.product object, which is voilating your access to particular product record,
Please check Settings -> Technical -> Security -> Record Rules and then search with object "product.product" and try disabling any rule for it.
Now once go through your previous scenrio and check if it works!
Hope it Helps!!
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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 10/24/15, 10:18 AM|
|Seen: 438 times|
|Last updated: 10/26/15, 3:51 AM|