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

My plan is to give our customers a user to our Odoo and only show it the customer profile page, it is linked to(res.users has Related Partner(partner_id)). I thought to use a domain and uid(that is the user that is logged in right now? So I have tried things like 

[['id','=',uid.partner_id]] 
[['name','=',uid.name]]
[['name','ilike',uid]]

The last one only shows the companies that have user's id in their name (for Admin it's 1) for the rest it's (object has no attribute 'partner_id'). Any ideas?

形象
丢弃
编写者 最佳答案

[('user_ids.id', '=', uid)]
This is the domain I was looking for. Thanks to Kalpana though

形象
丢弃
最佳答案

Hello Anti,

Apply a record rule [('user_ids.id', '=', user.id)] globally for Partner.Hope it works for you.

形象
丢弃
相关帖文 回复 查看 活动
2
5月 24
3898
1
1月 22
5708
0
7月 19
2993
0
7月 15
4546
3
7月 25
4338