Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0007407Openbravo ERPA. Platformpublic2009-02-06 09:552009-04-23 18:11
vmromanos 
alostale 
immediatecriticalrandom
closedfixed 
20Ubuntu 8.04
pi 
pi 
Core
No
0007407: Organization's tree works randomly
The organization's tree (inside General Setup || Enterprise || Organization) only works if the AD_Client_ID of the current client is less than 0 (which is the AD_Client_ID of the System client)

Example: Suppose that we have two clients ('0' and 'C99F9203BCA84A998926C5C8555E62A5'). If we try to display the organization's tree of the latest client, the application will show an empty tree called "BigBazaar OrganizaciĆ³n" instead of the client's one.

But, if the AD_Client_ID is, for example, '1000000', the tree will be displayed properly.
1- Run an initial client setup
2- Go to the database and check if the new AD_Client_ID starts with a letter instead of a number. In this case you can follow with the steps, otherwise repeat this process until you get an AD_Client_ID which starts with a letter.
3- Change the role to the already created one.
4- Create a new organization using the initial org setup
5- Go to General Setup || Enterprise || Organization, display the tree and it will be wrong.
The problem is inside the WindowTree.java file. In the line 58 it is using the WindowTreeData.selectTreeID() method, which returns the list of trees ordered by ad_client_id desc. The returned list includes the 0 tree and the current client's tree.

Then, in line 61, it is taken always the first one, so if the ad_client_id of the current client is less than 0 (i.e. it starts with a letter) the tree's won't be displayed properly
main
related to defect 0007502pi closed alostale WindowTreeData generates incorrectly 
Issue History
2009-02-06 09:55vmromanosNew Issue
2009-02-06 09:55vmromanosAssigned To => rafaroda
2009-02-06 09:55vmromanossf_bug_id0 => 2571749
2009-02-06 09:55vmromanosRegression testing => No
2009-02-10 11:06psarobePrioritynormal => urgent
2009-02-10 11:08psarobeAssigned Torafaroda => alostale
2009-02-10 11:08psarobePriorityurgent => immediate
2009-02-10 11:08psarobeSeveritymajor => critical
2009-02-10 11:08psarobeStatusnew => scheduled
2009-02-10 11:08psarobeCategory01. General setup => A. Platform
2009-02-10 18:15svnbotCheckin
2009-02-10 18:15svnbotNote Added: 0013328
2009-02-10 18:15svnbotStatusscheduled => resolved
2009-02-10 18:15svnbotResolutionopen => fixed
2009-02-10 18:15svnbotsvn_revision => 13031
2009-02-11 08:40svnbotCheckin
2009-02-11 08:40svnbotNote Added: 0013335
2009-02-11 08:40svnbotsvn_revision13031 => 13038
2009-02-11 14:48rafarodaRelationship addedrelated to 0007502
2009-04-22 11:24psarobeTag Attached: main
2009-04-23 18:11psarobeStatusresolved => closed

Notes
(0013328)
svnbot   
2009-02-10 18:15   
Repository: openbravo
Revision: 13031
Author: alostale
Date: 2009-02-10 18:15:32 +0100 (Tue, 10 Feb 2009)

fixed bug 0007407: Organization's tree works randomly

---
U trunk/src/org/openbravo/erpCommon/utility/WindowTree_data.xsql
---

https://dev.openbravo.com/websvn/openbravo/?rev=13031&sc=1 [^]
(0013335)
svnbot   
2009-02-11 08:40   
Repository: openbravo
Revision: 13038
Author: alostale
Date: 2009-02-11 08:40:02 +0100 (Wed, 11 Feb 2009)

fixed bug 0007407: Organization's tree works randomly, fixed query for PG syntax

---
U trunk/src/org/openbravo/erpCommon/utility/WindowTree_data.xsql
---

https://dev.openbravo.com/websvn/openbravo/?rev=13038&sc=1 [^]