Odoo Help


Access error upon showing image in Bill of Materials

Seppe De Roeck
on 10/24/15, 10:18 AM 594 views

Hi all,

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">

<TR> <TD>

<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" />

<t t-if="image">

<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 ?






| 4 4 6
Hyderabad, India

On 10/26/15, 3:51 AM


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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 10/24/15, 10:18 AM
Seen: 594 times
Last updated: 10/26/15, 3:51 AM