Warehouse Access Control

161 views
Skip to first unread message

gnab...@gmail.com

unread,
Jun 14, 2021, 3:09:31 AM6/14/21
to iDempiere
Hello,
Can i Control Warehouse Access according to Role or User?

Thanks

KiênDX - Việt Nam

unread,
Jun 14, 2021, 4:20:19 AM6/14/21
to iDempiere
now, Idempiere not yet control warehouse access to Role or User.
I have solution temporary: 
1. Define 1 table warehouse access to User. 
2. Create 1 Function check Warehouse Access to Role of User. Here, In function validateWarehouseAccess I need param AD_User_ID, AD_Role_ID, AD_Client_ID, AD_Org_ID
Example: M_Warehouse_ID IN (SELECT M_Warehouse_ID FROM validateWarehouseAccess(@#AD_User_ID@, @#AD_Role_ID@, @#AD_Client_ID@, @#AD_Org_ID@)
3. With each Window, you want validate access: table must have M_Warehouse_ID. After Set Function to SqlWhere In Tab (Window, Tab & Field).

I hope in future, Idempiere will be create Warehouse Access

Vào lúc 14:09:31 UTC+7 ngày Thứ Hai, 14 tháng 6, 2021, gnab...@gmail.com đã viết:

Carlos Antonio Ruiz Gomez

unread,
Jun 15, 2021, 3:02:07 AM6/15/21
to idem...@googlegroups.com
That functionality already exists, it's probably documented somewhere but I could not find where, so, couple of screenshots, great if somebody can add this to the wiki:

The feature is available in Record Access Dialog in the Private Record Lock button.

Note the role must have enabled the flag Personal Access to be able to see this button:


Record Access
      Dialog


This opens a dialog where you can restrict the record per role:


Exclude for Role


The result of this example is that the GardenWorld User role will not see the record Air in the Freight Category table.

And this feature is available in ANY table that has an ID.

Regards,

Carlos Ruiz




El 14/6/21 a las 10:20, KiênDX - Việt Nam escribió:
--

KiênDX - Việt Nam

unread,
Jun 15, 2021, 11:27:01 PM6/15/21
to iDempiere
Tks carlos, 
I tried this function but user assign each record is very inconvenient. 
System of me include: 1 company, have 2 independent branches, each 1 branches have  about 7 - 30 store. 
I set: client =  company  , org =  branches , warehouse = store. 
With large data it is not possible to lock each record, so I just did the above solution.

If you have other solution, you can share for me?

Vào lúc 14:02:07 UTC+7 ngày Thứ Ba, 15 tháng 6, 2021, car...@gmail.com đã viết:

Emmanuel Mwathi

unread,
Sep 7, 2023, 9:52:52 AM9/7/23
to iDempiere
Thanks @Carlos, your answer is right. I followed it and managed to limit the record access.

However, the same does not affect the warehouse list under select role window while login in. (see screenshot below)

Any idea how to limit this list?

Role Select Window.png

Carlos Antonio Ruiz Gomez

unread,
Sep 7, 2023, 10:50:02 AM9/7/23
to idem...@googlegroups.com
Ah, interesting, I think we could consider that as a bug.

Please open a JIRA ticket describing the scenario.



El 7/9/23 a las 15:52, Emmanuel Mwathi escribió:
Reply all
Reply to author
Forward
0 new messages