Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039406Openbravo ERP03. Procurement managementpublic2018-10-04 22:522018-11-15 09:20
lbressan 
AtulOpenbravo 
highmajoralways
closedduplicate 
5
pi 
pi 
Sandrahuguet
Core
No
0039406: Product Callout in Requisition Line can throw a Null Pointer when "UomManagement" preference is enabled.
When trying to create a Requisition Line, if the preference "UomManagement" is enabled, the "SL_RequisitionLine_Product" callout throws an exception and apparently is affecting the visibility of some fields that evaluate this preference, such as "Operative Quantity" and "Alternative UOM".
In the code of the callout, inside an if statement, is evaluated if the preference "UomManagement" is enabled and if the product ID is empty. If this is true, a Utility is called where tries to obtain the entity of the product with the empty ID. Then, tries to get the UOM of the product and this throws a Null Pointer Exception.
1) Enable the UomManagement preference. Make sure to set the preference visible to any user, organization and client.
2) Display the "Operative Quantity" and "Alternative UOM" fields.
3) Enter to Requisition window
4) Create a new Requisition and then a Requisition Line. Make sure that the "Order Uom" field is empty.
5) Check if "Operative Quantity" and "Alternative UOM" fields are displayed.
If checking in SL_RequisitionLine_Product callout, that the product ID is empty and that the preference "UomManagement" is enabled, is correct (SL_RequisitionLine_Product.png), then the utility UOMUtil must check at some point, that the String parameter is not empty or the product obtained inside the getDefaultAUMForFlow method is different from null (UOMUtil.png). Otherwise, modify the if statement controlling that the String of the product is not empty, and if it is possible add more controls to the getDefaultAUMForFlow in UOMUtil.
No tags attached.
duplicate of defect 0039073 closed markmm82 NullPointerException in SL_RequisitionLine_Product callout if product is not selected in Requisition line 
zip CalloutScreenshot.zip (122,121) 2018-10-04 22:52
https://issues.openbravo.com/file_download.php?file_id=12243&type=bug
Issue History
2018-10-04 22:52lbressanNew Issue
2018-10-04 22:52lbressanAssigned To => Triage Finance
2018-10-04 22:52lbressanFile Added: CalloutScreenshot.zip
2018-10-04 22:52lbressanModules => Core
2018-10-04 22:52lbressanResolution time => 1539813600
2018-10-04 22:52lbressanTriggers an Emergency Pack => No
2018-11-07 12:26gsuarezTypedesign defect => defect
2018-11-07 17:48SandrahuguetResolution time1539813600 => 1540418400
2018-11-07 17:57SandrahuguetResolution time1540418400 => 1539813600
2018-11-07 18:03SandrahuguetResolution time1539813600 => 1543359600
2018-11-07 18:04SandrahuguetAssigned ToTriage Finance => AtulOpenbravo
2018-11-15 07:54AtulOpenbravoRelationship addedduplicate of 0039073
2018-11-15 07:56AtulOpenbravoNote Added: 0107923
2018-11-15 09:20SandrahuguetReview Assigned To => Sandrahuguet
2018-11-15 09:20SandrahuguetStatusnew => closed
2018-11-15 09:20SandrahuguetResolutionopen => duplicate

Notes
(0107923)
AtulOpenbravo   
2018-11-15 07:56   
Fixed in commit https://code.openbravo.com/erp/devel/pi/rev/446b08330250484960ab9b786410e6cef630e3ae [^]