Skip to Content
Menu
This question has been flagged
2 Replies
2046 Views

I need to create a user group to hide the create button on the stock.picking form view and list view. How to achieve this?

Avatar
Discard
Best Answer
  1. Create User Group:

    • Go to Settings > Users & Companies > Groups.
    • Click on Create to create a new group.
    • Provide a name for the group, such as "No Create Stock Picking".
    • In the Access Rights tab, you can leave most of the options empty or unchecked since you only want to hide the "Create" button. You might want to add any additional access rights as needed.
    • Save the group.
  2. Apply Record Rule:

    • After creating the group, go to Settings > Technical > Security > Record Rules.
    • Create a new record rule:
      • Model: stock.picking
      • Name: "Hide Create Button"
      • Domain: [] (Empty domain, which means the rule will apply to all records)
      • Apply for Read: Checked
      • Apply for Write: Unchecked
      • Apply for Create: Checked (This is the important step; you're controlling creation)
      • Apply for Delete: Unchecked
      • Groups: Select the group you created ("No Create Stock Picking")
    • Save the record rule.
  3. Assign User to Group:

    • Go back to Settings > Users & Companies > Users.
    • Edit the user for which you want to hide the "Create" button.
    • In the Access Rights tab, add the "No Create Stock Picking" group to the Groups field.
    • Save the user.

Now, the "Create" button for the stock.picking model will be hidden for users who are members of the "No Create Stock Picking" group. This will apply both to the form view and the list view of stock.picking.

Avatar
Discard
Best Answer

Hi,
You can create a new user group and add a new access right definition for this group and model stock.picking by settings create permission as 0.

Once you assign create permission as false, the create button will get hidden from form and list for this group of users.





Thanks & Regards

Walnut Software Solutions

Avatar
Discard
Author

Thanks for providing a solution, I did the exact same thing but the create button still appears for the users I defined in the group related to this access right

Hi Moe,
From "Inventory / User" Group:
- remove "Transfer" access rights
- or change "Transfer" create access rights to False

Author

Hello Jason,

This didn't solve the problem

Related Posts Replies Views Activity
2
Feb 19
11112
0
Mar 15
4022
1
Nov 24
17617
2
May 24
1376
0
Apr 24
1328