Skip to Content
Menu
This question has been flagged
1 Reply
2107 Views

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
Discard
Best Answer

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
Discard
Author

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.

Author

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.

Related Posts Replies Views Activity
2
Apr 23
1246
0
Jul 23
541
1
Oct 22
2485
1
Oct 24
7360