Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
4577 Weergaven


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?

Avatar
Annuleer
Auteur Beste antwoord

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.


Avatar
Annuleer

No. I'm not living in Cuba. Cheers

Beste antwoord

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

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
okt. 20
9159
0
okt. 19
3880
0
jun. 16
3244
1
mrt. 15
5016
2
feb. 25
1984