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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038218
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementmajoralways2018-03-26 13:252018-05-09 19:29
ReporterngarciaView Statuspublic 
Assigned Tomarkmm82 
PriorityurgentResolutionfixedFixed in Version3.0PR18Q3
StatusclosedFix in branchFixed in SCM revision1b60eec1321a
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toaferraz
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0038218: 'Delete failed' error in Reset Accounting process if it is launched for 'Organization' type org without legal children

Description'Delete failed' error in Reset Accounting process if it is launched for 'Organization' type org without legal children

Steps To ReproduceAs group admin role:
   Launch Initial organization setup process
      Organization Type: Organization
      Parent organization: F&B España, S.A
      Set a Location
      Do not Include Accounting File

   Go to Organization window and Set As Ready
   Go to Reset Accounting window
      Client: F&B International Group
      Organization: the previously created one
      Delete existing Accounting Entries: Y
   Check the following error is shown:
      Delete failed
   The log shows:
ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: syntax error at or near ")" Position: 91
ERROR org.openbravo.common.actionhandler.ResetAccountingHandler - Error in Reset Accounting Action Handler
org.openbravo.base.exception.OBException: Delete failed
    at org.openbravo.financial.ResetAccounting.delete(ResetAccounting.java:210)
    at org.openbravo.financial.ResetAccounting.delete(ResetAccounting.java:58)
    at org.openbravo.common.actionhandler.ResetAccountingHandler.doExecute(ResetAccountingHandler.java:67)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00330633.0PR16Q3 closedmarkmm82 It should be possible to run "Reset Accounting" process for several organization at once 
related to defect 0037422 closedmarkmm82 Reset Accounting finishes with error if it is launched for an org with "Organization" type and the type name has been changed 

-  Notes
(0103615)
markmm82 (developer)
2018-03-28 15:22

Test Plan:
As group admin role:
   Launch Initial organization setup process
      Organization Type: Organization
      Parent organization: F&B España, S.A
      Set a Location
      Do not Include Accounting File

   Go to Organization window and Set As Ready
   Go to Reset Accounting window
      Client: F&B International Group
      Organization: the previously created one
      Delete existing Accounting Entries: Y
   Notice the process ends successfully with 0 records affected
(0103858)
hgbot (developer)
2018-04-12 18:00

Repository: erp/devel/pi
Changeset: 1b60eec1321a769bdcd260ca184f511fe9b5ff20
Author: Mark <markmm82 <at> gmail.com>
Date: Tue Mar 27 16:02:07 2018 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/1b60eec1321a769bdcd260ca184f511fe9b5ff20 [^]

Fixes issue 38218: 'Delete failed' error in Reset Accounting process
if it is launched for 'Organization' type org without legal children

When the organization has an 'Organization' type and it doesn't has any legal
children, then a not well formed SQL sentence was throwing an exception because was trying
to filter orgs with the ad_org_id column in an empty list of IDs (ad_org_id in ()).

To fix that, if there isn't any organization to be affected by the process, then it is avoided
the execution of several steps of the algorithm, including don't execute queries
that uses the organization id list as filter.

So, if the organization has an 'Organization' type and it doesn't has any legal
children then the logic for the records deletion is skipped.

---
M src/org/openbravo/financial/ResetAccounting.java
---
(0103859)
aferraz (developer)
2018-04-12 18:00

Code review + Testing OK
(0104380)
hudsonbot (developer)
2018-05-09 19:29

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/2be7d3efe606 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2018-03-26 13:25 ngarcia New Issue
2018-03-26 13:25 ngarcia Assigned To => Triage Finance
2018-03-26 13:25 ngarcia Modules => Core
2018-03-26 13:25 ngarcia Triggers an Emergency Pack => No
2018-03-26 13:25 ngarcia Issue Monitored: networkb
2018-03-26 13:26 ngarcia Relationship added related to 0033063
2018-03-27 15:37 markmm82 Assigned To Triage Finance => markmm82
2018-03-27 15:37 markmm82 Status new => scheduled
2018-03-28 15:22 markmm82 Note Added: 0103615
2018-04-12 18:00 hgbot Checkin
2018-04-12 18:00 hgbot Note Added: 0103858
2018-04-12 18:00 hgbot Status scheduled => resolved
2018-04-12 18:00 hgbot Resolution open => fixed
2018-04-12 18:00 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1b60eec1321a769bdcd260ca184f511fe9b5ff20 [^]
2018-04-12 18:00 aferraz Review Assigned To => aferraz
2018-04-12 18:00 aferraz Note Added: 0103859
2018-04-12 18:00 aferraz Status resolved => closed
2018-04-12 18:00 aferraz Fixed in Version => 3.0PR18Q3
2018-04-12 18:01 aferraz Relationship added related to 0037422
2018-05-09 19:29 hudsonbot Checkin
2018-05-09 19:29 hudsonbot Note Added: 0104380


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker