This question has been flagged
2 Replies
7650 Views

How you set a default filter on the state field for each user/group user

I want my view to show (with a default filter) the records with a specified state field (draft, send..) according to each user : draft for manager, send for a simple user...

Thank You

Avatar
Discard

Is there a way to filter using the state the user is in. For instance, we have sales reps using the POS module to create sales. When the user is in the POS module and selects 'customer', they see a list of all customers. Instead I want them to only see customers that are in the state in which the user resides. For instance a user in California should only see customers in California.

Author Best Answer

Hi again, i've found a solution. I can define filters for each user by : Settings/ User interface/ user-defined-filters.
I create a new filter and define the user i want the filter to be related to, and then i define the 'domain' of the field, for example : [('state', '=', 'validation1')].
Hope i helped
 

Avatar
Discard
Best Answer

You can give compute as function and check current user group inside the function

Avatar
Discard