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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0016430
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] A. Platformmajoralways2011-03-22 12:422011-06-07 12:34
ReporterdalsasuaView Statuspublic 
Assigned Toalostale 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branch2.50Fixed in SCM revisionae758ab4ba46
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabaseOracleJava version1.6.0_21
OS VersionUbuntu 10.10Database version11.2.0 SEAnt version1.8.0
Product Version2.50MP27SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0016430: OrganizationStructureProvider.getChildTree() fails if there exists just one organization, that is not summary

DescriptionOrganizationStructureProvider.getChildTree() fails if there exists just one organization, that is not summary
Steps To Reproduce1.- Install "Chart of accounts: PGC 2007 General", "Spain Taxes", "Invoice Register Book" and "ConfiguraciĆ³n de Impuestos para el Libro de Facturas" modules
2.- Run Initial Client Setup, applying all the reference data available, and clicking on "Create Accounting".
3.- Change role to the new client admin one.
4.- Run Initial Organization Setup, org type: Legal Entity With Accounting
5.- Go to organization window, flag allow period control, and choose the existing calendar.
6.- Run the set as ready process.
7.- Create a business partner category, and a business partner; set a location for it.
8.- Create a product category and a product.
9.- Create a price list version and a price list, giving a price to the created product.
10.- Create a payment term
11.- Create an invoice for the created business partner, with a line with the created product.
12.- Process and post the invoice.
13.- Create a invoice register book, and notice that a null pointer exception is returned.
Proposed Solutiondiff --git a/src/org/openbravo/dal/security/OrganizationStructureProvider.java b/src/org/openbravo/dal/security/OrganizationStructureProvider.java
--- a/src/org/openbravo/dal/security/OrganizationStructureProvider.java
+++ b/src/org/openbravo/dal/security/OrganizationStructureProvider.java
@@ -263,6 +263,9 @@
    */
   public Set<String> getChildOrg(String orgId) {
     initialize();
+ if (childByOrganizationID.get(orgId) == null) {
+ reInitialize();
+ }
     return childByOrganizationID.get(orgId);
   }
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0016419 closedalostale OrganizationStructureProvider.getChildTree() fails if there exists just one organization, that is not summary 

-  Notes
(0035303)
hgbot (developer)
2011-03-29 12:07

Repository: erp/stable/2.50
Changeset: ae758ab4ba4653538c907b6f2dc422124c19f43f
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Thu Mar 24 07:37:17 2011 +0100
URL: http://code.openbravo.com/erp/stable/2.50/rev/ae758ab4ba4653538c907b6f2dc422124c19f43f [^]

Fixes issue 16430.
Following Martin instructions, this changeset is pushed to fix the issue.

---
M src/org/openbravo/dal/security/OrganizationStructureProvider.java
---
(0038113)
shuehner (administrator)
2011-06-07 12:34

Tested on stable/2.50,pgsql (rev: 13e8fb0e80c1) Mentioned steps in the the issue are now working fine without any NPE.

- Issue History
Date Modified Username Field Change
2011-03-23 08:33 alostale Type defect => backport
2011-03-23 08:33 alostale fix_in_branch => 2.50
2011-03-24 07:27 dalsasua Proposed Solution updated
2011-03-24 07:27 dalsasua Assigned To mtaal => alostale
2011-03-29 12:07 hgbot Checkin
2011-03-29 12:07 hgbot Note Added: 0035303
2011-03-29 12:07 hgbot Status scheduled => resolved
2011-03-29 12:07 hgbot Resolution open => fixed
2011-03-29 12:07 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/ae758ab4ba4653538c907b6f2dc422124c19f43f [^]
2011-06-07 12:34 shuehner Note Added: 0038113
2011-06-07 12:34 shuehner Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker