diff --git a/migration/360lts-release/oracle/831_IDEMPIERE-177_Window_Customization.sql b/migration/360lts-release/oracle/831_IDEMPIERE-177_Window_Customization.sql new file mode 100644 index 0000000000..0d5d416222 --- /dev/null +++ b/migration/360lts-release/oracle/831_IDEMPIERE-177_Window_Customization.sql @@ -0,0 +1,90 @@ +-- Apr 4, 2012 10:13:06 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='N',Updated=TO_DATE('2012-04-04 10:13:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6396 +; + +-- Apr 4, 2012 10:13:09 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +ALTER TABLE AD_UserDef_Win MODIFY Name NVARCHAR2(60) DEFAULT NULL +; + +-- Apr 4, 2012 10:13:10 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +ALTER TABLE AD_UserDef_Win MODIFY Name NULL +; + +-- Apr 4, 2012 10:13:27 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='Y', SeqNo=1,Updated=TO_DATE('2012-04-04 10:13:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6395 +; + +-- Apr 4, 2012 10:18:27 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='N',Updated=TO_DATE('2012-04-04 10:18:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6381 +; + +-- Apr 4, 2012 10:18:29 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +ALTER TABLE AD_UserDef_Tab MODIFY Name NVARCHAR2(60) DEFAULT NULL +; + +-- Apr 4, 2012 10:18:30 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +ALTER TABLE AD_UserDef_Tab MODIFY Name NULL +; + +-- Apr 4, 2012 10:18:47 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='Y', SeqNo=1,Updated=TO_DATE('2012-04-04 10:18:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6380 +; + +-- Apr 4, 2012 10:26:05 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET AD_Val_Rule_ID=158,Updated=TO_DATE('2012-04-04 10:26:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=13425 +; + +-- Apr 4, 2012 10:26:36 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +ALTER TABLE AD_UserDef_Field MODIFY DisplayLogic NVARCHAR2(2000) DEFAULT NULL +; + +-- Apr 4, 2012 10:26:36 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +ALTER TABLE AD_UserDef_Field MODIFY DisplayLogic NULL +; + +-- Apr 4, 2012 10:29:08 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET DefaultValue=NULL,Updated=TO_DATE('2012-04-04 10:29:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6351 +; + +-- Apr 4, 2012 10:29:11 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +ALTER TABLE AD_UserDef_Field MODIFY DisplayLogic NVARCHAR2(2000) DEFAULT NULL +; + +-- Apr 4, 2012 10:44:18 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='N',Updated=TO_DATE('2012-04-04 10:44:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6346 +; + +-- Apr 4, 2012 10:44:21 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +ALTER TABLE AD_UserDef_Field MODIFY Name NVARCHAR2(60) DEFAULT NULL +; + +-- Apr 4, 2012 10:44:21 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +ALTER TABLE AD_UserDef_Field MODIFY Name NULL +; + +-- Apr 4, 2012 10:44:36 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='Y', SeqNo=1,Updated=TO_DATE('2012-04-04 10:44:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6345 +; + +UPDATE AD_System + SET LastMigrationScriptApplied='831_IDEMPIERE-177_Window_Customization.sql' +WHERE LastMigrationScriptApplied<'831_IDEMPIERE-177_Window_Customization.sql' + OR LastMigrationScriptApplied IS NULL +; diff --git a/migration/360lts-release/postgresql/831_IDEMPIERE-177_Window_Customization.sql b/migration/360lts-release/postgresql/831_IDEMPIERE-177_Window_Customization.sql new file mode 100644 index 0000000000..36c589473a --- /dev/null +++ b/migration/360lts-release/postgresql/831_IDEMPIERE-177_Window_Customization.sql @@ -0,0 +1,75 @@ +-- Apr 4, 2012 10:13:06 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='N',Updated=TO_TIMESTAMP('2012-04-04 10:13:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6396 +; + +-- Apr 4, 2012 10:13:09 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +INSERT INTO t_alter_column values('ad_userdef_win','Name','VARCHAR(60)',null,'NULL') +; + +-- Apr 4, 2012 10:13:10 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +INSERT INTO t_alter_column values('ad_userdef_win','Name',null,'NULL',null) +; + +-- Apr 4, 2012 10:13:27 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='Y', SeqNo=1,Updated=TO_TIMESTAMP('2012-04-04 10:13:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6395 +; + +-- Apr 4, 2012 10:18:27 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='N',Updated=TO_TIMESTAMP('2012-04-04 10:18:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6381 +; + +-- Apr 4, 2012 10:18:29 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +INSERT INTO t_alter_column values('ad_userdef_tab','Name','VARCHAR(60)',null,'NULL') +; + +-- Apr 4, 2012 10:18:30 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +INSERT INTO t_alter_column values('ad_userdef_tab','Name',null,'NULL',null) +; + +-- Apr 4, 2012 10:18:47 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='Y', SeqNo=1,Updated=TO_TIMESTAMP('2012-04-04 10:18:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6380 +; + +-- Apr 4, 2012 10:29:08 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET DefaultValue=NULL,Updated=TO_TIMESTAMP('2012-04-04 10:29:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6351 +; + +-- Apr 4, 2012 10:29:11 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +INSERT INTO t_alter_column values('ad_userdef_field','DisplayLogic','VARCHAR(2000)',null,'NULL') +; + +-- Apr 4, 2012 10:44:18 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='N',Updated=TO_TIMESTAMP('2012-04-04 10:44:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6346 +; + +-- Apr 4, 2012 10:44:21 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +INSERT INTO t_alter_column values('ad_userdef_field','Name','VARCHAR(60)',null,'NULL') +; + +-- Apr 4, 2012 10:44:21 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +INSERT INTO t_alter_column values('ad_userdef_field','Name',null,'NULL',null) +; + +-- Apr 4, 2012 10:44:36 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='Y', SeqNo=1,Updated=TO_TIMESTAMP('2012-04-04 10:44:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6345 +; + +UPDATE AD_System + SET LastMigrationScriptApplied='831_IDEMPIERE-177_Window_Customization.sql' +WHERE LastMigrationScriptApplied<'831_IDEMPIERE-177_Window_Customization.sql' + OR LastMigrationScriptApplied IS NULL +; diff --git a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java index 5eb1868686..d322b88c47 100644 --- a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java +++ b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java @@ -221,7 +221,7 @@ public class GridFieldVO implements Serializable vo.IsSameLine = userDef.isSameLine(); vo.IsUpdateable = userDef.isUpdateable(); if (userDef.getDisplayLength() > 0) - vo.DisplayLength = userDef.getDisplayLength(); + vo.DisplayLength = userDef.getDisplayLength(); if (userDef.getDisplayLogic() != null) vo.DisplayLogic = userDef.getDisplayLogic(); if (userDef.getDefaultValue() != null) diff --git a/org.adempiere.base/src/org/compiere/model/GridTabVO.java b/org.adempiere.base/src/org/compiere/model/GridTabVO.java index 0ba49db8f8..3efeee92e9 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTabVO.java +++ b/org.adempiere.base/src/org/compiere/model/GridTabVO.java @@ -104,7 +104,7 @@ public class GridTabVO implements Evaluatee, Serializable // FR IDEMPIERE-177 MUserDefTab userDef = MUserDefTab.get(vo.ctx, vo.AD_Tab_ID, vo.AD_Window_ID); vo.Name = rs.getString("Name"); - if (userDef != null) + if (userDef != null && userDef.getName() != null) vo.Name = userDef.getName(); Env.setContext(vo.ctx, vo.WindowNo, vo.TabNo, GridTab.CTX_Name, vo.Name); @@ -163,7 +163,7 @@ public class GridTabVO implements Evaluatee, Serializable } if (rs.getString("IsReadOnly").equals("Y")) vo.IsReadOnly = true; - if (userDef != null) + if (userDef != null && userDef.get_ValueAsString("ReadOnlyLogic") != null) vo.IsReadOnly = userDef.isReadOnly(); vo.ReadOnlyLogic = rs.getString("ReadOnlyLogic"); if (userDef != null) diff --git a/org.adempiere.base/src/org/compiere/model/MUserDefWin.java b/org.adempiere.base/src/org/compiere/model/MUserDefWin.java index 21d2df1e57..f9d934ed24 100644 --- a/org.adempiere.base/src/org/compiere/model/MUserDefWin.java +++ b/org.adempiere.base/src/org/compiere/model/MUserDefWin.java @@ -180,7 +180,7 @@ public class MUserDefWin extends X_AD_UserDef_Win } } // prefer if related to current login language - if (weight[i] > -1 && candidates[i].getAD_Language().equalsIgnoreCase(Env.getAD_Language(ctx))) { + if (weight[i] > -1 && Env.getAD_Language(ctx).equalsIgnoreCase(candidates[i].getAD_Language())) { weight[i] = weight[i] + 8; } // others are implicit