Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040964Openbravo ERP09. Financial managementpublic2019-05-28 17:192019-12-13 08:19
ngarcia 
nonofrancisco 
urgentmajoralways
closedfixed 
5
 
3.0PR19Q3 
Sandrahuguet
Core
Production - Confirmed Stable
2017-10-10
3.0PR18Q1
https://code.openbravo.com/erp/devel/pi/rev/9cf1f8c7de280894eb268e310a732b3e61cd128d [^]
No
0040964: Cannot open Payment Execution form if there are more than 1000 payment methods
Cannot open Payment Execution form if there are more than 1000 payment methods
Log in with 'The White Valley Group Admin' role
Open the Payment Execution window
Check the following error is shown:
   "org.hibernate.exception.SQLGrammarException: could not execute query"
The log shows:
   
ERROR org.openbravo.advpaymentmngt.ad_forms.BatchPaymentExecution - Error captured:
org.hibernate.exception.SQLGrammarException: could not extract ResultSet
...
    at org.openbravo.dal.service.OBCriteria.list(OBCriteria.java:103) ~[OBCriteria.class:?]
    at org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao.getFilteredPaymentMethods(AdvPaymentMngtDao.java:874) ~[AdvPaymentMngtDao.class:?]
    at org.openbravo.advpaymentmngt.utility.FIN_Utility.getPaymentMethodList(FIN_Utility.java:505) ~[FIN_Utility.class:?]
    at org.openbravo.advpaymentmngt.ad_forms.BatchPaymentExecution.printPageDataSheet(BatchPaymentExecution.java:205) ~[BatchPaymentExecution.class:?]
    at org.openbravo.advpaymentmngt.ad_forms.BatchPaymentExecution.doPost(BatchPaymentExecution.java:85) ~[BatchPaymentExecution.class:?]
The problem is in the addPaymentMethodList function of AdvPaymentMngtDao class. The following line is leaving the paymentMethods empty

paymentMethods.removeAll(paymentMethodsToRemove);

and the following instruction is not calculating the size correctly:

      paymentMethodsSize = paymentMethodsSize - 999;

so the following condition is included in the query:

or this_.Fin_Paymentmethod_ID in ()
No tags attached.
related to defect 0036747 closed AtulOpenbravo Avoid query more than once in several classes 
depends on backport 00410233.0PR19Q2.1 closed nonofrancisco Cannot open Payment Execution form if there are more than 1000 payment methods 
depends on backport 00410243.0PR19Q1.2 closed nonofrancisco Cannot open Payment Execution form if there are more than 1000 payment methods 
Issue History
2019-05-28 17:19ngarciaNew Issue
2019-05-28 17:19ngarciaAssigned To => Triage Finance
2019-05-28 17:19ngarciaModules => Core
2019-05-28 17:19ngarciaResolution time => 1560808800
2019-05-28 17:19ngarciaTriggers an Emergency Pack => No
2019-05-28 17:20ngarciaRelationship addedrelated to 0036747
2019-05-28 17:20ngarciaIssue Monitored: networkb
2019-05-29 09:25SandrahuguetAssigned ToTriage Finance => nonofrancisco
2019-05-30 17:43nonofranciscoNote Added: 0112279
2019-05-30 18:02nonofranciscoStatusnew => scheduled
2019-06-04 13:24SandrahuguetRegression level => Production - Confirmed Stable
2019-06-04 13:24SandrahuguetRegression date => 2017-10-10
2019-06-04 13:24SandrahuguetRegression introduced in release => 3.0PR18Q1
2019-06-04 13:24SandrahuguetRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/9cf1f8c7de280894eb268e310a732b3e61cd128d [^]
2019-06-04 15:49nonofranciscoStatusscheduled => acknowledged
2019-06-04 15:50nonofranciscoStatusacknowledged => scheduled
2019-06-05 16:44hgbotCheckin
2019-06-05 16:44hgbotNote Added: 0112435
2019-06-05 16:44hgbotStatusscheduled => resolved
2019-06-05 16:44hgbotResolutionopen => fixed
2019-06-05 16:44hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9c31b62de9a269832e9e6050de26df795757f7c2 [^]
2019-06-05 16:44hgbotCheckin
2019-06-05 16:44hgbotNote Added: 0112436
2019-06-05 16:46SandrahuguetReview Assigned To => Sandrahuguet
2019-06-05 16:46SandrahuguetNote Added: 0112439
2019-06-05 16:46SandrahuguetStatusresolved => closed
2019-06-05 16:46SandrahuguetFixed in Version => 3.0PR19Q3
2019-06-06 01:52hudsonbotCheckin
2019-06-06 01:52hudsonbotNote Added: 0112446
2019-06-06 01:52hudsonbotCheckin
2019-06-06 01:52hudsonbotNote Added: 0112447
2019-12-13 08:19SandrahuguetNote Added: 0116295

Notes
(0112279)
nonofrancisco   
2019-05-30 17:43   
Test Plan

Install Retail module

As Openbravo/The White Valley Group Admin

Open the Payment Execution window

Verify the window opens successfully
(0112435)
hgbot   
2019-06-05 16:44   
Repository: erp/devel/pi
Changeset: 9c31b62de9a269832e9e6050de26df795757f7c2
Author: Nono Carballo <nonofce <at> gmail.com>
Date: Thu May 30 11:36:20 2019 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/9c31b62de9a269832e9e6050de26df795757f7c2 [^]

Fixes issue 40964: Fixes getting Filter by Payment Method

Avoids duplicates in list of payment method Id's.
Fixes the way the filter is build when there are more than 1000 payment methods
for filtering

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java
---
(0112436)
hgbot   
2019-06-05 16:44   
Repository: erp/devel/pi
Changeset: 3365dc61940e8ee52c1e7e66096837cd11710bbe
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Wed Jun 05 12:44:16 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3365dc61940e8ee52c1e7e66096837cd11710bbe [^]

related to issue 40964 reimplement the way to split the paymentMethods

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java
---
(0112439)
Sandrahuguet   
2019-06-05 16:46   
code review + testing ok
(0112446)
hudsonbot   
2019-06-06 01:52   
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/b4046817fc0e [^]
Maturity status: Test
(0112447)
hudsonbot   
2019-06-06 01:52   
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/b4046817fc0e [^]
Maturity status: Test
(0116295)
Sandrahuguet   
2019-12-13 08:19   
Test added
https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-11606 [^]