跳至內容
選單
此問題已被標幟
2 回覆
4630 瀏覽次數


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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
10月 20
9172
0
10月 19
3897
0
6月 16
3257
1
3月 15
5046
2
2月 25
2043