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.

1

Why does access right won't work?

By
Anirudh Lou
on 2/3/15, 9:53 PM 707 views

Hi everyone, i've been stuck here with access right any one can help! The case is this i created another user and perform some transaction on Customer Invoice (same with Supplier Invoice). However, when this particular user Validate the transaction, the system response is:
 

Access Denied
The requested operation cannot be completed due to security restrictions. Please contact your system administrator.(Document type: Account Entry, Operation: read)

I don't know why it pops up.

Here are some of my xml code sinppet on security folder:


<record id="customize_account_move_comp_rule" model="ir.rule">
<field name="name">Accounting / Account Move</field>
<field name="model_id" ref="model_account_move" />
<field name="global" eval="True" />
<field name="domain_force">['|','&amp;','|',('company_id','=',False),('company_id','child_of',[user.company_id.id]),    ('shop_id','child_of',[user.shop_id.id]),('shop_id','=', [user.shop_id.id])] </field>
<field name="groups" eval="[(4,ref('group_account_entry'))]" />
<field eval="1" name="perm_unlink" />
<field eval="1" name="perm_write" />
<field eval="1" name="perm_read" />
<field eval="1" name="perm_create" />
</record>

<record id="customize_account_move_line_comp_rule" model="ir.rule">
<field name="name">Accounting / Account Move Line</field>
<field name="model_id" ref="model_account_move_line" />
<field name="global" eval="True" />
<field name="domain_force">['|','&amp;','|',('company_id','=',False),('company_id','child_of',[user.company_id.id]),('shop_id','child_of',[user.shop_id.id]),('shop_id','=', [user.shop_id.id])]</field>
<field name="groups" eval="[(4,ref('group_account_items'))]" />
<field eval="1" name="perm_unlink" />
<field eval="1" name="perm_write" />
<field eval="1" name="perm_read" />
<field eval="1" name="perm_create" />
</record>

<record id="customize_invoice_comp_rule" model="ir.rule">
<field name="name">Accounting / Invoice multi-company</field>
<field name="model_id" ref="model_account_invoice" />
<field name="global" eval="True" />
<field name="domain_force">['|','&amp;','|',('company_id','=',False),('company_id','child_of',[user.company_id.id]), ('shop_id','child_of',[user.shop_id.id]),('shop_id','=', [user.shop_id.id])]</field>
<field name="groups" eval="[(4,ref('group_supplier_invoice'))]" />
<field eval="1" name="perm_unlink" />
<field eval="1" name="perm_write" />
<field eval="1" name="perm_read" />
<field eval="1" name="perm_create" />
</record>

When i replaced '&amp;' with '|' it executes but doesn't filter properly. Any help or recommendation is much apprecaite.

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

1 follower(s)

Stats

Asked: 2/3/15, 9:53 PM
Seen: 707 times
Last updated: 3/16/15, 8:10 AM