Odoo Help

Welcome!

This community 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.

0

Access error upon showing image in Bill of Materials

By
Seppe De Roeck
on 10/24/15, 10:18 AM 280 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

0

Pawan

--Pawan--
1267
| 4 3 5
Hyderabad, India
--Pawan--


Pawan
On 10/26/15, 3:51 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

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