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


Seudocode sample:

   class A

       tech_ids: one2many('B'),


   Class B

       user_id : many2one('res.users')


Class A has a one2many field to some other class B. Class B has a many2one field to users. How can I create a rule that allows edit objects of class A only if it has some object B in tech_ids referencing the current user?

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Hi, Axel. Thanks a lot. I was able to do it with this domain:

[('tech_ids.user_id.id', '=', user.id)]

I see we live on the same island :). Greetings, compatriota.


อวตาร
ละทิ้ง

No. I'm not living in Cuba. Cheers

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

You could take this answer as an example for how to do that

https://www.odoo.com/forum/help-1/question/how-to-show-different-task-stages-to-different-users-depending-on-other-model-90009#answer_90031

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ต.ค. 20
9146
0
ต.ค. 19
3876
0
มิ.ย. 16
3234
1
มี.ค. 15
4996
2
ก.พ. 25
1978