Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033531Openbravo ERP09. Financial managementpublic2016-07-20 12:522016-08-02 09:10
ngarcia 
markmm82 
urgentmajoralways
closedfixed 
5
 
3.0PR16Q33.0PR16Q3 
aferraz
Core
No
0033531: 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.0PR16Q3
2016-08-02 08:57hgbotCheckin
2016-08-02 08:57hgbotNote Added: 0088718
2016-08-02 08:57hgbotStatusscheduled => resolved
2016-08-02 08:57hgbotResolutionopen => fixed
2016-08-02 08:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR16Q3/rev/5489c10e911577cb1133c600d5a36b6bfdfaeb3a [^]
2016-08-02 08:57hgbotCheckin
2016-08-02 08:57hgbotNote Added: 0088719
2016-08-02 09:10aferrazReview Assigned To => aferraz
2016-08-02 09:10aferrazNote Added: 0088722
2016-08-02 09:10aferrazStatusresolved => closed
2016-08-02 09:10aferrazFixed in Version => 3.0PR16Q3

Notes
(0088718)
hgbot   
2016-08-02 08:57   
Repository: erp/backports/3.0PR16Q3
Changeset: 5489c10e911577cb1133c600d5a36b6bfdfaeb3a
Author: Mark <markmm82 <at> gmail.com>
Date: Tue Jul 26 14:43:28 2016 -0400
URL: http://code.openbravo.com/erp/backports/3.0PR16Q3/rev/5489c10e911577cb1133c600d5a36b6bfdfaeb3a [^]

Fixes issue 33531: 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
---
(0088719)
hgbot   
2016-08-02 08:57   
Repository: erp/backports/3.0PR16Q3
Changeset: 3928a857fcb800c9bf78494f39c7babcce5f9d65
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.0PR16Q3/rev/3928a857fcb800c9bf78494f39c7babcce5f9d65 [^]

Related to issue 33531: 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
---
(0088722)
aferraz   
2016-08-02 09:10   
Code review + Testing OK