Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0032372 | Openbravo ERP | 09. Financial management | public | 2016-02-26 13:57 | 2016-03-01 18:36 | |||||||
Reporter | ngarcia | |||||||||||
Assigned To | AtulOpenbravo | |||||||||||
Priority | immediate | Severity | minor | Reproducibility | always | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | 3.0PR16Q1 | Fixed in Version | 3.0PR16Q1 | |||||||||
Merge Request Status | ||||||||||||
Review Assigned To | aferraz | |||||||||||
OBNetwork customer | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Support ticket | ||||||||||||
Regression level | Production - Confirmed Stable | |||||||||||
Regression date | 2014-09-02 | |||||||||||
Regression introduced in release | 3.0PR14Q4 | |||||||||||
Regression introduced by commit | https://code.openbravo.com/erp/devel/pi/rev/69108bf7103b [^] | |||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0032372: NullPointerException when posting a Physical Inventory with a line without an associated transaction (not stocked product) | |||||||||||
Description | NullPointerException when posting a Physical Inventory with a line without an associated transaction (not stocked product) | |||||||||||
Steps To Reproduce | In an instance without the following issue solved: https://issues.openbravo.com/view.php?id=31835 [^] As group admin role: Create a new product and set is as Stocked = 'Y' Create a goods receipt to increase its stock Create a goods shipment to leave its stock to 0 Set it as Stocked = 'N' (it will not possible after the fix of 31835) Create a Physical inventory for the same warehouse the stock was received in Launch the Create Inventory Count with the option of Inventory Quantity empty Check the product is not inserted Launch the Create Inventory Count with the option of Inventory Quantity = 0 Check the product is inserted and it shouldn't Process the inventory Try to post it and check the following error message is shown: Process failed during execution The logs shows: WARN org.openbravo.erpCommon.ad_forms.AcctServer - Accounting process failed. RecordID: 0E718DFD7B384111B2D2112722FCFF8B - TableId: 321 java.lang.NullPointerException at org.openbravo.erpCommon.ad_forms.DocInventory.createFact(DocInventory.java:183) at org.openbravo.erpCommon.ad_forms.AcctServer.postLogic(AcctServer.java:1111) at org.openbravo.erpCommon.ad_forms.AcctServer.post(AcctServer.java:804) at org.openbravo.erpCommon.ad_forms.AcctServer.post(AcctServer.java:719) at org.openbravo.erpCommon.ad_actionButton.Posted.processButton(Posted.java:273) at org.openbravo.erpCommon.ad_actionButton.Posted.doPost(Posted.java:104) | |||||||||||
Proposed Solution | The problem is in the following code: if ("NC".equals(line.transaction.getCostingStatus())) { setStatus(STATUS_NotCalculatedCost); } but it will also fail in the following: if (line.transaction.getTransactionCost() != null && line.transaction.getTransactionCost().compareTo(ZERO) == 0) { countInvLinesWithTrnCostZero++; } as line.transaction is null Apart from that, the Create Inventory Count process should avoid inserting not stocked products (check the solution of the 30697 issue) | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2016-02-29 14:01 | AtulOpenbravo | Type | defect => backport | |||||||||
2016-02-29 14:01 | AtulOpenbravo | Target Version | => 3.0PR16Q1 | |||||||||
2016-02-29 14:43 | AtulOpenbravo | Regression date | => 2014-09-02 | |||||||||
2016-02-29 14:43 | AtulOpenbravo | Regression introduced in release | => 3.0PR14Q4 | |||||||||
2016-02-29 14:43 | AtulOpenbravo | Regression introduced by commit | => https://code.openbravo.com/erp/devel/pi/rev/69108bf7103b [^] | |||||||||
2016-02-29 14:45 | AtulOpenbravo | Note Added: 0084596 | ||||||||||
2016-03-01 18:34 | aferraz | Regression level | => Production - Confirmed Stable | |||||||||
2016-03-01 18:35 | hgbot | Checkin | ||||||||||
2016-03-01 18:35 | hgbot | Note Added: 0084643 | ||||||||||
2016-03-01 18:35 | hgbot | Status | scheduled => resolved | |||||||||
2016-03-01 18:35 | hgbot | Resolution | open => fixed | |||||||||
2016-03-01 18:35 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/backports/3.0PR16Q1/rev/36410af94435cda8157af52f445c60b8cd06186b [^] | |||||||||
2016-03-01 18:35 | hgbot | Checkin | ||||||||||
2016-03-01 18:35 | hgbot | Note Added: 0084644 | ||||||||||
2016-03-01 18:36 | aferraz | Review Assigned To | => aferraz | |||||||||
2016-03-01 18:36 | aferraz | Note Added: 0084645 | ||||||||||
2016-03-01 18:36 | aferraz | Status | resolved => closed | |||||||||
2016-03-01 18:36 | aferraz | Fixed in Version | => 3.0PR16Q1 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|