[OpenbravoERP-commits] devel/pi: Fixes issue 24924: Changes are applied to the grid wit...
details: https://code.openbravo.com/erp/devel/pi/rev/2b5c09bed087 changeset: 21271:2b5c09bed087 user: Augusto Mauch openbravo.com> date: Thu Oct 10 17:41:32 2013 +0200 summary: Fixes issue 24924: Changes are applied to the grid with adaptive filtering When a record was updated in form view with the record filtered using adaptive filtering, the changes were not being applied to the grid. This happened because the changes were being applied to the allRows property of the ResultSet, but not to the localData property, which is what contains the data of the filtered records. diffstat: modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diffs (28 lines): diff -r aa0a3079ce66 -r 2b5c09bed087 modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js --- a/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js Thu Oct 10 14:30:03 2013 +0200 +++ b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js Thu Oct 10 17:41:32 2013 +0200 @@ -90,6 +90,24 @@ } } } + }, + + _original_updateCacheData: isc.ResultSet.getPrototype().updateCacheData, + updateCacheData: function (updateData, dsRequest) { +var filteringOnClient = this.allRows !== null, +i, indexAllRows, indexLocalData, ds; +this._original_updateCacheData(updateData, dsRequest); +if (filteringOnClient) { + ds = this.getDataSource(); + // remove any rows that were present in the cache + for (i = 0; i < updateData.length; i++) { +indexLocalData = ds.findByKeys(updateData[i], this.localData); +indexAllRows = ds.findByKeys(updateData[i], this.allRows); +if (indexLocalData !== -1 && indexAllRows !== -1) { + this.localData[indexLocalData] = this.allRows[indexAllRows]; +} + } +} } }); -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits
[OpenbravoERP-commits] devel/main: 7 new changesets
details: https://code.openbravo.com/erp/devel/main/rev/865e35797a3b changeset: 21244:865e35797a3b user: Javier Etxarri openbravo.com> date: Mon Oct 07 10:19:00 2013 +0200 summary: Fixes issue 24890: Cannot delete shipments details: https://code.openbravo.com/erp/devel/main/rev/eda54c434a3e changeset: 21245:eda54c434a3e user: Eduardo Argal Guibert openbravo.com> date: Wed Oct 09 13:11:37 2013 +0200 summary: Fixes bug 24891 details: https://code.openbravo.com/erp/devel/main/rev/140b1f50768f changeset: 21246:140b1f50768f user: David Miguelez openbravo.com> date: Wed Oct 09 17:04:19 2013 +0200 summary: Fixes Issue 24912. Prevents from not Balanced error. details: https://code.openbravo.com/erp/devel/main/rev/eec0f437deb7 changeset: 21247:eec0f437deb7 user: David Miguelez openbravo.com> date: Wed Oct 09 17:39:29 2013 +0200 summary: Related to Issue 24912. details: https://code.openbravo.com/erp/devel/main/rev/165e2aa984c3 changeset: 21248:165e2aa984c3 user: Gorka Ion Damián openbravo.com> date: Tue Oct 08 19:14:12 2013 +0200 summary: Fixed issue 24913.Return empty result when no variants are found. details: https://code.openbravo.com/erp/devel/main/rev/d107af5fc116 changeset: 21249:d107af5fc116 user: Stefan Hühner openbravo.com> date: Wed Oct 09 19:43:59 2013 +0200 summary: Fixed 24919: Speedup AcctServer.checkDocuments Avoid checking same docbasetype several times by only doing check for distinct docbasetype values thus skipping duplicates which happen as docbasetypes are defined per organization. details: https://code.openbravo.com/erp/devel/main/rev/54d50808f4ef changeset: 21250:54d50808f4ef user: Stefan Hühner openbravo.com> date: Wed Oct 09 19:45:30 2013 +0200 summary: Issue 24919: Small code-cleanup Delete unused (non-public) selectDocuments methods in xsql file to make it obvious that the method is not used. diffstat: src/org/openbravo/erpCommon/ad_forms/AcctServer_data.xsql| 35 +- src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java| 15 +- src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.java | 51 ++- src/org/openbravo/erpCommon/businessUtility/AccountTree_data.xsql| 62 +- src/org/openbravo/event/MInOutLineEventHandler.java | 9 +- src/org/openbravo/materialmgmt/ManageVariantsDS.java | 3 + 6 files changed, 117 insertions(+), 58 deletions(-) diffs (truncated from 322 to 300 lines): diff -r e636887f6f83 -r 54d50808f4ef src/org/openbravo/erpCommon/ad_forms/AcctServer_data.xsql --- a/src/org/openbravo/erpCommon/ad_forms/AcctServer_data.xsql Thu Oct 10 11:34:10 2013 + +++ b/src/org/openbravo/erpCommon/ad_forms/AcctServer_data.xsql Wed Oct 09 19:45:30 2013 +0200 @@ -523,39 +523,6 @@ - - - - - - - - - - - - - @@ -639,7 +606,7 @@ - select docbasetype as name from c_doctype + select distinct docbasetype as name from c_doctype where ad_table_id = ? and ad_client_id = ? diff -r e636887f6f83 -r 54d50808f4ef src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java --- a/src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java Thu Oct 10 11:34:10 2013 + +++ b/src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java Wed Oct 09 19:45:30 2013 +0200 @@ -713,7 +713,7 @@ // Total retValue = retValue.add(new BigDecimal(getAmount(AcctServer.AMTTYPE_Gross))); if (usedCredit.compareTo(ZERO) != 0 && generatedCredit.compareTo(ZERO) == 0) - retValue.add(usedCredit); + retValue = retValue.add(usedCredit); sb.append(retValue); FIN_Payment payment = OBDal.getInstance().get(FIN_FinaccTransaction.class, Record_ID) .getFinPayment(); @@ -732,12 +732,13 @@ ((DocLine_FINFinAccTransaction) p_lines[i]).PaymentAmount)); retValue = retValue.subtract(lineBalance); } else { - BigDecimal lineBalance = BigDecimal.ZERO; - for (FIN_PaymentDetail pd : payment.getFINPaymentDetailList()) { -lineBalance = lineBalance.add(payment.isReceipt() ? pd.getAmount().add( -pd.getWriteoffAmount()) : pd.getAmount().add(pd.getWriteoffAmount()).negate()); - } - retValue = retValue.subtract(lineBalance); + BigDecimal lineBalance = payment.isReceipt() ? new BigDecimal( + ((DocLine_FINFinAccTransaction) p_lines[i]).getAmount()) : new BigDecimal( + ((DocLine_FINFinAccTransaction) p_lines[i]).getAmount()).negate(); + BigDecimal lineWriteoff = payment.isReceipt() ? new BigDecimal( + ((DocLine_FINFinAccTransaction) p_lines[i]).getWriteOffAmt()) : new BigDecimal( + ((DocLine_FINFinAccTransaction) p_lines[i]).getWriteOffAmt()).
[OpenbravoERP-commits] devel/pi: Fixes issue 0024799: Extend SimpleCallout to provide u...
details: https://code.openbravo.com/erp/devel/pi/rev/f3b3ef52284b changeset: 21256:f3b3ef52284b user: Adrián Romero openbravo.com> date: Thu Oct 10 10:59:20 2013 +0200 summary: Fixes issue 0024799: Extend SimpleCallout to provide utility methods with actions that can be executed in a callout Removing unused commands and changing visibility of new utility methods to protected diffstat: src/org/openbravo/erpCommon/ad_callouts/SimpleCallout.java | 53 + 1 files changed, 7 insertions(+), 46 deletions(-) diffs (98 lines): diff -r 74c81a31c181 -r f3b3ef52284b src/org/openbravo/erpCommon/ad_callouts/SimpleCallout.java --- a/src/org/openbravo/erpCommon/ad_callouts/SimpleCallout.javaWed Oct 09 19:46:27 2013 +0200 +++ b/src/org/openbravo/erpCommon/ad_callouts/SimpleCallout.javaThu Oct 10 10:59:20 2013 +0200 @@ -327,7 +327,7 @@ * @param value * The message to display in the browser. */ -public void showMessage(String value) { +protected void showMessage(String value) { addResult("MESSAGE", value); } @@ -337,7 +337,7 @@ * @param value * The error message to display in the browser. */ -public void showError(String value) { +protected void showError(String value) { addResult("ERROR", value); } @@ -347,7 +347,7 @@ * @param value * The warning message to display in the browser. */ -public void showWarning(String value) { +protected void showWarning(String value) { addResult("WARNING", value); } @@ -357,7 +357,7 @@ * @param value * The information message to display in the browser. */ -public void showInformation(String value) { +protected void showInformation(String value) { addResult("INFO", value); } @@ -367,7 +367,7 @@ * @param value * The success message to display in the browser. */ -public void showSuccess(String value) { +protected void showSuccess(String value) { addResult("SUCCESS", value); } @@ -377,47 +377,8 @@ * @param value * The javascript code to execute in the browser. */ -public void executeCode(String value) { - addResult("EXECUTE", value); -} - -/** - * Executes the validation defined by the display logic of window fields after the execution of - * the callout. - * - */ -public void executeDisplayLogic() { - addResult("EXECUTE", "displayLogic();"); -} - -/** - * Shows the field defined indicated in the value. - * - * @param value - * The field to show. - */ -public void displayElement(String value) { - addResult("DISPLAY", value); -} - -/** - * Hides the field defined indicated in the value. - * - * @param value - * The field to hide. - */ -public void hideElement(String value) { - addResult("HIDE", value); -} - -/** - * Defines the field to put the focus after the execution of the callout. - * - * @param value - * The field to focus. - */ -public void cursorElement(String value) { - addResult("CURSOR_FIELD", value); +protected void executeCodeInBrowser(String value) { + addResult("JSEXECUTE", value); } } } -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk ___ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits