If your role has multiple "AD_Record_Access", in some cases, the query for verification the availability of access is not created correctly.
Before create this query, you must sort all available"AD_Record_Access" by AD_Table_ID.
I tested in iDempiere 5.1 localhost.
1) Create user demo\demo
2) Create master role (Access 1, Access 2) (please take look a screen_1)
3) Create role demo.
3.1) Add role window access to "Warehouse Locators"
3.2) Add this role included role: Access 1, Access 2
4) Login at user demo\demo
5) Open window Warehouse Locators
6) Create debug breakpoint MRole
7) Click on button "Refresh" and debug variable "retSQL".
My test result:
1) Failed query:
2) After fix:
3) New error.
If you take a look on "AND M_Locator_ID IN (50002,50007,50001,50007)".
Is error. I created AD_RecordAccess for table M_Locator only for 50001, 50007 (please take look a screen_1).
Fix for this error (file patch is updated) MRole[2052-2057]:
This error can prevent a user from accessing records. We could not understand the reason for the error for a long time.
Palich.ru Development Team
Can you please explain a failing case to test this patch?
Closing per lack of feedback - please feel free to reopen if is still valid.