跳至内容
菜单
此问题已终结
2 回复
4578 查看


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
9159
0
10月 19
3880
0
6月 16
3244
1
3月 15
5016
2
2月 25
1984