[OpenbravoERP-commits] devel/main: 3 new changesets

2015-03-12 Thread hg
details:   https://code.openbravo.com/erp/devel/main/rev/3b197629b212
changeset: 26158:3b197629b212
user:  RM packaging bot staff.rm at openbravo.com
date:  Wed Mar 11 07:13:25 2015 +
summary:   CI: merge back from main

details:   https://code.openbravo.com/erp/devel/main/rev/7fdaf0926663
changeset: 26159:7fdaf0926663
user:  Inigo Sanchez inigo.sanchez at openbravo.com
date:  Wed Mar 11 09:17:00 2015 +0100
summary:   Related bug 28999: The i index is wrong.

details:   https://code.openbravo.com/erp/devel/main/rev/5f447e753563
changeset: 26160:5f447e753563
user:  RM packaging bot staff.rm at openbravo.com
date:  Wed Mar 11 15:01:31 2015 +
summary:   CI: update AD_MODULE to version 26159

diffstat:

 modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml  
 |   2 +-
 
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
|   4 +-
 modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml   
 |   2 +-
 
modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
 |   2 +-
 
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml
   |   2 +-
 
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
|   8 +-
 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
 |   2 +-
 
modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml
|   2 +-
 
modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
 |   2 +-
 modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml   
 |   2 +-
 
modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
 |   6 +-
 modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml 
 |   2 +-
 
modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
   |   4 +-
 
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml 
|   2 +-
 
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
  |   2 +-
 modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml  
 |   2 +-
 
modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
|   2 +-
 
modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml
  |   2 +-
 
modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
   |   2 +-
 
modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml
   |   2 +-
 
modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
|   2 +-
 
modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml
   |   2 +-
 
modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
|  10 ++--
 
modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml
   |   2 +-
 
modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
|   4 +-
 
modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml
   |   2 +-
 
modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
|   2 +-
 modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml
 |   2 +-
 
modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
  |   2 +-
 
modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml
   |   2 +-
 
modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
|  12 ++--
 
modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml
  |   2 +-
 
modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
   |   2 +-
 
modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml
|   2 +-
 
modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
 |   6 +-
 

[OpenbravoERP-commits] devel/pi: 2 new changesets

2015-03-12 Thread hg
details:   https://code.openbravo.com/erp/devel/pi/rev/bb7b3752a14d
changeset: 26164:bb7b3752a14d
user:  Atul Gaware atul.gaware at openbravo.com
date:  Wed Mar 11 11:48:22 2015 +0530
summary:   Fixes Issue 29110:It is not possible to change currency in header 
tab in G/L
Journal

As there is trigger mutating error, updation of gl journal line currency and
currency rate is moved to a event handler from gl_journal_trg trigger.

details:   https://code.openbravo.com/erp/devel/pi/rev/ac9670b7bfdd
changeset: 26165:ac9670b7bfdd
user:  Alvaro Ferraz alvaro.ferraz at openbravo.com
date:  Wed Mar 11 13:23:31 2015 +0100
summary:   Related to issue 29110: Added a clear inside the loop

Added a clear inside the loop to avoid performance problems

diffstat:

 src-db/database/model/triggers/GL_JOURNAL_TRG.xml  |   8 +-
 src/org/openbravo/event/GLJournalEventHandler.java |  86 ++
 2 files changed, 87 insertions(+), 7 deletions(-)

diffs (116 lines):

diff -r 5a9f94c18c9b -r ac9670b7bfdd 
src-db/database/model/triggers/GL_JOURNAL_TRG.xml
--- a/src-db/database/model/triggers/GL_JOURNAL_TRG.xml Wed Mar 11 15:19:41 
2015 +
+++ b/src-db/database/model/triggers/GL_JOURNAL_TRG.xml Wed Mar 11 13:23:31 
2015 +0100
@@ -17,7 +17,7 @@
 * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
 * All Rights Reserved.
 * Contributor(s): Openbravo SLU
-* Contributions are Copyright (C) 2001-2008 Openbravo, S.L.U.
+* Contributions are Copyright (C) 2001-2015 Openbravo, S.L.U.
 *
 * Specifically, this derivative work is based upon the following Compiere
 * file and version.
@@ -34,12 +34,6 @@
 
 -- Subtract Old Amount
 IF(UPDATING) THEN
-  IF (:old.c_currency_id  :new.c_currency_id) THEN
-UPDATE gl_journalline SET c_currency_id = :new.c_currency_id where 
gl_journal_id = :old.gl_journal_id;
-  END IF;
-  IF (:old.currencyrate  :new.currencyrate) THEN
-UPDATE gl_journalline SET currencyrate = :new.currencyrate where 
gl_journal_id = :old.gl_journal_id;
-  END IF;
   IF(:old.TotalDr  :NEW.TotalDr OR :OLD.TotalCr  :NEW.TotalCr) THEN  
   IF(:old.GL_JournalBatch_ID IS NOT NULL AND :old.IsActive='Y') THEN
  UPDATE GL_JournalBatch
diff -r 5a9f94c18c9b -r ac9670b7bfdd 
src/org/openbravo/event/GLJournalEventHandler.java
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/src/org/openbravo/event/GLJournalEventHandler.javaWed Mar 11 
13:23:31 2015 +0100
@@ -0,0 +1,86 @@
+/*
+ *
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  License),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an AS IS
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2015 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  __.
+ *
+ */
+package org.openbravo.event;
+
+import javax.enterprise.event.Observes;
+
+import org.apache.log4j.Logger;
+import org.hibernate.ScrollMode;
+import org.hibernate.ScrollableResults;
+import org.hibernate.criterion.Restrictions;
+import org.openbravo.base.model.Entity;
+import org.openbravo.base.model.ModelProvider;
+import org.openbravo.base.model.Property;
+import org.openbravo.client.kernel.event.EntityPersistenceEventObserver;
+import org.openbravo.client.kernel.event.EntityUpdateEvent;
+import org.openbravo.dal.service.OBCriteria;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.financialmgmt.gl.GLJournal;
+import org.openbravo.model.financialmgmt.gl.GLJournalLine;
+
+public class GLJournalEventHandler extends EntityPersistenceEventObserver {
+  protected Logger logger = Logger.getLogger(this.getClass());
+  private static Entity[] entities = { 
ModelProvider.getInstance().getEntity(GLJournal.ENTITY_NAME) };
+
+  @Override
+  protected Entity[] getObservedEntities() {
+return entities;
+  }
+
+  public void onUpdate(@Observes EntityUpdateEvent event) {
+if (!isValidEvent(event)) {
+  return;
+}
+final GLJournal glj = (GLJournal) event.getTargetInstance();
+// Update GLJournalLine with updated Currency and Currency Rate.
+final Entity gljournal = 
ModelProvider.getInstance().getEntity(GLJournal.ENTITY_NAME);
+final Property currencyProperty = 

[OpenbravoERP-commits] devel/pi: Fixes issue 29092: Inconsistent data is not shown in t...

2015-03-12 Thread hg
details:   https://code.openbravo.com/erp/devel/pi/rev/e282c64e6e90
changeset: 26166:e282c64e6e90
user:  Augusto Mauch augusto.mauch at openbravo.com
date:  Thu Mar 12 10:39:35 2015 +0100
summary:   Fixes issue 29092: Inconsistent data is not shown in the form view

This issue was reproduced in the following scenario:
- A subtab is open in form view
- A change is done in its parent tab. That change (either through an event 
handler or through a trigger) deletes the record selected in the subtab and 
creates a new one
- The subtab is automatically refreshed. When the tab is refreshed:
* The whole grid is reloaded, it now contains all the current records
* The form view is shown again, and it tries to obtain the updated records 
from the grid. As the record selected in the form view is not present in the 
grid, the form view contains the old values

To fix this, when the record that was selected in the form view is no longer 
contained in the grid after the tab is refreshed, the form view is not shown. 
This was the grid view will be visible, and it will show the updated info.

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
 |  8 ++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r ac9670b7bfdd -r e282c64e6e90 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
 Wed Mar 11 13:23:31 2015 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
 Thu Mar 12 10:39:35 2015 +0100
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2014 Openbravo SLU
+ * All portions are Copyright (C) 2010-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  __.
  
@@ -1228,7 +1228,11 @@
   me.viewGrid.selectRecord(recordIndex);
 }
 if (me.formVisibleBeforeRefresh) {
-  me.switchFormGridVisibility();
+  if (me.viewGrid.getRecordIndex(me.viewForm.getValues()) !== -1) {
+// it might be that the record selected in the form is no longer 
present in the grid after being refreshed, due to having been deleted
+// in that case do not switch to form view, and keep the grid view 
to show the currently existing records
+me.switchFormGridVisibility();
+  }
 }
 delete me.formVisibleBeforeRefresh;
 delete me.viewGrid.recordsSelectedBeforeRefresh;

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
___
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits


[OpenbravoERP-commits] devel/pi: 2 new changesets

2015-03-12 Thread hg
details:   https://code.openbravo.com/erp/devel/pi/rev/e5cd53fc8141
changeset: 26168:e5cd53fc8141
user:  Jorge Garcia jorge.garcia at openbravo.com
date:  Tue Feb 17 12:33:34 2015 +0100
summary:   Fixed issue 27953 AccessibleOrgTree wrongly used in some reports

In many manual reports the organization combo is filled using:

ComboTableData comboTableData = new ComboTableData(vars, this,
  TABLEDIR, AD_ORG_ID, , , Utility.getContext(this, vars,
  #AccessibleOrgTree, ), Utility.getContext(this, vars,
  #User_Client, ), '*');

“#AccessibleOrgTree” context gets the list of all the granted organizations,
their ancestors and their descendants organizations. It's necessary to use
“#User_Org” instead, which contains the organizations that are granted
by the role:

ComboTableData comboTableData = new ComboTableData(vars, this,
  TABLEDIR, AD_ORG_ID, , , Utility.getContext(this, vars,
  #User_Org, ), Utility.getContext(this, vars,
  #User_Client, ), '*');

Reports from these folders had been checked:
src/org/openbravo/erpCommon/ad_reports
src/org/openbravo/erpReports

Files affected by this issue had been changed and tried

details:   https://code.openbravo.com/erp/devel/pi/rev/9e165ce2e311
changeset: 26169:9e165ce2e311
user:  Jorge Garcia jorge.garcia at openbravo.com
date:  Tue Mar 03 12:04:20 2015 +0100
summary:   Related to issue 27953: Updated Copyright

Updated Copyright dates

diffstat:

 
modules/org.openbravo.reports.ordersawaitingdelivery/src/org/openbravo/reports/ordersawaitingdelivery/erpCommon/ad_reports/ReportOrderNotShipped.java
 |   4 +-
 src/org/openbravo/erpCommon/ad_reports/ReportAgingBalance.java 
   |   4 +-
 src/org/openbravo/erpCommon/ad_reports/ReportAnnualCertification.java  
   |   4 +-
 src/org/openbravo/erpCommon/ad_reports/ReportAssetDepreciationSchedule.java
   |   7 
++--
 src/org/openbravo/erpCommon/ad_reports/ReportBudgetGenerateExcel.java  
   |   4 +-
 src/org/openbravo/erpCommon/ad_reports/ReportCashFlow.java 
   |   5 +--
 
src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR.java
|   2 +-
 
src/org/openbravo/erpCommon/ad_reports/ReportMaterialDimensionalAnalysesJR.java 
  |   7 ++--
 src/org/openbravo/erpCommon/ad_reports/ReportOrderNotInvoiceJR.java
   |   4 +-
 src/org/openbravo/erpCommon/ad_reports/ReportParetoProduct.java
   |   8 
++--
 src/org/openbravo/erpCommon/ad_reports/ReportProjectProfitabilityJR.java   
   |   4 +-
 
src/org/openbravo/erpCommon/ad_reports/ReportRefundSalesDimensionalAnalyses.java
  |  10 
+++---
 src/org/openbravo/erpCommon/ad_reports/ReportShipmentDimensionalAnalyzeJR.java 
   |  15 
-
 src/org/openbravo/erpCommon/ad_reports/ReportTaxInvoiceJR.java 
   |   4 +-
 14 files changed, 39 insertions(+), 43 deletions(-)

diffs (truncated from 327 to 300 lines):

diff -r 59a302602f2f -r 9e165ce2e311 
modules/org.openbravo.reports.ordersawaitingdelivery/src/org/openbravo/reports/ordersawaitingdelivery/erpCommon/ad_reports/ReportOrderNotShipped.java
--- 
a/modules/org.openbravo.reports.ordersawaitingdelivery/src/org/openbravo/reports/ordersawaitingdelivery/erpCommon/ad_reports/ReportOrderNotShipped.java
 Thu Mar 12 12:00:30 2015 +0100
+++ 
b/modules/org.openbravo.reports.ordersawaitingdelivery/src/org/openbravo/reports/ordersawaitingdelivery/erpCommon/ad_reports/ReportOrderNotShipped.java
 Tue Mar 03 12:04:20 2015 +0100
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2009-2012 Openbravo SLU 
+ * All portions are Copyright (C) 2009-2015 Openbravo SLU 
  * All Rights Reserved.
  * Contributor(s):  __.
  
@@ -154,7 +154,7 @@
 xmlDocument.setParameter(adOrgId, strCOrgId);
 try {
   ComboTableData comboTableData = new ComboTableData(vars, this, 
TABLEDIR, AD_Org_ID, ,
-   

[OpenbravoERP-commits] devel/pi: 2 new changesets

2015-03-12 Thread hg
details:   https://code.openbravo.com/erp/devel/pi/rev/6f599d5217c4
changeset: 26175:6f599d5217c4
user:  RM packaging bot staff.rm at openbravo.com
date:  Fri Mar 13 01:44:08 2015 +
summary:   CI: update AD_MODULE to version 26172

details:   https://code.openbravo.com/erp/devel/pi/rev/d237126a011d
changeset: 26176:d237126a011d
user:  RM packaging bot staff.rm at openbravo.com
date:  Fri Mar 13 02:17:21 2015 +
summary:   CI: merge back from main

diffstat:

 
modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTab.class
|0 
 
modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTabData.class
|0 
 modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml  
   |
2 +-
 
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
  |4 +-
 
modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTab.java
 |   18 +++
 
modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTab_data.xsql
|6 +-
 
modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTabData.java
 |4 +-
 
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java
 |3 +-
 modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml   
   |
2 +-
 
modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
   |2 +-
 
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml
 |2 
+-
 
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
  |8 +-
 
modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml
  |
2 +-
 
modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
   |2 +-
 modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml   
   |
2 +-
 
modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
   |6 +-
 modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml 
   |
2 +-
 
modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
 |4 +-
 
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml 
  |
2 +-
 
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
|2 +-
 modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml  
   |
2 +-
 
modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
  |2 +-
 
modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml
|2 +-
 
modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
 |2 +-
 
modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml
 |2 +-
 
modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
  |2 +-
 
modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml
 |2 

[OpenbravoERP-commits] devel/main: 7 new changesets

2015-03-12 Thread hg
details:   https://code.openbravo.com/erp/devel/main/rev/e282c64e6e90
changeset: 26167:e282c64e6e90
user:  Augusto Mauch augusto.mauch at openbravo.com
date:  Thu Mar 12 10:39:35 2015 +0100
summary:   Fixes issue 29092: Inconsistent data is not shown in the form view

This issue was reproduced in the following scenario:
- A subtab is open in form view
- A change is done in its parent tab. That change (either through an event 
handler or through a trigger) deletes the record selected in the subtab and 
creates a new one
- The subtab is automatically refreshed. When the tab is refreshed:
* The whole grid is reloaded, it now contains all the current records
* The form view is shown again, and it tries to obtain the updated records 
from the grid. As the record selected in the form view is not present in the 
grid, the form view contains the old values

To fix this, when the record that was selected in the form view is no longer 
contained in the grid after the tab is refreshed, the form view is not shown. 
This was the grid view will be visible, and it will show the updated info.

details:   https://code.openbravo.com/erp/devel/main/rev/59a302602f2f
changeset: 26168:59a302602f2f
user:  Augusto Mauch augusto.mauch at openbravo.com
date:  Thu Mar 12 12:00:30 2015 +0100
summary:   Fixes issue 29248: 0 can be used to filter numeric columns

In this changeset [1] this code was added to the 
OBNumberItem.parseValueExpressions function:

 ret = this.Super('parseValueExpressions', [value, fieldName, operator]);
+
+// if operator is not supported remove it
+if (!this.validOperators.contains(ret.operator)) {
+  ret.operator = '';
+  ret.value = '';
+  this.setValue('');
+}
 if (ret  ret.start) {
   ret.start = this.convertToTypedValue(ret.start);
 }

The problem is that if the provided value is 0, 
this.Super('parseValueExpressions', [value, fieldName, operator]) will return 
undefined. This happens because of a bug in smartclient's implementation of the
 parseValueExpressions function. This code is placed at the beginning of that 
function:

if (!value) value = this.getValue();
if (!value) return;
if (!isc.isA.String(value)) value += ;

If the provided value is 0, the value will be taken from this.getValue(). The 
returned value will again be evaluated to false, so the function will not 
return any value. Right after that, there is a comman
d to convert the provided value to String.

To fix this, in the call to this.Super('parseValueExpressions'), the string 
representation of the number will be passed instead of its numerical value. 
This way smartclient will accept the value and will n
ot return undefined. Smartclient was already converting the passed values to 
String, so there is no risk there.

The value passed to the OBNumberItem.parseValueExpressions is not modified to 
prevent unexpected consequences. A copy of it is converted to string and passed 
to the this.Super('parseValueExpressions') func
tion.

[1] 
https://code.openbravo.com/erp/devel/pi/rev/d9ce373c75dad51598fb943d75e4d8e56f1d56eb

details:   https://code.openbravo.com/erp/devel/main/rev/e5cd53fc8141
changeset: 26169:e5cd53fc8141
user:  Jorge Garcia jorge.garcia at openbravo.com
date:  Tue Feb 17 12:33:34 2015 +0100
summary:   Fixed issue 27953 AccessibleOrgTree wrongly used in some reports

In many manual reports the organization combo is filled using:

ComboTableData comboTableData = new ComboTableData(vars, this,
  TABLEDIR, AD_ORG_ID, , , Utility.getContext(this, vars,
  #AccessibleOrgTree, ), Utility.getContext(this, vars,
  #User_Client, ), '*');

“#AccessibleOrgTree” context gets the list of all the granted organizations,
their ancestors and their descendants organizations. It's necessary to use
“#User_Org” instead, which contains the organizations that are granted
by the role:

ComboTableData comboTableData = new ComboTableData(vars, this,
  TABLEDIR, AD_ORG_ID, , , Utility.getContext(this, vars,
  #User_Org, ), Utility.getContext(this, vars,
  #User_Client, ), '*');

Reports from these folders had been checked:
src/org/openbravo/erpCommon/ad_reports
src/org/openbravo/erpReports

Files affected by this issue had been changed and tried

details:   https://code.openbravo.com/erp/devel/main/rev/9e165ce2e311
changeset: 26170:9e165ce2e311
user:  Jorge Garcia jorge.garcia at openbravo.com
date:  Tue Mar 03 12:04:20 2015 +0100
summary:   Related to issue 27953: Updated Copyright

Updated Copyright dates

details:   https://code.openbravo.com/erp/devel/main/rev/ed4452a6ac7d
changeset: 26171:ed4452a6ac7d
user:  RM packaging bot staff.rm at openbravo.com
date:  Thu Mar 12 16:09:45 2015 +
summary:   CI: merge back from main

details:   https://code.openbravo.com/erp/devel/main/rev/ba035397bf8a
changeset: 26172:ba035397bf8a
user:  Unai Martirena unai.martirena at openbravo.com
date:  Mon Mar 09 18:58:14 2015 +0100

[OpenbravoERP-commits] devel/pi: 2 new changesets

2015-03-12 Thread hg
details:   https://code.openbravo.com/erp/devel/pi/rev/4f8a4e2f76d2
changeset: 26170:4f8a4e2f76d2
user:  RM packaging bot staff.rm at openbravo.com
date:  Thu Mar 12 15:48:01 2015 +
summary:   CI: update AD_MODULE to version 26165

details:   https://code.openbravo.com/erp/devel/pi/rev/ed4452a6ac7d
changeset: 26171:ed4452a6ac7d
user:  RM packaging bot staff.rm at openbravo.com
date:  Thu Mar 12 16:09:45 2015 +
summary:   CI: merge back from main

diffstat:

 modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml  
   |   2 +-
 
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
  |   4 +-
 modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml   
   |   2 +-
 
modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
   |   2 +-
 
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml
 |   2 +-
 
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
  |   8 +-
 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js
  |  10 +++-
 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
 |   8 ++-
 
modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml
  |   2 +-
 
modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
   |   2 +-
 modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml   
   |   2 +-
 
modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
   |   6 +-
 modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml 
   |   2 +-
 
modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
 |   4 +-
 
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml 
  |   2 +-
 
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
|   2 +-
 modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml  
   |   2 +-
 
modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
  |   2 +-
 
modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml
|   2 +-
 
modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
 |   2 +-
 
modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml
 |   2 +-
 
modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
  |   2 +-
 
modules/org.openbravo.reports.ordersawaitingdelivery/src/org/openbravo/reports/ordersawaitingdelivery/erpCommon/ad_reports/ReportOrderNotShipped.java
 |   4 +-
 
modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml
 |   2 +-
 
modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
  |  10 ++--
 
modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml
 |   2 +-
 
modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
  |   4 +-
 
modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml
   

[OpenbravoERP-commits] devel/pi: Fixes bug 29172: Improved performance select/deselect ...

2015-03-12 Thread hg
details:   https://code.openbravo.com/erp/devel/pi/rev/ba035397bf8a
changeset: 26172:ba035397bf8a
user:  Unai Martirena unai.martirena at openbravo.com
date:  Mon Mar 09 18:58:14 2015 +0100
summary:   Fixes bug 29172: Improved performance select/deselect all records in 
OrderInv grid

The problem was that on every selection/deselection of a record in Order 
Invoices grid it was triggering the execution of these three methods: 
'OB.APRM.AddPayment.updateInvOrderTotal(view.theForm, orderInvoice), 
OB.APRM.AddPayment.updateActualExpected(view.theForm), 
OB.APRM.AddPayment.updateDifference(view.theForm)'.
Actually it is not necessary to execute these functions on every record, 
because in the end they are updating total values, so just executing them after 
the iteration of the last record selected/deselected it would be enough.
To implement this, 'userSelectAllRecords' and 'deselectAllRecords' ListGrid 
methods have been overriden, to set a flag to true, in order to know when a 
record is changed while clicking selected/deselect all records, and in this 
case the three methods will be executed in the last record of the grid.
The 'OB.APRM.AddPayment.userSelectAllRecords' is executed only when clicking in 
select all records checkbox, but 'OB.APRM.AddPayment.deselectAllRecords' is 
executed while unchecking the previous checkbox and when fetching data in the 
grid using 'invalidateCache()' method. In this last case these functions will 
not be executed on every deselection neither in the last record, because they 
are already invoked directly in 'invalidateCache()', so in this case they will 
be avoided.

diffstat:

 
modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
 |  25 -
 1 files changed, 22 insertions(+), 3 deletions(-)

diffs (44 lines):

diff -r ed4452a6ac7d -r ba035397bf8a 
modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
--- 
a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
Thu Mar 12 16:09:45 2015 +
+++ 
b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
Mon Mar 09 18:58:14 2015 +0100
@@ -122,6 +122,8 @@
   glitemGrid.fetchData();
   creditUseGrid.fetchData();
   orderInvoiceGrid.selectionChanged = OB.APRM.AddPayment.selectionChanged;
+  orderInvoiceGrid.userSelectAllRecords = 
OB.APRM.AddPayment.userSelectAllRecords;
+  orderInvoiceGrid.deselectAllRecords = OB.APRM.AddPayment.deselectAllRecords;
   orderInvoiceGrid.dataProperties.transformData = 
OB.APRM.AddPayment.ordInvTransformData;
   glitemGrid.removeRecordClick = OB.APRM.AddPayment.removeRecordClick;
   creditUseGrid.selectionChanged = OB.APRM.AddPayment.selectionChangedCredit;
@@ -594,11 +596,28 @@
   }
 }
   }
-  OB.APRM.AddPayment.updateInvOrderTotal(view.theForm, orderInvoice);
-  OB.APRM.AddPayment.updateActualExpected(view.theForm);
-  OB.APRM.AddPayment.updateDifference(view.theForm);
+  if (!orderInvoice.obaprmAllRecordsSelectedByUser || 
(orderInvoice.obaprmAllRecordsSelectedByUser  
(orderInvoice.getRecordIndex(record) === orderInvoice.getTotalRows() - 1))) {
+
+OB.APRM.AddPayment.updateInvOrderTotal(view.theForm, orderInvoice);
+OB.APRM.AddPayment.updateActualExpected(view.theForm);
+OB.APRM.AddPayment.updateDifference(view.theForm);
+if (orderInvoice.obaprmAllRecordsSelectedByUser) {
+  delete orderInvoice.obaprmAllRecordsSelectedByUser;
+}
+  }
 };
 
+OB.APRM.AddPayment.userSelectAllRecords = function () {
+  this.obaprmAllRecordsSelectedByUser = true;
+  this.Super('userSelectAllRecords', arguments);
+};
+
+OB.APRM.AddPayment.deselectAllRecords = function () {
+  this.obaprmAllRecordsSelectedByUser = true;
+  this.Super('deselectAllRecords', arguments);
+};
+
+
 OB.APRM.AddPayment.updateActualExpected = function (form) {
   var orderInvoice = form.getItem('order_invoice').canvas.viewGrid,
   issotrx = form.getItem('issotrx').getValue(),

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
___
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits


[OpenbravoERP-commits] devel/pi: 2 new changesets

2015-03-12 Thread hg
details:   https://code.openbravo.com/erp/devel/pi/rev/5c3aeebd4d49
changeset: 26173:5c3aeebd4d49
user:  Sandra Huguet sandra.huguet at openbravo.com
date:  Thu Mar 12 16:00:40 2015 +0100
summary:   Fixed bug 29197 Payment Out is registered as BP Deposit transaction

In FIN_TransactionProcess.java  set the correct value depending on
the type of transaction

details:   https://code.openbravo.com/erp/devel/pi/rev/e2cc40f75e69
changeset: 26174:e2cc40f75e69
user:  Sandra Huguet sandra.huguet at openbravo.com
date:  Thu Mar 12 16:06:00 2015 +0100
summary:   related to issue 29197 update Copyright

diffstat:

 
modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTab.class
|0 
 
modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTabData.class
|0 
 
modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTab.java
 |   18 ++
 
modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTab_data.xsql
|6 +-
 
modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTabData.java
 |4 +-
 
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java
 |3 +-
 6 files changed, 25 insertions(+), 6 deletions(-)

diffs (100 lines):

diff -r ba035397bf8a -r e2cc40f75e69 
modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTab.class
Binary file 
modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTab.class
 has changed
diff -r ba035397bf8a -r e2cc40f75e69 
modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTabData.class
Binary file 
modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTabData.class
 has changed
diff -r ba035397bf8a -r e2cc40f75e69 
modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTab.java
--- 
a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTab.java
 Mon Mar 09 18:58:14 2015 +0100
+++ 
b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTab.java
 Thu Mar 12 16:06:00 2015 +0100
@@ -1,3 +1,21 @@
+/* 
+ *
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  License),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an AS IS
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2014-2015 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  __.
+ *
+ */
 package org.openbravo.advpaymentmngt.modulescript;
 
 import org.openbravo.database.ConnectionProvider;
diff -r ba035397bf8a -r e2cc40f75e69 
modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTab_data.xsql
--- 
a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTab_data.xsql
Mon Mar 09 18:58:14 2015 +0100
+++ 
b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTab_data.xsql
Thu Mar 12 16:06:00 2015 +0100
@@ -12,7 +12,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2014 Openbravo SLU
+ * All portions are Copyright (C) 2014-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  

[OpenbravoERP-commits] devel/pi: Fixes issue 29248: 0 can be used to filter numeric col...

2015-03-12 Thread hg
details:   https://code.openbravo.com/erp/devel/pi/rev/59a302602f2f
changeset: 26167:59a302602f2f
user:  Augusto Mauch augusto.mauch at openbravo.com
date:  Thu Mar 12 12:00:30 2015 +0100
summary:   Fixes issue 29248: 0 can be used to filter numeric columns

In this changeset [1] this code was added to the 
OBNumberItem.parseValueExpressions function:

 ret = this.Super('parseValueExpressions', [value, fieldName, operator]);
+
+// if operator is not supported remove it
+if (!this.validOperators.contains(ret.operator)) {
+  ret.operator = '';
+  ret.value = '';
+  this.setValue('');
+}
 if (ret  ret.start) {
   ret.start = this.convertToTypedValue(ret.start);
 }

The problem is that if the provided value is 0, 
this.Super('parseValueExpressions', [value, fieldName, operator]) will return 
undefined. This happens because of a bug in smartclient's implementation of the
 parseValueExpressions function. This code is placed at the beginning of that 
function:

if (!value) value = this.getValue();
if (!value) return;
if (!isc.isA.String(value)) value += ;

If the provided value is 0, the value will be taken from this.getValue(). The 
returned value will again be evaluated to false, so the function will not 
return any value. Right after that, there is a comman
d to convert the provided value to String.

To fix this, in the call to this.Super('parseValueExpressions'), the string 
representation of the number will be passed instead of its numerical value. 
This way smartclient will accept the value and will n
ot return undefined. Smartclient was already converting the passed values to 
String, so there is no risk there.

The value passed to the OBNumberItem.parseValueExpressions is not modified to 
prevent unexpected consequences. A copy of it is converted to string and passed 
to the this.Super('parseValueExpressions') func
tion.

[1] 
https://code.openbravo.com/erp/devel/pi/rev/d9ce373c75dad51598fb943d75e4d8e56f1d56eb

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js
 |  10 --
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r e282c64e6e90 -r 59a302602f2f 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js
  Thu Mar 12 10:39:35 2015 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js
  Thu Mar 12 12:00:30 2015 +0100
@@ -558,13 +558,19 @@
   },
 
   parseValueExpressions: function (value, fieldName, operator) {
-var ret;
+var ret, strValue;
 
+
+// smartclient's implementation of parseValueExpressions does not work 
properly of the formitem value is 0
+// this can be circumvented by passing a string instead of a number (the 
original value is not modified)
 if (isc.isA.String(value)) {
   value = value.trim();
+  strValue = value;
+} else {
+  strValue = String(value);
 }
 
-ret = this.Super('parseValueExpressions', [value, fieldName, operator]);
+ret = this.Super('parseValueExpressions', [strValue, fieldName, operator]);
 
 // if operator is not supported remove it
 if (!this.validOperators.contains(ret.operator)) {

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
___
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits