details: https://code.openbravo.com/erp/devel/main/rev/1963badc9bed changeset: 18520:1963badc9bed user: David Miguelez <david.miguelez <at> openbravo.com> date: Wed Nov 14 13:41:33 2012 +0100 summary: Fixes Issue 22301.
details: https://code.openbravo.com/erp/devel/main/rev/4d243050903f changeset: 18521:4d243050903f user: David Miguelez <david.miguelez <at> openbravo.com> date: Wed Nov 14 16:23:41 2012 +0100 summary: Fixes Issue 0022299. Changed the definition of the conn variable so it uses the same connection for all the transactions made. diffstat: modules/org.openbravo.client.application/src/org/openbravo/client/application/event/AcctSchemaEventHandler.java | 5 ++--- src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice.java | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diffs (42 lines): diff -r c19182955870 -r 4d243050903f modules/org.openbravo.client.application/src/org/openbravo/client/application/event/AcctSchemaEventHandler.java --- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/AcctSchemaEventHandler.java Tue Nov 13 15:01:21 2012 +0100 +++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/AcctSchemaEventHandler.java Wed Nov 14 16:23:41 2012 +0100 @@ -55,8 +55,7 @@ return entities; } - public void onUpdate(@Observes - EntityUpdateEvent event) { + public void onUpdate(@Observes EntityUpdateEvent event) { if (!isValidEvent(event)) { return; } @@ -198,7 +197,7 @@ } else if (ACCOUNTTYPE_EXPENSE.equals(accountType) && !expensePositive) { return true; } else if (ACCOUNTTYPE_REVENUE.equals(accountType) && !revenuePositive) { - return true; + return false; } return false; diff -r c19182955870 -r 4d243050903f src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice.java --- a/src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice.java Tue Nov 13 15:01:21 2012 +0100 +++ b/src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice.java Wed Nov 14 16:23:41 2012 +0100 @@ -44,6 +44,7 @@ import org.openbravo.erpCommon.utility.SequenceIdData; import org.openbravo.erpCommon.utility.ToolBar; import org.openbravo.erpCommon.utility.Utility; +import org.openbravo.service.db.DalConnectionProvider; import org.openbravo.xmlEngine.XmlDocument; public class ExpenseAPInvoice extends HttpSecureAppServlet { @@ -119,7 +120,7 @@ Connection conn = null; try { - conn = this.getTransactionConnection(); + conn = new DalConnectionProvider(false).getConnection(); ExpenseAPInvoiceData[] data = ExpenseAPInvoiceData.select(this, Utility.getContext(this, vars, "#User_Client", "ExpenseAPInvoice"), ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ Openbravo-commits mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbravo-commits
