Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0039073
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 03. Procurement managementmajoralways2018-07-31 10:492018-08-20 14:42
ReporterngarciaView Statuspublic 
Assigned Tomarkmm82 
PriorityurgentResolutionfixedFixed in Version3.0PR18Q4
StatusclosedFix in branchFixed in SCM revision446b08330250
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToSandrahuguet
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0039073: NullPointerException in SL_RequisitionLine_Product callout if product is not selected in Requisition line

DescriptionNullPointerException in SL_RequisitionLine_Product callout if product is not selected in Requisition line
Steps To ReproduceAs system admin role:
   Set 'Enable UOM Management' preference to 'Y

As group admin role:
   Create a Requisition
   Add a line to it
   Do not select a product
   Select a Price List

   Check the following error is shown in the log:
ERROR org.openbravo.client.application.window.FormInitializationComponent - TabId:800251 - Mode:CHANGE - rowId:null
org.openbravo.base.exception.OBException: Couldn't execute callout (class org.openbravo.erpCommon.ad_callouts.SL_RequisitionLine_Product)
...
Caused by: java.lang.NullPointerException
    at org.openbravo.materialmgmt.UOMUtil.getDefaultAUMForFlow(UOMUtil.java:126)
    at org.openbravo.materialmgmt.UOMUtil.getDefaultAUMForPurchase(UOMUtil.java:110)
    at org.openbravo.erpCommon.ad_callouts.SL_RequisitionLine_Product.execute(SL_RequisitionLine_Product.java:126)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
has duplicate defect 0039406pi closedAtulOpenbravo Product Callout in Requisition Line can throw a Null Pointer when "UomManagement" preference is enabled. 

-  Notes
(0106059)
markmm82 (developer)
2018-07-31 16:05

Test PLan:
As system admin role:
   Set 'Enable UOM Management' preference to 'Y

As group admin role:
   Create a Requisition
   Add a line to it
   Do not select a product
   Select a Price List.
     Notice in the Eclipse console there aren't any exception logged.
   Don't save the line

   Add a new line to it
   This time select Cerveza Ale product (be sure it hasn't any AUM defined first)
    Notice the Alternative UOM has been automatically populated with the default UOM,
    in this case the product UOM because (Unit) it hasn't any AUM defined.
   Clean the ALternative UOM field and don't select any UOM.
   Select a Price List.
     Notice in the Eclipse console there aren't any exception logged and the Alternative UOM has been changed again to use Unit as it AUM.

   Go to Cerveza Ale product and add a new Alternate UOM
     UOM = Liter
     Conversion Rate = 0.5
     Sales = Purchase = Logistics = Primary

  Go back to the Requisition previously created and create a new line.
  Select Cerveza Ale product
  Notice the Alternative UOM has been automatically populated with the default Liter UOM
  Set 10 as Operative Quantity, check it represents 5 Units (In Quantity field)
  Clean the ALternative UOM field and don't select any UOM.
  Select a Price List.
     Notice in the Eclipse console there aren't any exception logged and the Alternative UOM has been changed again to use Liter as it default AUM.
(0106389)
hgbot (developer)
2018-08-17 14:51

Repository: erp/devel/pi
Changeset: 446b08330250484960ab9b786410e6cef630e3ae
Author: Mark <markmm82 <at> gmail.com>
Date: Tue Jul 31 10:05:27 2018 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/446b08330250484960ab9b786410e6cef630e3ae [^]

Fixed issue 39073:Fix NullPointerException in SL_RequisitionLine_Product callout
if product is not selected in Requisition line.

If the product wasn't selected then a NPE was thrown because was trying to get the
default AUM for an empty Product ID.

It is included a new condition validating that a product is selected and it is
not empty to avoid try to get a default AUM for an empty product and throw a NPE.

---
M src/org/openbravo/erpCommon/ad_callouts/SL_RequisitionLine_Product.java
---
(0106390)
Sandrahuguet (developer)
2018-08-17 14:56

Code review + testing OK
(0106415)
hudsonbot (developer)
2018-08-20 14:42

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/4f7d5fed140f [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2018-07-31 10:49 ngarcia New Issue
2018-07-31 10:49 ngarcia Assigned To => Triage Finance
2018-07-31 10:49 ngarcia Modules => Core
2018-07-31 10:49 ngarcia Triggers an Emergency Pack => No
2018-07-31 10:53 ngarcia Issue Monitored: networkb
2018-07-31 11:36 ngarcia Resolution time => 1534802400
2018-07-31 13:00 Sandrahuguet Assigned To Triage Finance => markmm82
2018-07-31 15:15 markmm82 Status new => scheduled
2018-07-31 16:05 markmm82 Note Added: 0106059
2018-08-17 14:51 hgbot Checkin
2018-08-17 14:51 hgbot Note Added: 0106389
2018-08-17 14:51 hgbot Status scheduled => resolved
2018-08-17 14:51 hgbot Resolution open => fixed
2018-08-17 14:51 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/446b08330250484960ab9b786410e6cef630e3ae [^]
2018-08-17 14:56 Sandrahuguet Review Assigned To => Sandrahuguet
2018-08-17 14:56 Sandrahuguet Note Added: 0106390
2018-08-17 14:56 Sandrahuguet Status resolved => closed
2018-08-17 14:56 Sandrahuguet Fixed in Version => 3.0PR18Q4
2018-08-20 14:42 hudsonbot Checkin
2018-08-20 14:42 hudsonbot Note Added: 0106415
2018-11-15 07:54 AtulOpenbravo Relationship added has duplicate 0039406


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker