Skip to Content
Menú
This question has been flagged
2 Respostes
2303 Vistes

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
Descartar
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
Descartar
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
Descartar
Autor

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

Autor

Hello Jason,

This didn't solve the problem

Related Posts Respostes Vistes Activitat
2
de febr. 19
11304
0
de març 15
4192
1
de nov. 24
18100
2
de maig 24
1672
0
d’abr. 24
1580