Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013234Openbravo ERP09. Financial managementpublic2010-05-05 17:532010-05-18 21:44
networkb 
sathiyan 
immediatemajoralways
closedfixed 
5
pi 
2.50MP17 
Core
No
0013234: Uncorrect Account Schema when creating a new Accounting Combination
A GL Journal is being created.

When a new line is created, the accounting combination is opened using ENTER key.
If account combinatio, also is opened with ENTER key, other accounting combination is shown (instead of the one selected in Header tab)
Create a new organization.
To do this, go to General Setup > Enterprise > Initial Organization Setup.
Enter a name and user, and as type, select "legal with accounting", as parent organization, select '*', select "Include Accounting", and select one COA from datasets (if there is no data select, use a CSV from sourceforge)
Also, select BP, Product and Project dimensions.
Press OK.
Go to General Setup > Enterprise > Organization, and search the new one.
Check "Allow period control" and select a calendar.
Finally, press "Set as ready".
Go to Financial Management > Accounting > Transactions > GL Journal.
Create a new record for new organization.
Go to Header tab.
Create a new record for new organization, and select its Accounting Schema.
Go to Lines tab, and create a new record.
Press ENTER key, and accounting combination selector will be opened.
Select the new organization in Organization combo.
Navigate to Account selector, and press ENTER to open it.
See its Accounting Schema.
It is not correct.
No tags attached.
Issue History
2010-05-05 17:53networkbNew Issue
2010-05-05 17:53networkbAssigned To => dalsasua
2010-05-05 18:46adrianromeroStatusnew => scheduled
2010-05-05 18:46adrianromerofix_in_branch => pi
2010-05-11 10:59networkbPriorityurgent => immediate
2010-05-11 10:59networkbfix_in_branchpi =>
2010-05-11 18:19jpabloaeTarget Version2.50MP16 => 2.50MP17
2010-05-12 08:36sathiyanAssigned Todalsasua => sathiyan
2010-05-12 18:19networkbNote Added: 0027178
2010-05-13 19:25hgbotCheckin
2010-05-13 19:25hgbotNote Added: 0027212
2010-05-13 19:25hgbotStatusscheduled => resolved
2010-05-13 19:25hgbotResolutionopen => fixed
2010-05-13 19:25hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b5d2077a283e292f2d150219aeb7d70eaaeed4e4 [^]
2010-05-14 12:06networkbNote Added: 0027233
2010-05-14 12:06networkbStatusresolved => new
2010-05-14 12:06networkbResolutionfixed => open
2010-05-14 13:06hgbotCheckin
2010-05-14 13:06hgbotNote Added: 0027247
2010-05-14 13:06hgbotStatusnew => resolved
2010-05-14 13:06hgbotResolutionopen => fixed
2010-05-14 13:06hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/b5d2077a283e292f2d150219aeb7d70eaaeed4e4 [^] => http://code.openbravo.com/erp/devel/pi/rev/fd94cff939bd651828433d06ead6486c296b7de2 [^]
2010-05-17 10:49arunkumarNote Added: 0027355
2010-05-17 10:49arunkumarStatusresolved => closed
2010-05-18 00:01anonymoussf_bug_id0 => 3002963
2010-05-18 21:44hudsonbotCheckin
2010-05-18 21:44hudsonbotNote Added: 0027522
2010-05-18 21:44hudsonbotCheckin
2010-05-18 21:44hudsonbotNote Added: 0027529

Notes
(0027178)
networkb   
2010-05-12 18:19   
I think that the problem is in the way the account combination element and the account selectors manage the account schema session variable, when the KEY command is sent (when you press the ENTER in both selectors). Now, the code that obtain the value of account schema stored in session is:

src/org/openbravo/erpCommon/info/Account.java:
      String strAcctSchema = vars
          .getRequestGlobalVariable("inpAcctSchema", "Account.cAcctschemaId");
      if (strAcctSchema.equals("")) {
        strAcctSchema = Utility.getContext(this, vars, "$C_AcctSchema_ID", "Account");
        vars.setSessionValue("Account.cAcctschemaId", strAcctSchema);
      }

and i think that the java should obtain the account schema stored in session with this code:

String strWindowId = vars.getStringParameter("WindowID");
      String strAcctSchema = vars.getSessionValue(strWindowId + "|C_AcctSchema_ID");
      if (strAcctSchema.equals("")) {
        strAcctSchema = vars.getRequestGlobalVariable("inpAcctSchema", "Account.cAcctschemaId");
      }
      if (strAcctSchema.equals("")) {
        strAcctSchema = Utility.getContext(this, vars, "$C_AcctSchema_ID", "Account");
        vars.setSessionValue("Account.cAcctschemaId", strAcctSchema);
      } else
        vars.setSessionValue("$C_AcctSchema_ID", strAcctSchema);

The same in src/org/openbravo/erpCommon/info/AccountElementValue.java. What do you think? Please check this solution.
(0027212)
hgbot   
2010-05-13 19:25   
Repository: erp/devel/pi
Changeset: b5d2077a283e292f2d150219aeb7d70eaaeed4e4
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Thu May 13 22:54:25 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/b5d2077a283e292f2d150219aeb7d70eaaeed4e4 [^]

Fixes issue 13234: Uncorrect Account Schema in combination

---
M src-db/database/sourcedata/AD_COLUMN.xml
---
(0027233)
networkb   
2010-05-14 12:06   
I have tested the fix in pi and it does not work. Please check the solution.
(0027247)
hgbot   
2010-05-14 13:06   
Repository: erp/devel/pi
Changeset: fd94cff939bd651828433d06ead6486c296b7de2
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Fri May 14 16:15:57 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/fd94cff939bd651828433d06ead6486c296b7de2 [^]

Fixes issue 13234: Uncorrect Account Schema

---
M src/org/openbravo/erpCommon/info/Account.java
---
(0027355)
arunkumar   
2010-05-17 10:49   
Tested working fine
(0027522)
hudsonbot   
2010-05-18 21:44   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/b5d2077a283e [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/aa11838d5f80 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17380.obx [^]
(0027529)
hudsonbot   
2010-05-18 21:44   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/fd94cff939bd [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/aa11838d5f80 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17380.obx [^]