Odoo Help


How can I set a rule to allow editing to only users assigned to a certain object?

Ratmil Torres
on 2/11/16, 12:48 PM 642 views

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?

Ratmil Torres
On 2/11/16, 2:55 PM

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

Axel Mendoza
on 2/12/16, 4:01 AM
Axel Mendoza
On 2/11/16, 2:06 PM

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


About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 2/11/16, 12:48 PM
Seen: 642 times
Last updated: 2/11/16, 2:55 PM