Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
3217 Vizualizări

Hi,

It is possible to make a read only view of the opened maintenance requests of a specific maintenance team?

I want that the users can see their requests but can't modify the stage of then.


Thnks


Imagine profil
Abandonează
Autor Cel mai bun răspuns

Hi Ibrahim,

is possible to apply that view to a specific group of users?

for example, create a user group called “read only view”.

another inquire is... can i display that view in a specific link of the menu, like “Maintenance Requests Status”?

Thnks a lot!

Imagine profil
Abandonează
Cel mai bun răspuns

Hi  Luis, 
1- Declare a boolean field :

fields_readonly = fields.Boolean(compute='compute_fields_readonly')

2- then if your function:

@api.multi

def compute_fields_readonly(self):     
user = self.env.user     

for record in self:         

    if user.has_group('module.your_maintenance_team_group'):  

        record.fields_readonly = True


3- in your view, add boolean to view with invisible="1" and attrs readonly if the boolean is true.
Hope this helps.

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
mar. 19
7651
2
sept. 25
1877
1
oct. 24
6434
2
ian. 24
2118
2
dec. 23
2063