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 719 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

--Axel Mendoza--
| 7 8 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full-time employee trying to understand what to do and how

Reach me at aekroft@gmail.com

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: 719 times
Last updated: 2/11/16, 2:55 PM