跳至内容
菜单
此问题已终结
1 回复
4115 查看

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

形象
丢弃
最佳答案

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>

形象
丢弃
相关帖文 回复 查看 活动
1
5月 20
3729
2
12月 23
2888
2
8月 22
9328
1
7月 15
10551
1
2月 24
1329