Odoo Help

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

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

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.

Register

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)

Stats

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