Openbravo Issue Tracking System - Modules
View Issue Details
0052309ModulesFreight Managementpublic2023-05-02 20:202023-05-19 14:48
axelmercado 
tonialcaide 
highmajoralways
closedfixed 
5
 
 
approved
61763
OBPS
0052309: Error when deleting more than 1 record with user with manual role.
When a user with a manual role tries to delete more than one line in the Sales Order window, it generates the error shown in the attached image.
1- Log in with a user with a manual role.
2- Go to the "Sales Order" window and select a record containing many lines.
3- If you try to delete more than 1, the following error occurs: "With your current role this action is not allowed".
As Augusto from the Platform team observed, the problem is in the org.openbravo.materialmgmt.freightmgmt module, specifically here [1] where it tries to access the getProductType() method of Product without having write permission (in that case only the id and identifier can be accessed).
 
[1] https://gitlab.com/openbravo/product/pmods/org.openbravo.materialmgmt.freightmgmt/-/blob/master/src/org/openbravo/materialmgmt/freightmgmt/event/SalesOrderEventHandler.java#L72 [^]

You may need to add a setAdminMode block in that event handler.
No tags attached.
png caperror.png (391,792) 2023-05-02 20:20
https://issues.openbravo.com/file_download.php?file_id=18471&type=bug
Issue History
2023-05-02 20:20axelmercadoNew Issue
2023-05-02 20:20axelmercadoAssigned To => Triage Omni OMS
2023-05-02 20:20axelmercadoFile Added: caperror.png
2023-05-02 20:20axelmercadoSupport ticket => 61763
2023-05-02 20:20axelmercadoOBNetwork customer => OBPS
2023-05-02 20:21axelmercadoAssigned ToTriage Omni OMS => vmromanos
2023-05-02 21:38PracticsIssue Monitored: Practics
2023-05-03 08:12vmromanosAssigned Tovmromanos => Triage Omni WMS
2023-05-04 10:51mtaalAssigned ToTriage Omni WMS => tonialcaide
2023-05-19 10:31hgbotMerge Request Status => open
2023-05-19 10:31hgbotNote Added: 0149967
2023-05-19 14:36hgbotMerge Request Statusopen => approved
2023-05-19 14:48hgbotResolutionopen => fixed
2023-05-19 14:48hgbotStatusnew => closed
2023-05-19 14:48hgbotNote Added: 0149995
2023-05-19 14:48hgbotFixed in Version => PR23Q3
2023-05-19 14:48hgbotNote Added: 0149996

Notes
(0149967)
hgbot   
2023-05-19 10:31   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/886 [^]
(0149995)
hgbot   
2023-05-19 14:48   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/886 [^]
(0149996)
hgbot   
2023-05-19 14:48   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 4cc1a519407b2d9bb80f4447fa6e3f6baa39b8e9
Author: Toni Alcaide <antonio.alcaide@openbravo.com>
Date: 19-05-2023 10:29:18
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/4cc1a519407b2d9bb80f4447fa6e3f6baa39b8e9 [^]

Fixed ISSUE-52309: Admin mode set to MultipleDeleteActionHandler to prevent OBSecurityException when deleting more than one row. For single deletes, a similar workaround has been made in the DefaultDataSourceService.remove method

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/MultipleDeleteActionHandler.java
---