Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033717Openbravo ERP09. Financial managementpublic2016-08-11 13:082016-08-26 13:34
ngarcia 
rqueralta 
urgentmajoralways
closedfixed 
5
 
3.0PR16Q2.23.0PR16Q2.2 
aferraz
Core
Production - Confirmed Stable
2016-01-25
3.0PR16Q2
https://code.openbravo.com/erp/devel/pi/rev/7dafd0844a3d [^]
No
0033717: 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.
blocks defect 0033688 closed rqueralta Cannot post a financial account transaction if the invoice is partially paid by using credit 
Issue History
2016-08-15 15:04rqueraltaTypedefect => backport
2016-08-15 15:04rqueraltaTarget Version => 3.0PR16Q2.2
2016-08-16 13:48aferrazNote Added: 0089137
2016-08-16 13:48aferrazStatusscheduled => resolved
2016-08-16 13:48aferrazFixed in Version => 3.0PR16Q2.2
2016-08-16 13:48aferrazFixed in SCM revision => b3ad8a086610
2016-08-16 13:48aferrazResolutionopen => fixed
2016-08-16 13:49aferrazFixed in SCM revisionb3ad8a086610 => https://code.openbravo.com/erp/backports/3.0PR16Q2.2/rev/b3ad8a086610 [^]
2016-08-16 13:49aferrazReview Assigned To => aferraz
2016-08-16 13:49aferrazNote Added: 0089138
2016-08-16 13:49aferrazStatusresolved => closed
2016-08-26 13:20hgbotCheckin
2016-08-26 13:20hgbotNote Added: 0089454
2016-08-26 13:20hgbotStatusclosed => resolved
2016-08-26 13:20hgbotFixed in SCM revisionhttps://code.openbravo.com/erp/backports/3.0PR16Q2.2/rev/b3ad8a086610 [^] => http://code.openbravo.com/erp/devel/pi/rev/b3ad8a0866100ea119aeeff5a7c1b4ba1c5cf410 [^]
2016-08-26 13:34priyamNote Added: 0089458
2016-08-26 13:34priyamStatusresolved => closed

Notes
(0089137)
aferraz   
2016-08-16 13:48   
Repository: erp/backports/3.0PR16Q2.2
Changeset: b3ad8a086610
Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu>
Date: Tue Aug 16 12:42:05 2016 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR16Q2.2/rev/b3ad8a086610 [^]

Fixes issue 33717: 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
(0089138)
aferraz   
2016-08-16 13:49   
Code review + Testing OK
(0089454)
hgbot   
2016-08-26 13:20   
Repository: erp/devel/pi
Changeset: b3ad8a0866100ea119aeeff5a7c1b4ba1c5cf410
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/b3ad8a0866100ea119aeeff5a7c1b4ba1c5cf410 [^]

Fixes issue 33717: 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
---
(0089458)
priyam   
2016-08-26 13:34   
Issues updated as int-promote updated pi with the tag changes of release 16Q2.2 before we merge the tag from main to pi. So the code hg-to-issues plugin updated the issues.

So closing the issue again