diff --git a/migration/i2.0z/oracle/201406041804_IDEMPIERE-1792.sql b/migration/i2.0z/oracle/201406041804_IDEMPIERE-1792.sql new file mode 100644 index 0000000000..3e2ad07629 --- /dev/null +++ b/migration/i2.0z/oracle/201406041804_IDEMPIERE-1792.sql @@ -0,0 +1,11 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Jun 4, 2014 6:03:55 PM COT +-- IDEMPIERE-1792 Info Window - Default Logic missing +UPDATE AD_Field SET DisplayLogic='@IsQueryCriteria@=Y',Updated=TO_DATE('2014-06-04 18:03:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203048 +; + +SELECT register_migration_script('201406041804_IDEMPIERE-1792.sql') FROM dual +; + diff --git a/migration/i2.0z/postgresql/201406041804_IDEMPIERE-1792.sql b/migration/i2.0z/postgresql/201406041804_IDEMPIERE-1792.sql new file mode 100644 index 0000000000..066b7b9f32 --- /dev/null +++ b/migration/i2.0z/postgresql/201406041804_IDEMPIERE-1792.sql @@ -0,0 +1,8 @@ +-- Jun 4, 2014 6:03:55 PM COT +-- IDEMPIERE-1792 Info Window - Default Logic missing +UPDATE AD_Field SET DisplayLogic='@IsQueryCriteria@=Y',Updated=TO_TIMESTAMP('2014-06-04 18:03:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203048 +; + +SELECT register_migration_script('201406041804_IDEMPIERE-1792.sql') FROM dual +; + diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java index 7806409070..4a1434df0a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java @@ -1004,10 +1004,12 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL } fieldEditor.addEventListener(Events.ON_OK, this); - - // set default value - mField.addPropertyChangeListener(editor); - mField.setValue(mField.getDefault(), true); + + if (! Util.isEmpty(mField.getVO().DefaultValue, true)) { + // set default value + mField.addPropertyChangeListener(editor); + mField.setValue(mField.getDefault(), true); + } } // addSelectionColumn protected void addSearchParameter(Label label, Component fieldEditor) {