Odoo Help

Welcome!

This community 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.

0

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

By
Ratmil Torres
on 2/11/16, 12:48 PM 342 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?

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

Axel Mendoza

--Axel Mendoza--
10238
| 7 7 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 an 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

https://www.odoo.com/forum/help-1/question/how-to-show-different-task-stages-to-different-users-depending-on-other-model-90009#answer_90031

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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