Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
2763 Vistas

Trying to restrict user access and I've pretty much stripped all functionalities to its bone, except for I couldn't remove the Archive function from the Action cog.

Action cog is required as some of the other functions are to stay, therefore, I can't remove the action cog, but I just need the Archive function to go away.

This is for when users are in Product List View


Avatar
Descartar
Mejor respuesta

Hello,

you can try this way:

  1. Create automated action:

Model: product.template

Trigger Condition: on creation and update

Befor Update Domain: Active records 

Apply On: Active is not set

Action to do: Execution python code

python code:

if not env.user.has_group('sales_team.group_sale_manager'):
     raise Warning('You cannot archive products')

you can specify any other user access group, this solution referring to: https://odootricks.tips/about/automated-actions/use-automated-actions-to-stop-users-archiving-products/

Hope this will help.

Avatar
Descartar
Autor

Thanks, I did come across this option, I could do in test-staging with Studio installed but unfortunately not in our production, as we don't have Studio and will not be getting.... Hum, I'm wondering if there's any alternatives.

Hi,
you can do this by going to:
Setttings->Technical-> under Automation menu Item click "Automated Actions"
and follow above steps.
Note: you do not have to use studio to perform mentioned steps.

Autor

Thanks for replying, and yes, that's what I've tried, under odoo 14 (Enterprise), Technical -> Automation -> Scheduled Actions
This is the only available options, unless we get Stuidio app, which is what we've tested in Test staging, but unfortunately not available in Production unless we get Studio, hence this post, trying to see if there's any other ways.

Publicaciones relacionadas Respuestas Vistas Actividad
2
abr 23
1703
0
jul 23
966
1
oct 22
3544
1
ene 25
9855