Odoo Help


How do I create a rule definition to filter leaves by the logged in user's department?

Kevin Carlo Samaniego
on 6/25/13, 8:48 AM 1,995 views

I'm trying to create a rule so that a particular group could only see leaves (requests and summary) from people under their own department.

The syntax in creating a Rule Definition (Domain Filter) is [('field name','operator','value')] am I right? Which fields can I use? I want to be able to get the logged-in user's department then use that value to control which leaves would show.

On 5/12/14, 11:38 PM

you can use this in Rule Definition inside Group : [('department_id','=',user.context_department_id.id)]

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

0 follower(s)


Asked: 6/25/13, 8:48 AM
Seen: 1995 times
Last updated: 3/16/15, 8:10 AM