Skip to Content
Menu
This question has been flagged
1 Atsakyti
4224 Rodiniai

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

Portretas
Atmesti
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>

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
geg. 20
3852
2
gruod. 23
2984
2
rugp. 22
9488
1
liep. 15
10643
1
vas. 24
1383