Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet

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.

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Juni 23
3742
0
Feb. 24
1303
1
Nov. 22
23019
0
Jan. 21
3146
0
Dez. 15
6517