Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
6160 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
jul 22
5710
0
jul 18
2872
1
may 18
9189
1
jul 17
10425
1
jul 17
3032