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

Security / Domain Rules - Iterating loops

By
Stefan Frizzel
on 11/23/13, 1:25 AM 1,005 views

I have a model called Department, which contains two ManyToOne fields, one each for Manager and one for Publicist (there are more, but I have simplified the example).

I would like to create a new Security Record Rule so that each Manager can see only Users from their own department.

As far as I Know, to do this, I have to set the Object to Users when creating a new Record Rule. Where I struggle is how to iterate through all departments for each user.

Here is a Pseudocode example of what a want, the object is res.users

for each object for each department if(manager = user.id & publicist = object.id) display object

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

0 follower(s)

Stats

Asked: 11/23/13, 1:25 AM
Seen: 1005 times
Last updated: 3/16/15, 8:10 AM