Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033688Openbravo ERP09. Financial managementpublic2016-08-11 13:082018-06-15 12:27
ngarcia 
rqueralta 
urgentmajoralways
closedfixed 
5
 
3.0PR16Q4 
aferraz
Core
Production - Confirmed Stable
2016-01-25
3.0PR16Q2
https://code.openbravo.com/erp/devel/pi/rev/7dafd0844a3d [^]
No
0033688: Cannot post a financial account transaction if the invoice is partially paid by using credit
Cannot post a financial account transaction if the invoice is partially paid by using credit
As group admin role:
   Check Transferencia payment method is configured to post only financial account transactions (Financial Account - Payment Method - Upon Deposit Use)
   Create a Payment In of 408.20 EUR for Hoteles Buenas Noches, S.A. and leave the amount to be used later (customer credit)
   Create a Sales Invoice with a total gross amount of 3.38 EUR. Do not use credit
   Create a new Payment In of 1.38 EUR for Hoteles Buenas Noches, S.A. and paid the previously created invoice completely. Use 2 EUR from the available credit
   Navigate to the financial account transaction created and try to post it
   "Process failed during execution" error message is raised and the log shows:
      ERROR org.hibernate.LazyInitializationException - failed to lazily initialize a collection of role: FIN_Payment.fINPaymentCreditList, no session or session was closed
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: FIN_Payment.fINPaymentCreditList, no session or session was closed
    at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:383)
    at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:375)
    at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:368)
    at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:111)
    at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:272)
    at org.openbravo.erpCommon.ad_forms.DocFINFinAccTransaction.createFactPaymentDetails(DocFINFinAccTransaction.java:647)
    at org.openbravo.erpCommon.ad_forms.DocFINFinAccTransaction.createFact(DocFINFinAccTransaction.java:461)
    at org.openbravo.erpCommon.ad_forms.AcctServer.postLogic(AcctServer.java:1110)
    at org.openbravo.erpCommon.ad_forms.AcctServer.post(AcctServer.java:803)
No tags attached.
related to defect 0033508 closed markmm82 Cannot post a Cash VAT payment that pays more than one invoice, Process failed during execution error is shown 
related to defect 0032203 closed vmromanos Not possible to post a remittance as well as the settlement of that remittance. 
depends on backport 00337163.0PR16Q3.1 closed rqueralta Cannot post a financial account transaction if the invoice is partially paid by using credit 
depends on backport 00337173.0PR16Q2.2 closed rqueralta Cannot post a financial account transaction if the invoice is partially paid by using credit 
caused by defect 0031580 closed vmromanos Java Heap Space error when posting payment with huge amount of details 
Issue History
2016-08-11 13:08ngarciaNew Issue
2016-08-11 13:08ngarciaAssigned To => Triage Finance
2016-08-11 13:08ngarciaModules => Core
2016-08-11 13:08ngarciaResolution time => 1472680800
2016-08-11 13:08ngarciaTriggers an Emergency Pack => No
2016-08-11 13:08ngarciaIssue Monitored: networkb
2016-08-12 10:48aferrazRelationship addedrelated to 0033508
2016-08-12 11:41aferrazRelationship addedcaused by 0031580
2016-08-12 11:42aferrazRegression level => Production - Confirmed Stable
2016-08-12 11:42aferrazRegression date => 2016-01-25
2016-08-12 11:42aferrazRegression introduced in release => 3.0PR16Q2
2016-08-12 11:42aferrazRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/7dafd0844a3d [^]
2016-08-12 11:42aferrazRelationship addedrelated to 0032203
2016-08-12 14:34aferrazAssigned ToTriage Finance => rqueralta
2016-08-15 15:04rqueraltaStatusnew => scheduled
2016-08-16 12:47hgbotCheckin
2016-08-16 12:47hgbotNote Added: 0089133
2016-08-16 12:47hgbotStatusscheduled => resolved
2016-08-16 12:47hgbotResolutionopen => fixed
2016-08-16 12:47hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0be06d363c58270676e994b1389942f6f7ae71c7 [^]
2016-08-16 13:07aferrazReview Assigned To => aferraz
2016-08-16 13:07aferrazNote Added: 0089135
2016-08-16 13:07aferrazStatusresolved => closed
2016-08-16 13:07aferrazFixed in Version => 3.0PR16Q4
2016-08-16 17:35hudsonbotCheckin
2016-08-16 17:35hudsonbotNote Added: 0089148
2016-10-07 20:44rqueraltaNote Added: 0090506
2018-02-22 17:22hgbotCheckin
2018-02-22 17:22hgbotNote Added: 0102610
2018-06-06 12:39hgbotCheckin
2018-06-06 12:39hgbotNote Added: 0104976
2018-06-06 12:39hgbotStatusclosed => resolved
2018-06-06 12:39hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/0be06d363c58270676e994b1389942f6f7ae71c7 [^] => http://code.openbravo.com/tools/automation/int/rev/8e3e41c7babe13957cd4a8f34acd7bd13e0526ba [^]
2018-06-15 12:27aferrazStatusresolved => closed

Notes
(0089133)
hgbot   
2016-08-16 12:47   
Repository: erp/devel/pi
Changeset: 0be06d363c58270676e994b1389942f6f7ae71c7
Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu>
Date: Tue Aug 16 12:42:05 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0be06d363c58270676e994b1389942f6f7ae71c7 [^]

Fixes issue 33688: Error when posting a financial account transaction

Avoid laizy initialization error by reloading transaction object from database after clearing the session.
Session clearing will not be done in first iteration but starting from iteration number 100. This doesn't solve clear session problem but will raise it only when we iterate at least 100 times.

---
M src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
M src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java
---
(0089135)
aferraz   
2016-08-16 13:07   
Code review + Testing OK
(0089148)
hudsonbot   
2016-08-16 17:35   
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/e5ecc0ed32a1 [^]
Maturity status: Test
(0090506)
rqueralta   
2016-10-07 20:44   
Test Cases in Test Link

Url: https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-10202 [^]
Url: https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-10203 [^]
(0102610)
hgbot   
2018-02-22 17:22   
Repository: tools/automation/int
Changeset: b34162367026c040d780569b08075d5e4fe51a03
Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu>
Date: Tue Oct 25 07:27:51 2016 -0400
URL: http://code.openbravo.com/tools/automation/int/rev/b34162367026c040d780569b08075d5e4fe51a03 [^]

Related to issue 33688: Added some automated tests

---
M src-test/com/openbravo/test/integration/erp/gui/financial/receivablespayables/transactions/AddPaymentProcess.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRIn_Regressions/APRIn_RegressionSuite.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRIn_Regressions/build.xml
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APROut_Regressions/APROut_RegressionSuite.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APROut_Regressions/build.xml
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRIn_Regressions/APRRegression33688In.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APROut_Regressions/APRRegression33688Out.java
---
(0104976)
hgbot   
2018-06-06 12:39   
Repository: tools/automation/int
Changeset: 8e3e41c7babe13957cd4a8f34acd7bd13e0526ba
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Wed May 02 10:07:14 2018 -0400
URL: http://code.openbravo.com/tools/automation/int/rev/8e3e41c7babe13957cd4a8f34acd7bd13e0526ba [^]

Fixes 33688 test execution

When the tests for issue 33688 are executed without an install.source a wrong
transaccion is selected for posting process causing the test fail.

An extra filter for the payment document number was added to properly select
the transaction for posting process.

---
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRIn_Regressions4/APRRegression33688In.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APROut_Regressions5/APROut_RegressionSuite5.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APROut_Regressions5/APRRegression33688Out.java
---