Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
4617 Lượt xem


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?

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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.


Ảnh đại diện
Huỷ bỏ

No. I'm not living in Cuba. Cheers

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 10 20
9167
0
thg 10 19
3890
0
thg 6 16
3248
1
thg 3 15
5034
2
thg 2 25
2006