Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0014954Openbravo ERP09. Financial managementpublic2010-10-21 12:252010-12-20 13:10
adrianromero 
adrianromero 
urgentmajoralways
closedfixed 
5
2.40MP12 
2.40MP13 
OBPS
Core
No
0014954: Error when modifying element value which is referenced from more than one accounting combination, in Oracle
Error when modifying element value which is referenced from more than one accounting combination, in Oracle
1. Financial Management || Accounting || Setup || Account Combination || Combination : create record with details
Alias=%
Organization=B
Account=435
2. Navigate to Account 435 and try to modify it, for example, dis-active it.
You will obtain the following error message:
      
The search gives back more than one row.You may check the data

Error is given by C_ELEMENTVALUE_TRG because when trying to execute this clause:

SELECT name INTO v_orgName FROM ad_org WHERE ad_org_id in (SELECT ad_org_id FROM c_validcombination WHERE account_id=:new.C_ElementValue_ID);

when it returns more than one organization.
No tags attached.
blocks defect 00148492.40MP13 closed adrianromero Error when modifying element value which is referenced from more than one accounting combination, in Oracle 
Issue History
2010-10-21 12:25adrianromeroNew Issue
2010-10-21 12:25adrianromeroAssigned To => adrianromero
2010-10-21 12:25adrianromeroOBNetwork customer => Yes
2010-10-21 12:25adrianromeroIssue generated from0014849
2010-10-21 12:25adrianromeroRelationship addeddepends on 0014849
2010-10-21 12:25adrianromeroRelationship replacedblocks 0014849
2010-11-10 11:13hgbotCheckin
2010-11-10 11:13hgbotNote Added: 0032531
2010-11-10 11:13hgbotStatusnew => resolved
2010-11-10 11:13hgbotResolutionopen => fixed
2010-11-10 11:13hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.40/rev/28634d6fbafa5ea339a5504b85742408bc19f2d6 [^]
2010-11-10 11:17adrianromeroNote Added: 0032533
2010-12-20 13:10psarobeNote Added: 0033288
2010-12-20 13:10psarobeStatusresolved => closed

Notes
(0032531)
hgbot   
2010-11-10 11:13   
Repository: erp/stable/2.40
Changeset: 28634d6fbafa5ea339a5504b85742408bc19f2d6
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Wed Nov 10 11:12:04 2010 +0100
URL: http://code.openbravo.com/erp/stable/2.40/rev/28634d6fbafa5ea339a5504b85742408bc19f2d6 [^]

Fixes issue 0014954: Error when modifying element value which is referenced from more than one accounting combination, in Oracle
It has been modified the sentence that updates the C_VALIDCOMBINATION table in the trigger of the table C_ELEMENTVALUE to not to throw a mutating tables error

---
M src-db/database/model/triggers/C_ELEMENTVALUE_TRG.xml
---
(0032533)
adrianromero   
2010-11-10 11:17   
* Testing the issue

** Follow the steps to test and verify that any error is thrown.
** Verify also that it is possible to modify the Element record modifying other fields in the window and that also if only account combination is related to the Element modified.
** Check this issue in both database engines Postgres and Oracle.

* Other areas affected

** It only has been modified the sentence that updates account combinations in trigger of table Element values. So the only windows affected are: Element Values and Account Combinations.
(0033288)
psarobe   
2010-12-20 13:10   
Tested working fine in Oracle and postgres