Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033532Openbravo ERP09. Financial managementpublic2016-07-20 12:522016-08-26 13:34
ngarcia 
markmm82 
urgentmajoralways
closedfixed 
5
 
3.0PR16Q2.23.0PR16Q2.2 
aferraz
Core
No
0033532: Cannot post a Cash VAT payment that pays more than one invoice, Process failed during execution error is shown
Cannot post a Cash VAT payment that pays more than one invoice, Process failed during execution error is shown
As system admin role:
   Install the Cash VAT Management module

As group admin role:
   Create a tax rate. Configure its accounting for Cash VAT:
      Tax Due Transitory
      Tax Credit Transitory
   Set it as Cash VAT
   Create three purchase orders, set them as Cash VAT and select the previously created tax rate
   Create three purchase invoices from them
   Create a Payment Out and pay the three invoices
   Try to post the payment out and check the following error message is shown:
      Process failed during execution
   The log shows:
      org.hibernate.LazyInitializationException: could not initialize proxy - no Session
    at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:167)
    at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:215)
    at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190)
    at org.openbravo.model.common.invoice.InvoiceTax_$$_javassist_194.getTax(InvoiceTax_$$_javassist_194.java)
    at org.openbravo.erpCommon.utility.CashVATUtil.createFactCashVAT(CashVATUtil.java:496)
    at org.openbravo.erpCommon.ad_forms.DocFINPayment.createFact(DocFINPayment.java:396)
    at org.openbravo.erpCommon.ad_forms.AcctServer.postLogic(AcctServer.java:1111)
    at org.openbravo.erpCommon.ad_forms.AcctServer.post(AcctServer.java:804)
    at org.openbravo.erpCommon.ad_forms.AcctServer.post(AcctServer.java:720)
    at org.openbravo.erpCommon.ad_actionButton.Posted.processButton(Posted.java:273)
    at org.openbravo.erpCommon.ad_actionButton.Posted.doPost(Posted.java:104)
...
No tags attached.
blocks defect 0033508 closed markmm82 Cannot post a Cash VAT payment that pays more than one invoice, Process failed during execution error is shown 
Issue History
2016-07-22 14:25aferrazTypedefect => backport
2016-07-22 14:25aferrazTarget Version => 3.0PR16Q2.2
2016-08-02 08:59hgbotCheckin
2016-08-02 08:59hgbotNote Added: 0088720
2016-08-02 08:59hgbotStatusscheduled => resolved
2016-08-02 08:59hgbotResolutionopen => fixed
2016-08-02 08:59hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR16Q2.2/rev/21076c6cf953209d840a48c7d37b93276a6f2cd5 [^]
2016-08-02 08:59hgbotCheckin
2016-08-02 08:59hgbotNote Added: 0088721
2016-08-02 09:10aferrazReview Assigned To => aferraz
2016-08-02 09:10aferrazNote Added: 0088723
2016-08-02 09:10aferrazStatusresolved => closed
2016-08-02 09:10aferrazFixed in Version => 3.0PR16Q2.2
2016-08-26 13:19hgbotCheckin
2016-08-26 13:19hgbotNote Added: 0089446
2016-08-26 13:19hgbotStatusclosed => resolved
2016-08-26 13:19hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/backports/3.0PR16Q2.2/rev/21076c6cf953209d840a48c7d37b93276a6f2cd5 [^] => http://code.openbravo.com/erp/devel/pi/rev/21076c6cf953209d840a48c7d37b93276a6f2cd5 [^]
2016-08-26 13:20hgbotCheckin
2016-08-26 13:20hgbotNote Added: 0089447
2016-08-26 13:34priyamNote Added: 0089462
2016-08-26 13:34priyamStatusresolved => closed

Notes
(0088720)
hgbot   
2016-08-02 08:59   
Repository: erp/backports/3.0PR16Q2.2
Changeset: 21076c6cf953209d840a48c7d37b93276a6f2cd5
Author: Mark <markmm82 <at> gmail.com>
Date: Tue Jul 26 14:43:28 2016 -0400
URL: http://code.openbravo.com/erp/backports/3.0PR16Q2.2/rev/21076c6cf953209d840a48c7d37b93276a6f2cd5 [^]

Fixes issue 33532: Error posting Cash VAT payment if pays more than one invoice

When trying to post a Cash VAT payment that pays more than one invoice, process was failing and an error was shown. It was caused by a clearing of the session when iterating on the cash vat invoices list. To avoid it, list of cash vat ids are retrieved instead a list of InvoiceTaxCashVAT_V.

---
M src/org/openbravo/erpCommon/ad_forms/DocLineCashVATReady_PaymentTransactionReconciliation.java
M src/org/openbravo/erpCommon/utility/CashVATUtil.java
---
(0088721)
hgbot   
2016-08-02 08:59   
Repository: erp/backports/3.0PR16Q2.2
Changeset: 7eb7adce8d95927e7a12ffdf6ec3a38b09a3c4bb
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Aug 01 13:21:44 2016 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR16Q2.2/rev/7eb7adce8d95927e7a12ffdf6ec3a38b09a3c4bb [^]

Related to issue 33532: Code review improvements

Set invoiceTaxCashVAT_V variable as private.
Keep getInvoiceTaxCashVAT_V and setInvoiceTaxCashVAT_V methods as deprecated to avoid API change.
Add distinct to setInvoiceTaxCashVAT_V query to avoid retrieve duplicated ids.

---
M src/org/openbravo/erpCommon/ad_forms/DocLineCashVATReady_PaymentTransactionReconciliation.java
M src/org/openbravo/erpCommon/utility/CashVATUtil.java
---
(0088723)
aferraz   
2016-08-02 09:10   
Code review + Testing OK
(0089446)
hgbot   
2016-08-26 13:19   
Repository: erp/devel/pi
Changeset: 21076c6cf953209d840a48c7d37b93276a6f2cd5
Author: Mark <markmm82 <at> gmail.com>
Date: Tue Jul 26 14:43:28 2016 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/21076c6cf953209d840a48c7d37b93276a6f2cd5 [^]

Fixes issue 33532: Error posting Cash VAT payment if pays more than one invoice

When trying to post a Cash VAT payment that pays more than one invoice, process was failing and an error was shown. It was caused by a clearing of the session when iterating on the cash vat invoices list. To avoid it, list of cash vat ids are retrieved instead a list of InvoiceTaxCashVAT_V.

---
M src/org/openbravo/erpCommon/ad_forms/DocLineCashVATReady_PaymentTransactionReconciliation.java
M src/org/openbravo/erpCommon/utility/CashVATUtil.java
---
(0089447)
hgbot   
2016-08-26 13:20   
Repository: erp/devel/pi
Changeset: 7eb7adce8d95927e7a12ffdf6ec3a38b09a3c4bb
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Aug 01 13:21:44 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7eb7adce8d95927e7a12ffdf6ec3a38b09a3c4bb [^]

Related to issue 33532: Code review improvements

Set invoiceTaxCashVAT_V variable as private.
Keep getInvoiceTaxCashVAT_V and setInvoiceTaxCashVAT_V methods as deprecated to avoid API change.
Add distinct to setInvoiceTaxCashVAT_V query to avoid retrieve duplicated ids.

---
M src/org/openbravo/erpCommon/ad_forms/DocLineCashVATReady_PaymentTransactionReconciliation.java
M src/org/openbravo/erpCommon/utility/CashVATUtil.java
---
(0089462)
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