Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020294Openbravo ERP09. Financial managementpublic2012-04-17 20:452015-05-13 17:08
vmromanos 
Triage Omni OMS 
normalmajoralways
scheduledopen 
20Debian 5.0
 
 
Core
No
0020294: Updating Organization in Accounting Schema window
When updating the Organization in the header of the Accounting Schema window, this change is not propagated to the window tabs creating wrong data in the database.

Example:
1. Run an Initial Org setup. Create org A with accounting
2. Run an Initial Org setup. Create org B with accounting
3. Go to Accounting Schema window.
4. Select A acct. schema and change its organization to B
5. See records in Accounting Schema Tables tab belong to A. (you should query the database, or display the organization field for this tab in the Application Dictionary)
1. Run an Initial Org setup. Create org A with accounting
2. Run an Initial Org setup. Create org B with accounting
3. Go to Accounting Schema window.
4. Select A acct. schema and change its organization to B
5. See records in Accounting Schema Tables tab belong to A. (you should query the database, or display the organization field for this tab in the Application Dictionary)
Two possible solutions to be discussed:
1. Don't allow to modify organization field in the header
2. Propagate the change to the rest of the tabs in that window. Check whether this acct. schema is already use in the Org. Schema tab (Organization window) and this change makes sense for that configuration
MIR-Reviewed
related to defect 0020254 closed eduardo_Argal Multi accounting schema is not working properly in some circunstances 
diff bug_20294.diff (40,252) 2015-05-13 17:08
https://issues.openbravo.com/file_download.php?file_id=8081&type=bug
Issue History
2012-04-17 20:45vmromanosNew Issue
2012-04-17 20:45vmromanosAssigned To => vmromanos
2012-04-17 20:45vmromanosModules => Core
2012-04-17 20:45vmromanosRelationship addedrelated to 0020254
2012-04-19 18:43miruritaTag Attached: MIR-Reviewed
2012-05-10 12:12gorka_gilAssigned Tovmromanos => mirurita
2012-05-22 17:25naiaramartinezAssigned Tomirurita => naiaramartinez
2012-05-22 17:26naiaramartinezStatusnew => scheduled
2012-05-22 17:26naiaramartinezfix_in_branch => pi
2012-05-23 17:47naiaramartinezNote Added: 0048891
2015-05-13 16:58naiaramartinezAssigned Tonaiaramartinez => Triage Finance
2015-05-13 17:07naiaramartinezNote Added: 0077403
2015-05-13 17:08naiaramartinezFile Added: bug_20294.diff

Notes
(0048891)
naiaramartinez   
2012-05-23 17:47   
Go to Accounting Schema window. Select one record.
Go to all its child's tab. Create new record. Notice that you can't see/modify organization field. By default selected organization is parent organization, so child always have parent's organization.

Test Plan (build validation)
   
    Before applying the fix you need to have incorrect records in 'Account Schema Element', 'Account Schema Tables', 'Process', 'General Ledger' and 'Defaults' tabs. Those tabs are child tabs of Accounting Schema.
    So, go to database and insert an incorrect record in C_AcctSchema_Table, C_AcctSchema_Table_DocType, C_AcctSchema_Process, C_AcctSchema_GL and C_AcctSchema_Default. You need to insert a diferent organization than its c_AcctSchema's organization.
    Apply the fix.
    Run ant smartbuild -Dlocal=no.
    The compilation should fail (the record that you inserted and two records that were incorrect for QA client).
    Go to application as client admin role.
    Browse to the wrong records. You need to correct those incorrect record in the database (because in the application you can't modify the organization).
    After correcting them, run ant smartbuild -Dlocal=no again.
    The complication should go fine.
(0077403)
naiaramartinez   
2015-05-13 17:07   
I attach a solution made in 2012, but I don't know if it still will work or not.
The main problem here, is that Openbravo allows you to have headers with one organization and children with different organization. For example:
  * Go to 'General Ledger Configuration' (this window is the same as Account schema. The window was renamed)
  * create a record with 'Region norte' organization
  * Go to 'dimension' tab and create one record
  * Go to header again, and modify organization to 'Region Sur'.
  * Do a select in the bbdd, and notice that the organzation of the record created in dimesion tab, is still 'Region Norte'