Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031470Openbravo ERP09. Financial managementpublic2015-11-13 14:152015-12-21 20:21
ngarcia 
aferraz 
urgentmajoralways
closedfixed 
5
 
 
vmromanos
Core
No
0031470: UniqueValidCombination modulescript is deactivating some account combinations and creating new ones when it should not
UniqueValidCombination modulescript is deactivating some account combinations and creating new ones when it should not

- The problem is reproducible until 3.0PR15Q3.3 version, whenever an update.database is done
- It is only reproducible after 3.0PR15Q4 version if the upgrade is done from MP19 or a previous version due to the solution of the 30396 bug
As group admin Role (in a version previous to 3.0PR15Q4):
   Create a record in the General Ledger Configuration
   Add the Account type dimension to it and select an account tree already used in another General Ledger (F&B EspaƱa, S.A. Account Account)
   Check a new account combination has been created for each element value in the tree but with the new General Ledger. This is correct
   Now deactivate all the accounting combinations related with the same Account (10000 - Capital social)

* Launch the ant smartbuild -Dlocal=no command and restart Tomcat

As group admin role:
   Check that for one of the general ledgers the account combination has been set as inactive and a new one has been created
The selectDuplicates and updateValidCombinationDeactivateDuplicated functions in the UniqueValidCombination_data.xsql should group by c_acctschema_id
No tags attached.
related to feature request 00303963.0PR15Q4 closed aferraz Review modulescripts performance 
depends on backport 00317383.0PR15Q4.2 closed aferraz UniqueValidCombination modulescript is deactivating some account combinations and creating new ones when it should not 
depends on backport 00317393.0PR15Q3.5 closed aferraz UniqueValidCombination modulescript is deactivating some account combinations and creating new ones when it should not 
Issue History
2015-11-13 14:15ngarciaNew Issue
2015-11-13 14:15ngarciaAssigned To => Triage Finance
2015-11-13 14:15ngarciaModules => Core
2015-11-13 14:15ngarciaResolution time => 1450998000
2015-11-13 14:15ngarciaTriggers an Emergency Pack => No
2015-11-13 14:16ngarciaIssue Monitored: networkb
2015-11-13 14:30ngarciaRelationship addedrelated to 0030396
2015-11-13 14:32ngarciaSummaryUniqueValidCombination modulescript is deactivating some account combinations when it should not => UniqueValidCombination modulescript is deactivating some account combinations and creating new ones when it should not
2015-11-13 14:32ngarciaDescription Updatedbug_revision_view_page.php?rev_id=10239#r10239
2015-11-16 10:11vmromanosNote Added: 0081864
2015-12-01 13:44aferrazAssigned ToTriage Finance => aferraz
2015-12-01 13:44aferrazStatusnew => scheduled
2015-12-10 14:27vmromanosReview Assigned To => vmromanos
2015-12-10 14:27vmromanosNote Added: 0082641
2015-12-10 14:27vmromanosStatusscheduled => closed
2015-12-10 14:27vmromanosResolutionopen => invalid
2015-12-16 17:25ngarciaStatusclosed => new
2015-12-16 17:25ngarciaResolutioninvalid => open
2015-12-16 17:43vmromanosStatusnew => scheduled
2015-12-17 15:59hgbotCheckin
2015-12-17 15:59hgbotNote Added: 0082835
2015-12-17 15:59hgbotStatusscheduled => resolved
2015-12-17 15:59hgbotResolutionopen => fixed
2015-12-17 15:59hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f7c45b01fda46aeba94568cb8ed151e5438d8157 [^]
2015-12-17 16:01vmromanosNote Added: 0082841
2015-12-17 16:01vmromanosStatusresolved => closed
2015-12-21 20:21hudsonbotCheckin
2015-12-21 20:21hudsonbotNote Added: 0082911

Notes
(0081864)
vmromanos   
2015-11-16 10:11   
Since this bug creates wrong data, we should be backporting it to Q3 and Q4
(0082641)
vmromanos   
2015-12-10 14:27   
Rejected as invalid. The module script is working as expected.


Reason, the module script is designed to:

1. Deactivate valid combinations which use other dimensions than organization and account (not related to the reported bug)

2. Ensure every subaccount has a valid combination related in each accounting schema (related to the reported bug).

The steps to reproduce forces to deactivate all the valid combinations associated to a subaccount element value (10000 - capital social). When the module script is executed, it detects that there is no valid combination for any of the GL, so it creates 2 new ones (one for each GL). So at the end we have 2 combinations not active (the ones deactivated by the user), and 2 new valid combinations created automatically by the module script to ensure every subaccount has a valid combination related in each accounting schema, which is the expected behavior.
(0082835)
hgbot   
2015-12-17 15:59   
Repository: erp/devel/pi
Changeset: f7c45b01fda46aeba94568cb8ed151e5438d8157
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Dec 01 18:20:18 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/f7c45b01fda46aeba94568cb8ed151e5438d8157 [^]

Fixes issue 31470: UniqueValidCombination modulescript is deactivating accounts

Add group by c_acctschema_id in selectDuplicates and updateValidCombinationDeactivateDuplicated queries in UniqueValidCombination modulescript.

---
M src-util/modulescript/build/classes/org/openbravo/modulescript/UniqueValidCombinationData.class
M src-util/modulescript/src/org/openbravo/modulescript/UniqueValidCombination_data.xsql
---
(0082841)
vmromanos   
2015-12-17 16:01   
Code review + testing (Oracle & Postgres) OK
(0082911)
hudsonbot   
2015-12-21 20:21   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/1874af35afc7 [^]
Maturity status: Test