Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016419Openbravo ERPA. Platformpublic2011-03-22 12:422011-05-24 10:55
dalsasua 
alostale 
urgentmajoralways
closedfixed 
20Ubuntu 10.10
2.50MP27 
 
Core
No
0016419: OrganizationStructureProvider.getChildTree() fails if there exists just one organization, that is not summary
OrganizationStructureProvider.getChildTree() fails if there exists just one organization, that is not summary
1.- 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.
diff --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);
   }
closingMay2011
depends on backport 0016430 closed alostale OrganizationStructureProvider.getChildTree() fails if there exists just one organization, that is not summary 
Issue History
2011-03-22 12:42dalsasuaNew Issue
2011-03-22 12:42dalsasuaAssigned To => mtaal
2011-03-22 12:42dalsasuaModules => Core
2011-03-23 08:33alostaleStatusnew => scheduled
2011-03-23 08:33alostalefix_in_branch => pi
2011-03-24 07:26dalsasuafix_in_branchpi =>
2011-03-24 07:26dalsasuaProposed Solution updated
2011-03-24 07:27dalsasuaAssigned Tomtaal => alostale
2011-03-24 07:36hgbotCheckin
2011-03-24 07:36hgbotNote Added: 0035188
2011-03-24 07:36hgbotStatusscheduled => resolved
2011-03-24 07:36hgbotResolutionopen => fixed
2011-03-24 07:36hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4df9197ed075dfd803f9817b2d8124425a706437 [^]
2011-05-24 10:49dalsasuaTag Attached: closingMay2011
2011-05-24 10:55dalsasuaStatusresolved => closed

Notes
(0035188)
hgbot   
2011-03-24 07:36   
Repository: erp/devel/pi
Changeset: 4df9197ed075dfd803f9817b2d8124425a706437
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Thu Mar 24 07:34:41 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/4df9197ed075dfd803f9817b2d8124425a706437 [^]

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

---
M src/org/openbravo/dal/security/OrganizationStructureProvider.java
---