Skip to Content
Menu
This question has been flagged
1 Reply
3350 Views

Hello experts,

I am new to Odoo and I have a multi-company set-up. The company wants the shop managers to see inventory balances of other companies so I added all shops in their access rights. But they should be seeing the sales reports of their shops only. Is it possible to limit their view of sales reports to specific shops only even if they have access to all shops? 

I tried creating a new group and creating a Rule for company_rule_public. Is this the correct way?  Do you have a sample coding for the Rules below?

Rule Definition (Domain Filter)

[('id','child_of',[user.company_id.id])]

Appreciate very much your help.

Thanks,

Betsie

Avatar
Discard
Best Answer

here's my sample ir_rule for contract


<record id="hr_contract_company" model="ir.rule">

<field name="name">Contracts of my Company</field>

<field name="model_id" ref="hr_contract.model_hr_contract"/>

<field name="perm_read" eval="True"/>

<field name="perm_write" eval="True"/>

<field name="perm_create" eval="True"/>

<field name="perm_unlink" eval="True"/>

<field eval="True" name="global"/>

<field name="domain_force">['|',('employee_id.company_id','=',False),('employee_id.company_id','child_of',[user.company_id.id])]</field>

</record>

Avatar
Discard
Related Posts Replies Views Activity
1
May 20
2878
2
Dec 23
1441
2
Aug 22
7233
1
Jul 15
9608
1
Feb 24
396