Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
10125 มุมมอง

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
3724
Many2many domain filter not working แก้ไขแล้ว
1
ม.ค. 22
5578
0
ก.ค. 19
2855
0
ก.ค. 15
4415
naked domain set up แก้ไขแล้ว
3
ก.ค. 25
3927