Odoo Help


1 Answer

Techno-Functional Associate with 7+ years of experience in Odoo (formerly known as OpenERP).

deep India
9/11/14, 5:02 AM


Ya you can deceive the access rights for a user... using method "check_access_rights" which returns True if the user has access over an object... if it returns False, then you achieve the same by passing SUPERUSER_ID...

Example: In my case am trying to check whether user has delete permission for Crm.Lead... If he dont have am still proceeding with the action by passing SUPERUSER_ID...

              if not self.check_access_rights(cr, uid, 'unlink', raise_exception=False):
                                lead_obj.unlink(cr, SUPERUSER_ID, lead_ids, context=context)
                                lead_obj.unlink(cr, uid, lead_ids, context=context)

Ask a Question
Keep Informed
0 follower(s)
About This Community

This platform 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.

Odoo Training Center

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

Test it now