Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028792Openbravo ERP04. Warehouse managementpublic2015-01-27 20:052015-02-06 09:06
umartirena 
umartirena 
urgentmajoralways
closedfixed 
5
 
3.0PR15Q2 
Sandrahuguet
Core
No
0028792: [Cost Adjustments] Not controlled Null Pointer Exception error in Costing Background under certain circumstances
While running Costing Background process a 'Null Pointer Exception' error is raised under certain circumstances.
In F&B Group admin:
 * Go to Costing Rule window. Select existing costing rule of US Inc. org. Run 'Fix backdated transactions' process with date 01/08/2014 (17/10/2014)
 * Create a new product for US Inc. org. Add a Sales Price.
 * Add a Costing record for that product. Cost 15, Starting Date 01/08/2014, Ending Date 15/01/2015
 * Create a Goods Shipment. US Inc. org, Movement Date 02/01/2015.
 * Add a line with the previous product, qty 10
 * Create another Goods Shipment. US Inc. org, Movement Date 01/01/2015.
 * Add a line with the previous product, qty 15
 * Using pgadmin update the transaction process date of the two new transaction records. For the first one set trxprocessdate = '10/01/2015'. For the first one set trxprocessdate = '09/01/2015'
 * Run Costing Background Process.
 * Realize that 'Null Pointer Exception' error is raised in eclipse log, but nothing is displayed in the process monitor even the process finishes as Success.
No tags attached.
Issue History
2015-01-27 20:05umartirenaNew Issue
2015-01-27 20:05umartirenaAssigned To => dmiguelez
2015-01-27 20:05umartirenaModules => Core
2015-01-27 20:05umartirenaTriggers an Emergency Pack => No
2015-01-27 20:05umartirenaAssigned Todmiguelez => umartirena
2015-01-27 20:09hgbotCheckin
2015-01-27 20:09hgbotNote Added: 0073834
2015-01-27 20:09hgbotStatusnew => resolved
2015-01-27 20:09hgbotResolutionopen => fixed
2015-01-27 20:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/26cbf54910c2aef6faed8f5467532129ce5c3e50 [^]
2015-01-27 20:11hgbotCheckin
2015-01-27 20:11hgbotNote Added: 0073835
2015-01-30 13:28psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7566#r7566
2015-01-30 13:30psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7567#r7567
2015-02-04 20:34hudsonbotCheckin
2015-02-04 20:34hudsonbotNote Added: 0074187
2015-02-04 20:34hudsonbotCheckin
2015-02-04 20:34hudsonbotNote Added: 0074188
2015-02-05 13:13psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7627#r7627
2015-02-06 09:06SandrahuguetReview Assigned To => Sandrahuguet
2015-02-06 09:06SandrahuguetNote Added: 0074240
2015-02-06 09:06SandrahuguetStatusresolved => closed
2015-02-06 09:06SandrahuguetFixed in Version => 3.0PR15Q2

Notes
(0073834)
hgbot   
2015-01-27 20:09   
Repository: erp/devel/pi
Changeset: 26cbf54910c2aef6faed8f5467532129ce5c3e50
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Tue Jan 27 20:08:23 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/26cbf54910c2aef6faed8f5467532129ce5c3e50 [^]

Fixes bug 28792: Null Pointer exception now is avoided in Costing Background


The problem was in AverageCostAdjustment java process while calling AverageAlgorithm.getProductCost method. While returning null, Null Pointer Exception error was raised.

---
M src/org/openbravo/costing/AverageCostAdjustment.java
---
(0073835)
hgbot   
2015-01-27 20:11   
Repository: erp/devel/pi
Changeset: e41b94ecad5b7ed2cb8d688a614c72228c6cad4d
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Tue Jan 27 20:10:56 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e41b94ecad5b7ed2cb8d688a614c72228c6cad4d [^]

Related to issue 28792: Uncomment a piece of code

---
M src/org/openbravo/costing/AverageCostAdjustment.java
---
(0074187)
hudsonbot   
2015-02-04 20:34   
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/f36c91d0ad63 [^]
Maturity status: Test
(0074188)
hudsonbot   
2015-02-04 20:34   
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/f36c91d0ad63 [^]
Maturity status: Test
(0074240)
Sandrahuguet   
2015-02-06 09:06   
Code review done