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.


Record rules on same object with different CRUD options?

Andrius Laukavičius
on 2/20/14, 5:01 AM 707 views

I need to apply different record rules on same object to give different access rights depending on state that record is. For example there are three stages: stage1, stage2, stage3.

On first stage user with specific access rights group can do this:

Read, Write, Create his own records. When he presses button to go to stage2, then he can only Read that record (if that record would go back to stage1 - not by that user, then he could do previous things). And on stage3 that user does not see any records nor his nor any others.

I tried doing something like this:

First rule (applies r,w,c):


This one works. But I get problems when going to other stages. I tried to create another rule2 (applies r):

[('stage','=','stage2')] But it does not work, that user can still do anything that he can do in stage1.

If I make rule like this (applies r,w,c):

['|', ('user_id','=',user.id),('state','=','stage1')]

Then it gives access rights error that you can't go to next stage, because you don't have read access rights on that stage. How can this be solved?..

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)


Asked: 2/20/14, 5:01 AM
Seen: 707 times
Last updated: 3/16/15, 8:10 AM