跳至內容
選單
此問題已被標幟
1 回覆
2678 瀏覽次數

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


頭像
捨棄
最佳答案

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.

頭像
捨棄
作者

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.

作者

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.

相關帖文 回覆 瀏覽次數 活動
2
4月 23
1630
0
7月 23
852
1
10月 22
3442
1
1月 25
9709