Odoo Help

0
0
Luis Jacobo
On 7/7/18, 7:15 PM

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!

0
Ibrahim
On 7/7/18, 6:05 PM

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.

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 7/7/18, 12:41 PM
Seen: 193 times
Last updated: 7/7/18, 7:15 PM