Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
4185 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
1
Mei 20
3810
2
Des 23
2971
2
Agu 22
9463
1
Jul 15
10629
1
Feb 24
1374