Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2015-04-27 12:472015-08-20 23:16
ReporterpsanjuanView Statuspublic 
Assigned Toaferraz 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionb45cf0559789
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabaseOracleJava version1.6
OS VersionUbuntu 8.04.1Database version11. version1.7.0
Product VersionSCM revision 
Review Assigned Tovmromanos
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0029702: Java.lang.NullPointerException after launching the Costing Background process in a product under "Standard" algorithm

DescriptionJava.lang.NullPointerException after launching the Costing Background process in a product under "Standard" algorithm, once stock is negative
Steps To ReproduceCreate a Costing Rule with below set up for a Legal entity:
Costing Algorithm: Standard Algorithm
Warehouse Dimension= No
Backdated Transactions Fixed = Yes

Create a product named "Product Negative 1 Positivo Standard" with below setup:
Purchase Price List 100.00 in "Price" tab.
Navigate to "Costing" tab and enter below data:
Cost Type = Standard
Cost = 100
Starting Date =01-01-2015
Ending Date = 31-12-9999
Manual = Yes
Warehouse = empty

Create a purchase order and a goods receipt for 100 units of this product.
Book the order, and complete and post Goods Receipt.

Create a goods shipment for 100 units of this product.
Complete and post Goods Shipment.

Navigate to Product window, transaction tab and realize that Goods Receipt and Goods Shipment are both cost calculated.

Once more create a goods shipment for 5 units of this product, therefore product stock turns into negative.

Complete goods shipment and post it.

Navigate to Product window, transaction tab and realize that last Goods shipment transaction is also cost calculated.

Navigate to Goods Receipt window and create a new one for 10 units of the product, therefore stock turns into a positive value.

Complete Goods Receipt and try to post it.
An error is shown saying that no there is no cost calculated for the product.

Navigate to Process Request window and realize that Process Request has been executed but there is no message whether it was success or not.

java lang null pointer exception is thrown. See image below:
Proposed SolutionCosting Background process fails because calculateNegativeStockCorrectionAdjustmentAmount method for Standard Costing Algorithm does not calculate the adjustment amount (it does nothing), and this field keeps as null.

Costing Background process should be change to avoid creating cost adjustments when working with Standard Costing Algorithm in case of PDC, NSC, BDT and MCC
TagsNo tags attached.
Attached Filespng file icon issue_29702.png [^] (238,849 bytes) 2015-04-27 12:48

- Relationships Relation Graph ] Dependency Graph ]
depends on defect 0029729 closedaferraz Differences between actual cost and standard cost (variances) should not trigger Cost Adjustments. 

-  Notes
psanjuan (manager)
2015-06-30 14:46

No JavaLang Null pointer exception is now shown and product transactions are created and valued properly at given standard cost. No cost adjustment is created which is correct.
hgbot (developer)
2015-07-06 15:56

Repository: erp/devel/pi
Changeset: b45cf0559789653c61099068e3954a76a3bec0b5
Author: Alvaro Ferraz <alvaro.ferraz <at>>
Date: Thu Jul 02 15:12:55 2015 +0200
URL: [^]

Fixes issue 29729 & Fixes issue 29702 & Fixes issue 29728

Cost Adjustments will not be created in transactions calculated with Standard Algorithm.

M src/org/openbravo/costing/
M src/org/openbravo/costing/
hudsonbot (developer)
2015-08-20 23:16

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

Promotion changeset: [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2015-04-27 12:47 psanjuan New Issue
2015-04-27 12:47 psanjuan Assigned To => Triage Finance
2015-04-27 12:47 psanjuan Modules => Core
2015-04-27 12:47 psanjuan Triggers an Emergency Pack => No
2015-04-27 12:48 psanjuan File Added: issue_29702.png
2015-04-27 12:53 psanjuan Steps to Reproduce Updated View Revisions
2015-04-27 13:07 psanjuan Steps to Reproduce Updated View Revisions
2015-04-27 13:12 psanjuan Steps to Reproduce Updated View Revisions
2015-04-30 09:45 aferraz Assigned To Triage Finance => aferraz
2015-04-30 13:34 aferraz Proposed Solution updated
2015-04-30 13:57 psanjuan Relationship added caused by 0029729
2015-04-30 13:58 psanjuan Relationship deleted caused by 0029729
2015-04-30 13:58 psanjuan Relationship added depends on 0029729
2015-06-11 12:51 aferraz Status new => scheduled
2015-06-11 17:36 aferraz Status scheduled => acknowledged
2015-06-11 17:36 aferraz Status acknowledged => scheduled
2015-06-11 17:37 aferraz Status scheduled => feedback
2015-06-11 17:37 aferraz Status feedback => new
2015-06-30 14:46 psanjuan Note Added: 0078595
2015-07-06 15:46 vmromanos Status new => scheduled
2015-07-06 15:56 hgbot Checkin
2015-07-06 15:56 hgbot Note Added: 0078679
2015-07-06 15:56 hgbot Status scheduled => resolved
2015-07-06 15:56 hgbot Resolution open => fixed
2015-07-06 15:56 hgbot Fixed in SCM revision => [^]
2015-07-06 15:58 vmromanos Review Assigned To => vmromanos
2015-07-06 15:58 vmromanos Status resolved => closed
2015-08-20 23:16 hudsonbot Checkin
2015-08-20 23:16 hudsonbot Note Added: 0079475

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker