Skip to Content
Menu
This question has been flagged
2 Replies
5440 Views

i'm using odoo 9 and i have created a custom module to create a new access rule to limit product creation for sale managers, But it doesn't work.i have searched for days now to find a solution but i found nothing , any idea for help please ?

security.xml

access_product_template_sale_user,product.template,model_product_template_restriction,base.group_sale_manager,1,0,0,0access_product_product_sale_user,product.product,model_product_product_restriction,base.group_sale_manager,1,0,0,0

Avatar
Discard
Best Answer

You can restrict any user from creating a new product by following these steps:

- Go to:

Settings > in "Users" Select "Manage Users"

Select the user which you need to restrict him from creating a new product.

Select "Edit" then in "Inventory" Select "User" ((Do Not Select Administrator)) then click save.

..

Settings > User & Companies > Select "Groups"

Search for "Inventory / User" then Select it

Select "Access Rights" then Select "Edit"

In the table, you will see "product.template stock user" ..

Tick inside "Create Access" to allow users to create a new product or untick to restrict the user from creating a new product.



Regards,

Yousif Al Qallaf

Avatar
Discard
Best Answer

Hi, just a few notes:

  1. I guess you meant 'ir.model.access.csv' file, not security.xml?

  2. Check that the rule is applied through the interface in the debug mode:  Settings > Techical > Security > Access Control Lists > search for object 'product'

  3. Make sure your user doesn't belong to any other user group, which has right for creating products (in the same list as above) 

Avatar
Discard
Related Posts Replies Views Activity
2
Jul 22
4922
0
Jul 18
2268
1
May 18
7852
1
Jul 17
9621
1
Jul 17
2309