Odoo Help


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.


How to restrict users from editing not owned products?

Abegail Sanchez
on 1/9/15, 3:07 AM 1,025 views

Lets say:

Product A = product of group A or user's of group A

Product B = product of group B or user's of group B

I want that both could read,create,edit & delete products 

but cannot edit products which is not owned by the group or user

 and can be view or select by other user's in many2one field.


Anil R. Kesariya

--Anil R. Kesariya--
| 6 5 8
Gandhinagar, India
--Anil R. Kesariya--
ERP Consultant

Key Skill
Technical & Functional Expert
Anil R. Kesariya
On 1/9/15, 6:22 AM

@Abegail Sanchez

In this case you need to define record rule for product.product model.

You need to add many2one user_id(res.users) field on product model.

and created ir.rule record from xml for that model.

Here group will not work because it is not about field, if you want to apply field access to  perticular group than you can set group on that field. but it is about record access , you have to create rule for that.

You can take reference from any base module where ir.rule is used.

So the product will be display to associated users only.

Go to Account module : account>>security>>account_security.xml

In this file you will find number of reference for rule.

It like, Users is associated with Employee, You can see inside the employee table there many2one field of user (res.users) only log in user can see the associated employee record.

You can also check in HR Category module as well.

Hope this will help you.



Kalpana Hemnani
On 1/9/15, 4:48 AM

Hello Abegail,

You can use access rights by group wise:




Hope this Helps!

Hi How to do access right for this one ..Please explain a step by stepwise

on 1/9/15, 5:22 AM

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

2 follower(s)


Asked: 1/9/15, 3:07 AM
Seen: 1025 times
Last updated: 3/16/15, 8:10 AM