Community mailing list archives

community@mail.odoo.com

Security Rules Issue

by
Arlosysr
- 09/20/2016 15:44:07
Hi Members,

I was working for one of the clients and faced a strange issue.
Let me describe you all the complete scenario

I have created three user Groups

1. Senior Officer
    Officer

2. Assessor

There is a new Model created and it has some fields in it and one of the fields is named as ASSIGNEE.

The Assessor can only view the application assigned to him by Senior Officer.
For that the security role that i wrote which runs perfectly fine is :

<field name="domain_force">[('assignee','=',user.id)]</field>

So, after when a series of processes run and Senior Officer assign the record i.e. to change the Field value of ASSIGNEE field than Assessor is able to see the record.

However, the problem arises when the Assessor tries to Assign back the record back to Senior Officer i.e. to change the field value of ASSIGNEE.

However, Odoo rule engine runs parallelly and it checks if this record got assigned back to the Officer, this record will go out of the domain area for Assessor and throws the read error.

Can someone please help and suggest me, what should be done in this case.

Thanks & Regards,
ARLOSYST Team