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

I have a model with a partner id in it. There is a list view accessible from a menu which also appears in the portal. What is the recommended way to show employees all records (and include a partner_id column), but portal users only their own records (hiding the partner_id column for them). 

形象
丢弃
编写者

@Jordi: thank you. Did not know it would be so easy. For portal users, how would I restrict the list to show only their records? Do I use filter_domain, domain, or force_domain?

编写者

Sorry, I meant 'domain_force'. Something I found while grepping the odoo sources.

最佳答案

Hi Ron,

In that case you should make sure that the 'partner_id' field in your view definition has the the following attribute and value:

groups="base.group_user" 

This will restrict this field to appear only for employees.

Portal users belong to a group "Portal" that does not include the group "Employees".

Regards,

Jordi Ballester

www.eficent.com

形象
丢弃
相关帖文 回复 查看 活动
1
9月 23
5318
0
3月 21
2775
1
3月 18
6664
2
8月 25
2598
2
7月 25
1516