Is not possible to add User Permission for Warehouse?

Hi all,

i’m trying to add a new User Permission from User Permission Manager (see pic), is not possible to select Warehouse doctype?

Any hint?

Hi @JoEz,

This issue is already fixed, can you pull the latest update and check

@rohit_w I’m on last update …same problem …

@rohit_w i think the problem is because of:

return list(set([p.parent for p in get_valid_perms() if p.set_user_permissions]))

Checked in tabDocPerm and set_user_permission is 0 in almost all DocTypes.

Changing return line in:

    return list(set([p.parent for p in get_valid_perms()]))

it works properly …so it’s needed to update set_user_permission and set to 1 by default in all DocTypes

Any hint for other possible solution?

Thx

I wonder if this is linked to a similar problem I’m facing.

I’ve created a new role and assigned a user to that role.

In that role, I’ve given “read” permissions to Warehouse. I’ve also checked “Set User Permissions” and “Apply User Permissions”.

I then use the User Permissions manager to give the user rights to a particular warehouse.

However, when I go to the Warehouse List, the User can’t see any warehouses. When I uncheck “Apply User Permissions” the user can see all warehouses.

It looks like Apply User Permissions isn’t working correctly for Warehouse. Its fine for other doctypes.

I’m on ERPNext: v7.2.18 and Frappe Framework: v7.2.14, updated today.

@rohit_w hi, i’m still experiencing the problem, can you confirm it is fixed?

Edit, opened a pull request: