تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
3236 أدوات العرض

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


الصورة الرمزية
إهمال
الكاتب أفضل إجابة

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!

الصورة الرمزية
إهمال
أفضل إجابة

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.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
مارس 19
7688
2
سبتمبر 25
1891
1
أكتوبر 24
6537
2
يناير 24
2134
2
ديسمبر 23
2077