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.

0

How to complete this python code?

By
alvin
on 7/18/13, 6:56 AM 741 views

This is a hard time for me..because this problem is not solved yet in this 4 days. I need project user only able to create record issue but not allowed to edit any recorded issue. Only admin and project manager that able to Edit recorded issue.

I already change access control list and record rules but it's not working. I also have change access rights in models project.issue and unchecked write access for user. Then , user can't edit but also can't create. So , I don't know how to do.

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

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, 6:56 AM
Seen: 741 times
Last updated: 3/16/15, 8:10 AM