Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
6185 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
2
juil. 22
5727
0
juil. 18
2881
1
mai 18
9210
1
juil. 17
10444
1
juil. 17
3043