İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3102 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
Üretici

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.

Üretici

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.

İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Nis 23
1984
0
Tem 23
1194
1
Eki 22
4051
1
Oca 25
11184