Skip to Content
Menu
This question has been flagged
1 Reply
2420 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" />

</t>

</TD></TR>


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 ?

tx

Seppe

Avatar
Discard
Best Answer

Seppe,

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

Avatar
Discard