diff --git a/migration/i1.0c-release/oracle/201307171647_IDEMPIERE-1138.sql b/migration/i1.0c-release/oracle/201307171647_IDEMPIERE-1138.sql new file mode 100644 index 0000000000..deacbd4a1d --- /dev/null +++ b/migration/i1.0c-release/oracle/201307171647_IDEMPIERE-1138.sql @@ -0,0 +1,7 @@ +-- Fix wrong name on migration script as reported at https://www.facebook.com/groups/idempiere/permalink/631456976906219/ +update ad_migrationscript set name = '20130717164800_IDEMPIERE-1138.sql', filename = 'oracle/20130717164800_IDEMPIERE-1138.sql' where name = '20131707164800_IDEMPIERE-1138.sql' +; + +SELECT register_migration_script('201307171647_IDEMPIERE-1138.sql') FROM dual +; + diff --git a/migration/i1.0c-release/oracle/20131707164800_IDEMPIERE-1138.sql b/migration/i1.0c-release/oracle/20130717164800_IDEMPIERE-1138.sql similarity index 99% rename from migration/i1.0c-release/oracle/20131707164800_IDEMPIERE-1138.sql rename to migration/i1.0c-release/oracle/20130717164800_IDEMPIERE-1138.sql index 1ff8ff0276..b297798d2b 100644 --- a/migration/i1.0c-release/oracle/20131707164800_IDEMPIERE-1138.sql +++ b/migration/i1.0c-release/oracle/20130717164800_IDEMPIERE-1138.sql @@ -93,6 +93,6 @@ UPDATE AD_Field SET Name='Broadcast Frequency', Description='How Many Times Mess ' WHERE AD_Column_ID=200984 AND IsCentrallyMaintained='Y' ; -SELECT register_migration_script('20131707164800_IDEMPIERE-1138.sql') FROM dual +SELECT register_migration_script('20130717164800_IDEMPIERE-1138.sql') FROM dual ; diff --git a/migration/i1.0c-release/oracle/201310190926_IDEMPIERE-1415.sql b/migration/i1.0c-release/oracle/201310190926_IDEMPIERE-1415.sql new file mode 100644 index 0000000000..9887511ab3 --- /dev/null +++ b/migration/i1.0c-release/oracle/201310190926_IDEMPIERE-1415.sql @@ -0,0 +1,21 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Oct 19, 2013 9:24:48 AM COT +-- IDEMPIERE-1415 Disable Cash Journal Line field in the Invoice/Allocation window +UPDATE AD_Field SET IsDisplayed='N', IsDisplayedGrid='N',Updated=TO_DATE('2013-10-19 09:24:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4371 +; + +-- Oct 19, 2013 9:25:01 AM COT +-- IDEMPIERE-1415 Disable Cash Journal Line field in the Invoice/Allocation window +UPDATE AD_Field SET IsDisplayed='N', IsDisplayedGrid='N',Updated=TO_DATE('2013-10-19 09:25:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11032 +; + +-- Oct 19, 2013 9:25:11 AM COT +-- IDEMPIERE-1415 Disable Cash Journal Line field in the Invoice/Allocation window +UPDATE AD_Field SET IsDisplayed='N', IsDisplayedGrid='N',Updated=TO_DATE('2013-10-19 09:25:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11049 +; + +SELECT register_migration_script('201310190926_IDEMPIERE-1415.sql') FROM dual +; + diff --git a/migration/i1.0c-release/oracle/201310211037_IDEMPIERE-1138.sql b/migration/i1.0c-release/oracle/201310211037_IDEMPIERE-1138.sql new file mode 100644 index 0000000000..2314dc3394 --- /dev/null +++ b/migration/i1.0c-release/oracle/201310211037_IDEMPIERE-1138.sql @@ -0,0 +1,6 @@ +-- Fix wrong name on migration script - one last loose end +update ad_system set lastmigrationscriptapplied='20130717164800_IDEMPIERE-1138.sql' where lastmigrationscriptapplied='20131707164800_IDEMPIERE-1138.sql' +; +SELECT register_migration_script('201310211037_IDEMPIERE-1138.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/201307171647_IDEMPIERE-1138.sql b/migration/i1.0c-release/postgresql/201307171647_IDEMPIERE-1138.sql new file mode 100644 index 0000000000..82d54c95c2 --- /dev/null +++ b/migration/i1.0c-release/postgresql/201307171647_IDEMPIERE-1138.sql @@ -0,0 +1,7 @@ +-- Fix wrong name on migration script as reported at https://www.facebook.com/groups/idempiere/permalink/631456976906219/ +update ad_migrationscript set name = '20130717164800_IDEMPIERE-1138.sql', filename = 'postgresql/20130717164800_IDEMPIERE-1138.sql' where name = '20131707164800_IDEMPIERE-1138.sql' +; + +SELECT register_migration_script('201307171647_IDEMPIERE-1138.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/20131707164800_IDEMPIERE-1138.sql b/migration/i1.0c-release/postgresql/20130717164800_IDEMPIERE-1138.sql similarity index 99% rename from migration/i1.0c-release/postgresql/20131707164800_IDEMPIERE-1138.sql rename to migration/i1.0c-release/postgresql/20130717164800_IDEMPIERE-1138.sql index 9328946efc..d46a35ef73 100644 --- a/migration/i1.0c-release/postgresql/20131707164800_IDEMPIERE-1138.sql +++ b/migration/i1.0c-release/postgresql/20130717164800_IDEMPIERE-1138.sql @@ -90,6 +90,6 @@ UPDATE AD_Field SET Name='Broadcast Frequency', Description='How Many Times Mess ' WHERE AD_Column_ID=200984 AND IsCentrallyMaintained='Y' ; -SELECT register_migration_script('20131707164800_IDEMPIERE-1138.sql') FROM dual +SELECT register_migration_script('20130717164800_IDEMPIERE-1138.sql') FROM dual ; diff --git a/migration/i1.0c-release/postgresql/201310190926_IDEMPIERE-1415.sql b/migration/i1.0c-release/postgresql/201310190926_IDEMPIERE-1415.sql new file mode 100644 index 0000000000..b6bcddf54a --- /dev/null +++ b/migration/i1.0c-release/postgresql/201310190926_IDEMPIERE-1415.sql @@ -0,0 +1,18 @@ +-- Oct 19, 2013 9:24:48 AM COT +-- IDEMPIERE-1415 Disable Cash Journal Line field in the Invoice/Allocation window +UPDATE AD_Field SET IsDisplayed='N', IsDisplayedGrid='N',Updated=TO_TIMESTAMP('2013-10-19 09:24:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4371 +; + +-- Oct 19, 2013 9:25:01 AM COT +-- IDEMPIERE-1415 Disable Cash Journal Line field in the Invoice/Allocation window +UPDATE AD_Field SET IsDisplayed='N', IsDisplayedGrid='N',Updated=TO_TIMESTAMP('2013-10-19 09:25:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11032 +; + +-- Oct 19, 2013 9:25:11 AM COT +-- IDEMPIERE-1415 Disable Cash Journal Line field in the Invoice/Allocation window +UPDATE AD_Field SET IsDisplayed='N', IsDisplayedGrid='N',Updated=TO_TIMESTAMP('2013-10-19 09:25:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11049 +; + +SELECT register_migration_script('201310190926_IDEMPIERE-1415.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/201310211037_IDEMPIERE-1138.sql b/migration/i1.0c-release/postgresql/201310211037_IDEMPIERE-1138.sql new file mode 100644 index 0000000000..2314dc3394 --- /dev/null +++ b/migration/i1.0c-release/postgresql/201310211037_IDEMPIERE-1138.sql @@ -0,0 +1,6 @@ +-- Fix wrong name on migration script - one last loose end +update ad_system set lastmigrationscriptapplied='20130717164800_IDEMPIERE-1138.sql' where lastmigrationscriptapplied='20131707164800_IDEMPIERE-1138.sql' +; +SELECT register_migration_script('201310211037_IDEMPIERE-1138.sql') FROM dual +; + diff --git a/org.adempiere.base/src/org/compiere/model/MLocation.java b/org.adempiere.base/src/org/compiere/model/MLocation.java index 5d7724fb0c..4590abdf22 100644 --- a/org.adempiere.base/src/org/compiere/model/MLocation.java +++ b/org.adempiere.base/src/org/compiere/model/MLocation.java @@ -50,8 +50,8 @@ public class MLocation extends X_C_Location implements Comparator /** * */ - private static final long serialVersionUID = -7522263181009070628L; - + private static final long serialVersionUID = -8462972029898383163L; + // http://jira.idempiere.com/browse/IDEMPIERE-147 public static String LOCATION_MAPS_URL_PREFIX = MSysConfig.getValue(MSysConfig.LOCATION_MAPS_URL_PREFIX); public static String LOCATION_MAPS_ROUTE_PREFIX = MSysConfig.getValue(MSysConfig.LOCATION_MAPS_ROUTE_PREFIX); @@ -721,6 +721,15 @@ public class MLocation extends X_C_Location implements Comparator return address.toString().replace(" ", "+"); } + public static int getFieldLength(String columnName) { + MTable loctable = MTable.get(Env.getCtx(), Table_ID); + MColumn column = loctable.getColumn(columnName); + if (column == null) + return -1; + else + return column.getFieldLength(); + } + /** Error Message */ private String m_errorMessage = null; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocationDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocationDialog.java index 5cbfe08f00..74495ea74a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocationDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WLocationDialog.java @@ -237,16 +237,21 @@ public class WLocationDialog extends Window implements EventListener txtAddress1 = new Textbox(); txtAddress1.setCols(20); + txtAddress1.setMaxlength(MLocation.getFieldLength(MLocation.COLUMNNAME_Address1)); txtAddress2 = new Textbox(); txtAddress2.setCols(20); + txtAddress2.setMaxlength(MLocation.getFieldLength(MLocation.COLUMNNAME_Address2)); txtAddress3 = new Textbox(); txtAddress3.setCols(20); + txtAddress3.setMaxlength(MLocation.getFieldLength(MLocation.COLUMNNAME_Address3)); txtAddress4 = new Textbox(); txtAddress4.setCols(20); + txtAddress4.setMaxlength(MLocation.getFieldLength(MLocation.COLUMNNAME_Address4)); //autocomplete City txtCity = new WAutoCompleterCity(m_WindowNo); txtCity.setCols(20); + txtCity.setMaxlength(MLocation.getFieldLength(MLocation.COLUMNNAME_City)); txtCity.setAutodrop(true); txtCity.setAutocomplete(true); txtCity.addEventListener(Events.ON_CHANGING, this); @@ -254,8 +259,10 @@ public class WLocationDialog extends Window implements EventListener txtPostal = new Textbox(); txtPostal.setCols(20); + txtPostal.setMaxlength(MLocation.getFieldLength(MLocation.COLUMNNAME_Postal)); txtPostalAdd = new Textbox(); txtPostalAdd.setCols(20); + txtPostalAdd.setMaxlength(MLocation.getFieldLength(MLocation.COLUMNNAME_Postal_Add)); lstRegion = new Listbox(); lstRegion.setMold("select"); @@ -920,6 +927,7 @@ public class WLocationDialog extends Window implements EventListener m_location.setC_City_ID(txtCity.getC_City_ID()); m_location.setCity(txtCity.getValue()); m_location.setPostal(txtPostal.getValue()); + m_location.setPostal_Add(txtPostalAdd.getValue()); // Country/Region MCountry country = (MCountry)lstCountry.getSelectedItem().getValue(); m_location.setCountry(country); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java index 2480fb4e38..35e3aa896b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java @@ -671,6 +671,10 @@ public class ZkReportViewer extends Window implements EventListener, ITab .append(m_reportEngine.getRowCount()); statusBar.setStatusLine(sb.toString()); // + bWizard.setDisabled( + ( m_reportEngine.getPrintFormat() == null + || (m_reportEngine.getPrintFormat().getAD_Client_ID() == 0 && Env.getAD_Client_ID(Env.getCtx()) != 0) + || m_reportEngine.getPrintFormat().isForm())); } // revalidate /** diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/js/jawwa/atmosphere/serverpush.js b/org.adempiere.ui.zk/WEB-INF/src/web/js/jawwa/atmosphere/serverpush.js index cce588be08..dd053a4db7 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/web/js/jawwa/atmosphere/serverpush.js +++ b/org.adempiere.ui.zk/WEB-INF/src/web/js/jawwa/atmosphere/serverpush.js @@ -15,7 +15,7 @@ jawwa.atmosphere.ServerPush = zk.$extends(zk.Object, { desktop: null, active: false, - delay: 250, + delay: 10, failures: 0, timeout: 0, ajaxOptions: { @@ -34,17 +34,20 @@ this.ajaxOptions.timeout = this.timeout; var me = this; this.ajaxOptions.error = function(jqxhr, textStatus, errorThrown) { - if (typeof console == "object") { - console.error(textStatus); - console.error(errorThrown); - } - me.failures += 1; - me._schedule(); + if (textStatus != "timeout") { + if (typeof console == "object") { + console.error(textStatus); + console.error(errorThrown); + } + me.failures += 1; + } }; this.ajaxOptions.success = function(data) { zAu.cmd0.echo(this.desktop); me.failures = 0; - me._schedule(); + }; + this.ajaxOptions.complete = function() { + me._schedule(); }; }, _schedule: function() { @@ -68,8 +71,8 @@ this._send(); }, stop: function() { - this.desktop._serverpush = null; this.active = false; + this.desktop._serverpush = null; if (this._req) { this._req.abort(); this._req = null; diff --git a/org.adempiere.ui.zk/WEB-INF/zk.xml b/org.adempiere.ui.zk/WEB-INF/zk.xml index 25b218dbd6..8c0f5193a6 100644 --- a/org.adempiere.ui.zk/WEB-INF/zk.xml +++ b/org.adempiere.ui.zk/WEB-INF/zk.xml @@ -17,12 +17,6 @@ org.adempiere.webui.util.LogEventInterceptor - - [Optional] Monitor i3-log.conf and register a - handler for the specified log-base - - - false diff --git a/org.adempiere.ui/src/org/compiere/install/Translation.java b/org.adempiere.ui/src/org/compiere/install/Translation.java index e473f165c5..7d2a6ca4a7 100644 --- a/org.adempiere.ui/src/org/compiere/install/Translation.java +++ b/org.adempiere.ui/src/org/compiere/install/Translation.java @@ -335,7 +335,7 @@ public class Translation + " INNER JOIN AD_Table t ON (c.AD_Table_ID=t.AD_Table_ID) " + "WHERE t.TableName=?" + " AND c.ColumnName NOT LIKE ? " - + " AND c.AD_Reference_ID IN (10,14) " + + " AND c.AD_Reference_ID IN (10,14,36) " + "ORDER BY IsMandatory DESC, ColumnName"; ArrayList list = new ArrayList(); try