Openbravo Issue Tracking System - Modules
View Issue Details
0016001ModulesAdvanced Paymentspublic2011-02-17 22:482014-04-01 21:48
malsasua 
eduardo_Argal 
urgentmajoralways
closedfixed 
5
 
 
0016001: error in add payment process when there are more than 1000 financial accounts
if there are more than 1000 financial accounts, when you run the process add payment in Sales invoice window, error is returned:
ORA-01795: el número máximo de expresiones en una lista es 1000
the error is reproducible in ORACLE database. In postgres it works fine
. ORACLE DATABASE

. create 1000 financial accounts with payment method "p1"
Financial Management || Receivables & Payables || Transactions || Financial Account || Account

. create new sales invoice with payment method "p1"
Sales Management || Transactions || Sales Invoice || Header
. process invoice
. run add payment

error is returned

the hibernate log is
DEBUG org.hibernate.SQL - select this_.Fin_Financial_Account_ID as Fin1_697_0_, this_.AD_Client_ID as AD2_697_0_, this_.AD_Org_ID as AD3_697_0_, this_.Created as Created697_0_, this_.Createdby as Createdby697_0_, this_.Updated as Updated697_0_, this_.Updatedby as Updatedby697_0_, this_.Isactive as Isactive697_0_, this_.C_Currency_ID as C9_697_0_, this_.Name as Name697_0_, this_.Description as Descrip11_697_0_, this_.Type as Type697_0_, this_.C_Bpartner_ID as C13_697_0_, this_.C_Location_ID as C14_697_0_, this_.Routingno as Routingno697_0_, this_.Swiftcode as Swiftcode697_0_, this_.Codebank as Codebank697_0_, this_.Codebranch as Codebranch697_0_, this_.Bank_Digitcontrol as Bank19_697_0_, this_.INE_Number as INE20_697_0_, this_.Account_Digitcontrol as Account21_697_0_, this_.Codeaccount as Codeacc22_697_0_, this_.Accountno as Accountno697_0_, this_.Currentbalance as Current24_697_0_, this_.InitialBalance as Initial25_697_0_, this_.Creditlimit as Creditl26_697_0_, this_.Iban as Iban697_0_, this_.Isdefault as Isdefault697_0_, this_.FIN_Matching_Algorithm_ID as FIN29_697_0_ from FIN_Financial_Account this_ where this_.AD_Org_ID in (?, ?, ?) and this_.C_Currency_ID=? and this_.Fin_Financial_Account_ID in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,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?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and this_.AD_Client_ID in (?, ?) and this_.Isactive=?

No tags attached.
related to defect 0017616 new mirurita Modules error in add payment process when there are more than 1000 financial accounts 
related to defect 00208583.0MP13 closed ioritzCia Openbravo ERP Error "maximum number of expressions in a list is 1000" in getFilteredPaymentMethods method 
Issue History
2011-02-17 22:48malsasuaNew Issue
2011-02-17 22:48malsasuaAssigned To => adrianromero
2011-02-17 23:24malsasuaPrioritynormal => urgent
2011-02-18 16:36adrianromeroNote Added: 0034275
2011-02-21 14:15hgbotCheckin
2011-02-21 14:15hgbotNote Added: 0034281
2011-02-21 14:15hgbotStatusnew => resolved
2011-02-21 14:15hgbotResolutionopen => fixed
2011-02-21 14:15hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.advpaymentmngt/rev/29f5f3730ea8f3eb5a68df60d4281a9e59d7511f [^]
2011-02-21 17:00hgbotCheckin
2011-02-21 17:00hgbotNote Added: 0034286
2011-02-21 17:00hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.advpaymentmngt/rev/29f5f3730ea8f3eb5a68df60d4281a9e59d7511f [^] => http://code.openbravo.com/erp/devel/pi/rev/80a7075c77845a9ae8d9b20bcbce4eaf6af9769c [^]
2011-06-03 10:58dalsasuaAssigned Toadrianromero => dalsasua
2011-06-13 12:25malsasuaRelationship addedrelated to 0017616
2011-06-28 10:43dalsasuaAssigned Todalsasua => eduardo_Argal
2012-06-25 17:16maiteRelationship addedrelated to 0020858
2014-04-01 21:48plujanNote Added: 0065767
2014-04-01 21:48plujanStatusresolved => closed

Notes
(0034275)
adrianromero   
2011-02-18 16:36   
The problem is in the following method that builds the SQL sentence that fails:

https://code.openbravo.com/erp/devel/pi/file/ea2c952a026e/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java#l924 [^]
(0034281)
hgbot   
2011-02-21 14:15   
Repository: erp/pmods/org.openbravo.advpaymentmngt
Changeset: 29f5f3730ea8f3eb5a68df60d4281a9e59d7511f
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon Feb 21 14:15:11 2011 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.advpaymentmngt/rev/29f5f3730ea8f3eb5a68df60d4281a9e59d7511f [^]

Fixes issue 0016001: error in add payment process when there are more than 1000 financial accounts
It has been splitted the long IN expresion in several IN expressions joined by OR to not go over 1000 values inside the IN expression

---
M src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java
---
(0034286)
hgbot   
2011-02-21 17:00   
Repository: erp/devel/pi
Changeset: 80a7075c77845a9ae8d9b20bcbce4eaf6af9769c
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon Feb 21 16:59:34 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/80a7075c77845a9ae8d9b20bcbce4eaf6af9769c [^]

Fixes issue 0016001: error in add payment process when there are more than 1000 financial accounts
It has been splitted the long IN expresion in several IN expressions joined by OR to not go over 1000 values inside the IN expression

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java
---
(0065767)
plujan   
2014-04-01 21:48   
Marked as Closed since it was in Resolved for too long