Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
10260 Переглядів

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.

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
трав. 24
3893
1
січ. 22
5697
0
лип. 19
2992
0
лип. 15
4541
naked domain set up Вирішено
3
лип. 25
4314