Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
6161 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
jul. 22
5712
0
jul. 18
2872
1
mei 18
9190
1
jul. 17
10428
1
jul. 17
3033