Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028163Openbravo ERPA. Platformpublic2014-11-12 17:322014-12-30 23:27
maite 
reinaldoguerra 
urgentmajoralways
closedfixed 
5
 
3.0PR15Q13.0PR15Q1 
Sandrahuguet
Core
No
0028163: "java.lang.IllegalArgumentException: node to traverse cannot be null!" error when trying to Unpost an Order
"java.lang.IllegalArgumentException: node to traverse cannot be null!" error when trying to Unpost an Order
1. Display "Posted" field in Purchase Order window
2. Define Accounting process for Orders
3. Register Purchase Order, add line, complete and post order
4. Try to Unpost order and following error will be raised in the application "Error Deleting Accounting" (log shows "java.lang.IllegalArgumentException: node to traverse cannot be null!" error)

I can provide environment where problem is directly reproducible
problem is in line 223 of ResetAccounting.java. When trying to execute following line for "Order" entity error is raised (however it is not raised executing same sentence for "Invoice" entity)

final Query update = OBDal.getInstance().getSession().createQuery(strUpdate);
No tags attached.
related to defect 0028330 closed reinaldoguerra "java.lang.IllegalArgumentException: node to traverse cannot be null!" error when executing Reset Accounting 
related to defect 0030663 closed AtulOpenbravo Error Reseting Accounting if a table without processing column or with acctdate_column_id null is included in GL configuration 
related to design defect 0037708 acknowledged Triage Platform Base Update of Order table not working in HQL 
Issue History
2014-11-12 17:32maiteNew Issue
2014-11-12 17:32maiteAssigned To => AugustoMauch
2014-11-12 17:32maiteModules => Core
2014-11-12 17:32maiteResolution time => 1418338800
2014-11-12 17:32maiteTriggers an Emergency Pack => No
2014-11-12 17:33maiteSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7045#r7045
2014-11-12 17:33maiteIssue Monitored: networkb
2014-11-13 09:52alostaleAssigned ToAugustoMauch => Sandrahuguet
2014-11-26 16:44reinaldoguerraAssigned ToSandrahuguet => reinaldoguerra
2014-11-26 16:44reinaldoguerraStatusnew => scheduled
2014-11-27 00:33reinaldoguerraNote Added: 0072049
2014-12-01 18:01reinaldoguerraRelationship addedrelated to 0028330
2014-12-17 11:13hgbotCheckin
2014-12-17 11:13hgbotNote Added: 0072606
2014-12-17 11:13hgbotStatusscheduled => resolved
2014-12-17 11:13hgbotResolutionopen => fixed
2014-12-17 11:13hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/83546adbc105df9b909b73171672783412ee9400 [^]
2014-12-17 11:13SandrahuguetReview Assigned To => Sandrahuguet
2014-12-17 11:13SandrahuguetNote Added: 0072607
2014-12-17 11:13SandrahuguetStatusresolved => closed
2014-12-17 11:13SandrahuguetFixed in Version => 3.0PR15Q1
2014-12-30 23:27hudsonbotCheckin
2014-12-30 23:27hudsonbotNote Added: 0073229
2015-08-25 12:34ngarciaRelationship addedrelated to 0030663
2018-01-23 18:52aferrazRelationship addedrelated to 0037708

Notes
(0072049)
reinaldoguerra   
2014-11-27 00:33   
Test plan used:
1- Login into Openbravo ERP
2- As System Administrator go to Purchase Order Window
3- Display Posted field
4- Logout and login
5- Go to General Ledger Configuration window
6- Select F&B EspaƱa, S.A. US/A/Euro record
7- Go to Active tables tab and select Order
8- Set active flag as true
9- Define Accounting process for Orders or go to the next step.
10- Register a Purchase Order, add line.
11- Book the order and then post it. Realize that a posting error is launched if you do not define an Accounting process (step 9)
12- Try to unpost the order, check "Delete accounting entry" flag. Now the process is executed successfuly, take into account that if no posting process is executed before, there were no unposted documents or deleted journal entries.
13- Repeat steps 11 and 12 for other entities (windows) such as Amortization, Invoice or Goods Shipment. Unpost process will be executed successfuly.
(0072606)
hgbot   
2014-12-17 11:13   
Repository: erp/devel/pi
Changeset: 83546adbc105df9b909b73171672783412ee9400
Author: Reinaldo Guerra <reinaldo.guerra <at> peoplewalking.com>
Date: Wed Nov 26 23:32:57 2014 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/83546adbc105df9b909b73171672783412ee9400 [^]

Fixed bug 28163: IllegalArgumentException error when trying to unpost an Order.

HQL Query when updating order status during unpost process, launches an hibernate exception when parsing "Order" keyword. In order to avoid this, ResetAccounting java class was changed to use native SQL Query instead of HQL Query when unposting entities.
This changes in code takes into account all kind of unposteable openbravo entities. Now it is possible to unpost an order successfuly.

---
M src/org/openbravo/financial/ResetAccounting.java
---
(0072607)
Sandrahuguet   
2014-12-17 11:13   
Code review + testing OK
(0073229)
hudsonbot   
2014-12-30 23:27   
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/6525fe229e06 [^]
Maturity status: Test