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

I'd like to have a tree view of issues selected by a domain [('message_follower_ids','in ', uid)] where uid is the logged in user. However, the Uid is related to the user id and what is needed here is the uid.partner_id. This is unavailable from here as far as I can see.

Is there an easy way to do this? An answer on this site suggested it can be done with a record rule [('message_follower_ids','in', user.partner_id.id)] but I don't want to restrict the records in this way.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

I have found a solution:

['|',('user_id','=',uid),('message_follower_ids.user_ids','in',uid)]

If i m the owner or i m the follower, works greate on crm.phonecall

อวตาร
ละทิ้ง
ผู้เขียน

Perfect! That's exactly what I was looking for! .. Many Thanks! ..

คำตอบที่ดีที่สุด

If i've well understood :

You can create a related field on the mother table store=True (related to the child table).

Then you add this field on the tree view invisible="1" (if you don't want to see this field)

Then you can add a domain on this field.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ส.ค. 18
5464
1
มี.ค. 16
10872
6
ก.ย. 20
20031
1
พ.ค. 18
8568
2
พ.ค. 18
4473