Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

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

By
alvin
on 7/18/13, 4:26 AM 1,108 views

The Question has been closed for reason: duplicate question

by
Daniel Reis
on 07/18/2013 06:05:51

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

This a duplicate of http://help.openerp.com/question/24933/how-to-hide-edit-button-for-specific-user-in-form-issueits-urgentsomebody-help-me/. Please edit the first question instead, to add other things you tried.

Daniel Reis
on 7/18/13, 6:06 AM

About This Community

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

Question tools

0 follower(s)

Stats

Asked: 7/18/13, 4:26 AM
Seen: 1108 times
Last updated: 3/16/15, 8:10 AM