Odoo Help


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.


How can I make these record rules in v8

Bill Ennals
on 7/27/16, 10:54 AM 170 views

I want to prevent Project Managers editing the Project Settings of Projects that they are not the managers of.

For example, employee A and employee B both belong to the Project Manager group.  Employee A is the Project Manager of Project A.  Employee B is only a project team member of Project A and should not be able to edit its project settings.

I have the following rule:


applied to the Task object and that successfully prevents employee B from editing tasks that are not assigned to him, but if I duplicate the rule and apply it to the Project object I get the following error:

ValueError: Invalid field 'project_id.user_id' in leaf "<osv.ExtendedLeaf: ('project_id.user_id', '=', 18) on project_project (ctx: )>"

Can anyone help?

Shawn Varghese
On 7/27/16, 11:00 AM

If you are using the record rule in project.project, you wouldn't use project_id right?

It would be only:


Ah, yes, that works. Thanks. What object is 'project_id.user_id' relevant to?

Bill Ennals
on 7/27/16, 6:54 PM

The left hand side of record rules are based on fields in that model. So the Task object has project_id variable, so you could 'project_id.user_id'. Any other model with a project_id field could also use a record rule similar to it

Shawn Varghese
on 7/28/16, 1:24 AM

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)


Asked: 7/27/16, 10:54 AM
Seen: 170 times
Last updated: 7/27/16, 6:51 PM