[RTL] Merge from pi
authorDavid Baz Fayos <david.baz@openbravo.com>
Thu, 26 Apr 2012 12:32:56 +0200
changeset 16343 d91e074520f2
parent 16342 5178ba71da3b (current diff)
parent 16218 c88ce1de44de (diff)
child 16344 74821bc57188
[RTL] Merge from pi
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
--- a/.hgsigs	Thu Apr 26 12:28:57 2012 +0200
+++ b/.hgsigs	Thu Apr 26 12:32:56 2012 +0200
@@ -50,18 +50,19 @@
 e3386a2cd54020855bb2b3efa1c0afcfdf30a2b4 0 iEYEABECAAYFAk67/uoACgkQCX/oGf+2qkPXfQCg3lQiuBbJnVsPfnL8LWukEVG5CsIAoKsRfoVp93C1SY2N0iMl1LqT7CmB
 9bb62accddbd9114aa4562816ab5b0234b01b1fa 0 iEYEABECAAYFAk7Gf8IACgkQCX/oGf+2qkMwUACfbNSWszDOxciN14aA09Oe8da52TIAn3xc3Kgek0jmetz0q+lzPVxdAjjk
 1421ed09d86c5034375386393db18b2dc8866f77 0 iEYEABECAAYFAk7c/wQACgkQCX/oGf+2qkPZnwCfdfdLV/fHXKEXL0S+g9ip2PZuc5gAoL89Tv+s7FGS6g9HCfZSAkm76AF3
-cb27736b6ddbcf70d5a9c8878bdb012134818585 0 iEYEABECAAYFAk8pORIACgkQCX/oGf+2qkNT1ACgt0zVkZRcUGvubOPpiwStjh2c41YAn2J6v2/Cop95IKkUtVaBclL4c+89
 29635597c9b7110b66a4cde8e0cb0ece277f7407 0 iEYEABECAAYFAk7l05YACgkQCX/oGf+2qkNbCACgoK+bQ83JFW2GQb4j+YBkkBkrMOYAoKDSHPagp61WCcrPkCS7IEtmVI0E
 bc63869ec25d6771e0b3d3b65ddd630873663fc2 0 iEYEABECAAYFAk7h3vAACgkQCX/oGf+2qkP/HwCgt39R5/w8cF35rRoORikICeXQuDYAn347sM4ST4OvagS5ke9c6whsBYud
 5bb9eb1d86194a2fcf8779d28ee7bb131c53f20d 0 iEYEABECAAYFAk8BnJcACgkQCX/oGf+2qkMN7wCg+wl5wJjx0Y60WgZq3PRlBi3T3OoAmQGlwF1vK52FNykjDiACN+7Xdzjh
-f7c288af065f5425b20bd8bbef645df237282d4c 0 iEYEABECAAYFAk87pWEACgkQCX/oGf+2qkM1cgCg5Cp8jLM2gcEh+e+4QiJSJanE6J4An1iZUE2/OlrA8jLt9SQCs6/efCNq
-4463903e11ac52337be6041dcfb593022f35427f 0 iEYEABECAAYFAk8qiYkACgkQCX/oGf+2qkP6cgCfcsvKoCUqTvEE9+9qeLRBrjKy64YAn1Eg4n1WZcu4dxxnIDgAsjEywG/C
+cb27736b6ddbcf70d5a9c8878bdb012134818585 0 iEYEABECAAYFAk8pORIACgkQCX/oGf+2qkNT1ACgt0zVkZRcUGvubOPpiwStjh2c41YAn2J6v2/Cop95IKkUtVaBclL4c+89
 d034d0b54ffb6c401b3741be99d4237f82aa9d76 0 iEYEABECAAYFAk8EN/IACgkQCX/oGf+2qkMPzgCg/gXTYW5Vv9s02aG3VAi3lSvNiMwAn29/22CruqkJ9sTWkyA8lCChqk/r
 aa474df671aa2c3d4a16419479cf8098d5fbca82 0 iEYEABECAAYFAk8N8JAACgkQCX/oGf+2qkMFLACbB+b+pdKa0rd7O+ig6so/ETi1x0YAnRKPM91wMwdONWZ5AOazDoSj6h/c
-f4d0cceea00d21e244c7d6e5ddf3aa78e8610660 0 iEYEABECAAYFAk952D8ACgkQCX/oGf+2qkPmMACgo6qZwLG5GJcVYFhZqD2ASYXiEcAAn3Sis7yogN+qwyb1BokA+KSnEmjZ
+4463903e11ac52337be6041dcfb593022f35427f 0 iEYEABECAAYFAk8qiYkACgkQCX/oGf+2qkP6cgCfcsvKoCUqTvEE9+9qeLRBrjKy64YAn1Eg4n1WZcu4dxxnIDgAsjEywG/C
+f7c288af065f5425b20bd8bbef645df237282d4c 0 iEYEABECAAYFAk87pWEACgkQCX/oGf+2qkM1cgCg5Cp8jLM2gcEh+e+4QiJSJanE6J4An1iZUE2/OlrA8jLt9SQCs6/efCNq
 4f5fd4acb98e5fb7ef587debb5ffd20487e2bb32 0 iEYEABECAAYFAk9CRa4ACgkQCX/oGf+2qkPC4ACeJ5HQ20QAW0ULMU/+SUGJvz9YNEYAoJwLMrqwWkt3GuJFyp7TwpULPeKu
 cab708e2de98b574cc10f344845b7dff184080b6 0 iEYEABECAAYFAk9Pi+oACgkQCX/oGf+2qkP4kwCfT5nGx/E4gn7sZh+d7L5/9JpcplwAoJ5C4WwVNpNaO+tNEx8oMlqdu8mc
+f4d0cceea00d21e244c7d6e5ddf3aa78e8610660 0 iEYEABECAAYFAk952D8ACgkQCX/oGf+2qkPmMACgo6qZwLG5GJcVYFhZqD2ASYXiEcAAn3Sis7yogN+qwyb1BokA+KSnEmjZ
 3565692a3ec1a33a8cb71014aa7fa0e4488a47b3 0 iEYEABECAAYFAk+OsrsACgkQCX/oGf+2qkM/yQCfUNjwjTN32jfek9UBwpNfxq1IqigAnA2Aq5NLUsUtDCw9DmJ5kjx6U26t
 1856e02fc5e0e515a31c939ebc0372303e692a0f 0 iEYEABECAAYFAk90jY0ACgkQCX/oGf+2qkOxtwCg6Cng1h29qYq7oA8b4mj3KPVMKgkAoLZP6fhub1DNQGEn8zjCEXIRt1Mi
+7a9d4ff35b0f5a978d2dc47d387e974898340d9d 0 iEYEABECAAYFAk+Rm1EACgkQCX/oGf+2qkOHAQCdEPh9Z+3tNo6OybQXTGloAJkhDgAAn32RTPHXoVCSCHO/0hOTOazH/yRo
+ec66c54fad7f8821269266cd7de52b09a423cdae 0 iEYEABECAAYFAk99aVgACgkQCX/oGf+2qkOiDwCg+Ne5Dp5L0X34APNzA7rBeCmZVsQAoJ5AU9K9+Dhn7iuBHVyTisbUJ/oC
 17bc2224a41a30d10472bd14581378201c1ca44b 0 iEYEABECAAYFAk+IHlMACgkQCX/oGf+2qkM3MACgoR2lLVuhzaAg2v0PAHTOsvCgEIoAoP5uBTyNv/CqYuf+XIwD6F9nxa+y
-ec66c54fad7f8821269266cd7de52b09a423cdae 0 iEYEABECAAYFAk99aVgACgkQCX/oGf+2qkOiDwCg+Ne5Dp5L0X34APNzA7rBeCmZVsQAoJ5AU9K9+Dhn7iuBHVyTisbUJ/oC
--- a/.hgtags	Thu Apr 26 12:28:57 2012 +0200
+++ b/.hgtags	Thu Apr 26 12:32:56 2012 +0200
@@ -74,5 +74,6 @@
 b625648e103ef1d0ae41eff56c9a1e33877e53f9 3.0MP8.2
 2b3682085de417caee2ba0c2bb3f049e452cbc64 3.0MP8.3
 952c381e3ada4a4e3511782945d3aa66e09a697e 3.0MP9
+fb8d27aba52ce894846d0561c08aced707d99069 3.0MP9.1
 00280ab1ed3ab01d41ed048ccd01694af1223341 3.0MP10
 4a4cc349c6babb0d72149613cc3e4988427ee0ff 3.0MP10.1
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml	Thu Apr 26 12:28:57 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml	Thu Apr 26 12:32:56 2012 +0200
@@ -2165,8 +2165,9 @@
 <!--76A20548884B489E88D731480658E2D1-->  <HELP><![CDATA[Type of entry (Normal, Closing, Opening, Regularization)]]></HELP>
 <!--76A20548884B489E88D731480658E2D1-->  <COLUMNNAME><![CDATA[Factaccttype]]></COLUMNNAME>
 <!--76A20548884B489E88D731480658E2D1-->  <AD_TABLE_ID><![CDATA[FF80808130BB89090130BB8E3D7E0012]]></AD_TABLE_ID>
-<!--76A20548884B489E88D731480658E2D1-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
-<!--76A20548884B489E88D731480658E2D1-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--76A20548884B489E88D731480658E2D1-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
+<!--76A20548884B489E88D731480658E2D1-->  <AD_REFERENCE_VALUE_ID><![CDATA[DBCF65339D0F4403822A8A7928533D6B]]></AD_REFERENCE_VALUE_ID>
+<!--76A20548884B489E88D731480658E2D1-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
 <!--76A20548884B489E88D731480658E2D1-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--76A20548884B489E88D731480658E2D1-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--76A20548884B489E88D731480658E2D1-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
@@ -7528,8 +7529,9 @@
 <!--F79D0173541B42CD9F41A58D53929BFA-->  <HELP><![CDATA[Type of entry (Normal, Closing, Opening, Regularization)]]></HELP>
 <!--F79D0173541B42CD9F41A58D53929BFA-->  <COLUMNNAME><![CDATA[Factaccttype]]></COLUMNNAME>
 <!--F79D0173541B42CD9F41A58D53929BFA-->  <AD_TABLE_ID><![CDATA[1BAA61D216CB4A62838AA785658EE092]]></AD_TABLE_ID>
-<!--F79D0173541B42CD9F41A58D53929BFA-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
-<!--F79D0173541B42CD9F41A58D53929BFA-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--F79D0173541B42CD9F41A58D53929BFA-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
+<!--F79D0173541B42CD9F41A58D53929BFA-->  <AD_REFERENCE_VALUE_ID><![CDATA[DBCF65339D0F4403822A8A7928533D6B]]></AD_REFERENCE_VALUE_ID>
+<!--F79D0173541B42CD9F41A58D53929BFA-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
 <!--F79D0173541B42CD9F41A58D53929BFA-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--F79D0173541B42CD9F41A58D53929BFA-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--F79D0173541B42CD9F41A58D53929BFA-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Thu Apr 26 12:28:57 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Thu Apr 26 12:32:56 2012 +0200
@@ -7316,7 +7316,7 @@
 <!--9D54A8A2EF224C4EB9FA053023445422-->  <AD_TAB_ID><![CDATA[2A9BA5FDA0F8470D881F8EA9DEDCC598]]></AD_TAB_ID>
 <!--9D54A8A2EF224C4EB9FA053023445422-->  <AD_COLUMN_ID><![CDATA[F79D0173541B42CD9F41A58D53929BFA]]></AD_COLUMN_ID>
 <!--9D54A8A2EF224C4EB9FA053023445422-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
-<!--9D54A8A2EF224C4EB9FA053023445422-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--9D54A8A2EF224C4EB9FA053023445422-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
 <!--9D54A8A2EF224C4EB9FA053023445422-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--9D54A8A2EF224C4EB9FA053023445422-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--9D54A8A2EF224C4EB9FA053023445422-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -8858,7 +8858,7 @@
 <!--AEA5B3947F8B4BC0A566CAA6726712F4-->  <AD_TAB_ID><![CDATA[FF80808130BB89090130BB9A3A2B0043]]></AD_TAB_ID>
 <!--AEA5B3947F8B4BC0A566CAA6726712F4-->  <AD_COLUMN_ID><![CDATA[76A20548884B489E88D731480658E2D1]]></AD_COLUMN_ID>
 <!--AEA5B3947F8B4BC0A566CAA6726712F4-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
-<!--AEA5B3947F8B4BC0A566CAA6726712F4-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--AEA5B3947F8B4BC0A566CAA6726712F4-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
 <!--AEA5B3947F8B4BC0A566CAA6726712F4-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--AEA5B3947F8B4BC0A566CAA6726712F4-->  <SEQNO><![CDATA[390]]></SEQNO>
 <!--AEA5B3947F8B4BC0A566CAA6726712F4-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_forms/BatchPaymentExecution.java	Thu Apr 26 12:28:57 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_forms/BatchPaymentExecution.java	Thu Apr 26 12:32:56 2012 +0200
@@ -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-2011 Openbravo SLU
+ * All portions are Copyright (C) 2010-2012 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -39,10 +39,9 @@
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
-import org.openbravo.data.FieldProvider;
-import org.openbravo.erpCommon.ad_combos.OrganizationComboData;
 import org.openbravo.erpCommon.businessUtility.WindowTabs;
 import org.openbravo.erpCommon.info.SelectorUtility;
+import org.openbravo.erpCommon.utility.ComboTableData;
 import org.openbravo.erpCommon.utility.DateTimeData;
 import org.openbravo.erpCommon.utility.LeftTabsBar;
 import org.openbravo.erpCommon.utility.NavigationBar;
@@ -149,16 +148,21 @@
     xmlDocument.setParameter("inpChkIsReceipt", strIsReceipt);
 
     String newOrg = strOrganizationId;
-    if (!"0".equals(strOrganizationId)) {
+    if (null != strOrganizationId) {
       xmlDocument.setParameter("orgId", strOrganizationId);
-    } else {
-      FieldProvider[] fp = OrganizationComboData.selectCombo(this, vars.getRole());
-      if (fp != null && fp.length > 0) {
-        newOrg = fp[0].getField("id");
-      }
     }
-    xmlDocument.setData("reportAD_ORGID", "liststructure",
-        OrganizationComboData.selectCombo(this, vars.getRole()));
+    try {
+      ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_Org_ID", "",
+          "", Utility.getContext(this, vars, "#User_Org", "BatchPaymentExecution"),
+          Utility.getContext(this, vars, "#User_Client", "BatchPaymentExecution"), 0);
+      Utility.fillSQLParameters(this, vars, null, comboTableData, "PrintInvoices", "");
+      xmlDocument.setData("reportAD_ORGID", "liststructure", comboTableData.select(false));
+      comboTableData = null;
+
+    } catch (Exception ex) {
+      throw new ServletException(ex);
+    }
+
     xmlDocument.setParameter("dateFrom", strDateFrom);
     xmlDocument.setParameter("dateTo", strDateTo);
 
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/UserInfoWidgetActionHandler.java	Thu Apr 26 12:28:57 2012 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/UserInfoWidgetActionHandler.java	Thu Apr 26 12:32:56 2012 +0200
@@ -43,7 +43,6 @@
 import org.openbravo.dal.core.DalUtil;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.security.OrganizationStructureProvider;
-import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.dal.service.OBQuery;
 import org.openbravo.erpCommon.obps.ActivationKey;
@@ -190,7 +189,7 @@
         orgValueMap.put(orgValueMapItem);
       }
       jsonRole.put("organizationValueMap", orgValueMap);
-      jsonRole.put("warehouseOrgMap", getWarehouses(role.getClient().getId(),orgs));
+      jsonRole.put("warehouseOrgMap", getWarehouses(role.getClient().getId(), orgs));
       jsonRoles.put(jsonRole);
     }
     formItemInfo.put("roles", jsonRoles);
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js	Thu Apr 26 12:28:57 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js	Thu Apr 26 12:32:56 2012 +0200
@@ -243,7 +243,13 @@
   // update the value in update value as this is called from cellEditEnd in the
   // grid, after losing the focus on the form and when autosaving
   updateValue: function () {
-    if (this.grid && this.grid._preventDateParsing && !this.grid._autoSaving) {
+    var savingWithShortcut;
+    if (this.grid && this.grid.view && this.grid.view.savingWithShortcut) {
+      savingWithShortcut = this.grid.view.savingWithShortcut;
+    } else {
+      savingWithShortcut = false;
+    }
+    if (this.grid && this.grid._preventDateParsing && !this.grid._autoSaving && !savingWithShortcut) {
       return;
     }
     if (this.textField._textChanged) {
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Thu Apr 26 12:28:57 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Thu Apr 26 12:32:56 2012 +0200
@@ -1973,10 +1973,10 @@
     return result;
   },
 
-  setFieldFormProperties: function (fld) {
+  setFieldFormProperties: function (fld, isGridField) {
     var onChangeFunction;
 
-    if (fld.displayed === false) {
+    if (fld.displayed === false && !isGridField) {
       fld.visible = false;
       fld.alwaysTakeSpace = false;
     }
@@ -2101,12 +2101,8 @@
       fld.escapeHTML = (fld.escapeHTML === false ? false : true);
       fld.prompt = fld.title;
       fld.editorProperties = isc.addProperties({}, fld, isc.shallowClone(fld.editorProps));
-      //issue 20192: sometimes the property editorProperties.visible is changed by setFieldFormProperties
-      var prevVisible = fld.editorProperties.visible;
-      this.setFieldFormProperties(fld.editorProperties);
-      if (prevVisible !== fld.editorProperties.visible) {
-        fld.editorProperties.visible = prevVisible;
-      }
+      //issue 20192: 2nd parameter is true because fld.editorProperties is a grid property.
+      this.setFieldFormProperties(fld.editorProperties, true);
       if (fld.disabled) {
         fld.editorProperties.disabled = true;
       }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-tab.js	Thu Apr 26 12:28:57 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-tab.js	Thu Apr 26 12:32:56 2012 +0200
@@ -334,9 +334,9 @@
   // when a tab is drawn the first time it steals the focus 
   // from the active view, prevent this
   focus: function () {
-    if(this.parentElement.tabSet.tabPicker){
-	  this.pane.setAsActiveView();
-	} 
+    if (this.parentElement.tabSet.tabPicker) {
+      this.pane.setAsActiveView();
+    }
     if (this.pane.isActiveView && this.pane.isActiveView()) {
       this.Super('focus', arguments);
     }