Quantcast
Channel: OpenERP Help - Individual question feed
Viewing all articles
Browse latest Browse all 464

A correct python code require for hide button in form issue for specific user

$
0
0
I want to hide edit button in form issue for specific user. In this case , I want user only can create issue but can't edit any recorded issue. Only admin and project manager that able to Edit recorded issue. I have tried change in access control list and record rules but it's not working. I also have tried change access rights in models project.issue and unchecked write access for user. Then , user can't edit but also can't create. Someone have already answer me and give this code, but I don't know how to complete the code def write(self, cr, uid, ids, datas = {}, context = {} ):
if uid ..........: #check if user belongs to a certain group
return super(class_name, self).write(cr, uid, ids, datas, context)
else:
raise osv.except_osv('Error','You are not allowed to make changes!')
Anyone can help me to complete the code or any other choice to solve this problem?thank you

Viewing all articles
Browse latest Browse all 464

Trending Articles