From 6fbb57307d5ab60b8f0b88462e78458c5e44bda8 Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Wed, 4 Jul 2018 16:16:19 +0200 Subject: [PATCH] IDEMPIERE-3738 Reference Color broken --- .../src/org/compiere/model/MColumn.java | 2 -- .../src/org/compiere/util/DisplayType.java | 11 +++-------- .../src/org/compiere/db/DB_Oracle.java | 2 +- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MColumn.java b/org.adempiere.base/src/org/compiere/model/MColumn.java index 9e848670ee..c00434657b 100644 --- a/org.adempiere.base/src/org/compiere/model/MColumn.java +++ b/org.adempiere.base/src/org/compiere/model/MColumn.java @@ -743,8 +743,6 @@ public class MColumn extends X_AD_Column foreignTable = "S_ResourceAssignment"; } else if (DisplayType.Image == refid) { foreignTable = "AD_Image"; - } else if (DisplayType.Color == refid) { - foreignTable = "AD_Color"; } else if (DisplayType.Chart == refid) { foreignTable = "AD_Chart"; } diff --git a/org.adempiere.base/src/org/compiere/util/DisplayType.java b/org.adempiere.base/src/org/compiere/util/DisplayType.java index fb7ac27013..e78f1c2fbb 100644 --- a/org.adempiere.base/src/org/compiere/util/DisplayType.java +++ b/org.adempiere.base/src/org/compiere/util/DisplayType.java @@ -199,7 +199,7 @@ public final class DisplayType if (displayType == ID || displayType == Table || displayType == TableDir || displayType == Search || displayType == Location || displayType == Locator || displayType == Account || displayType == Assignment || displayType == PAttribute - || displayType == Image || displayType == Chart || displayType == Color) + || displayType == Image || displayType == Chart) return true; List factoryList = Service.locator().list(IDisplayTypeFactory.class).getServices(); @@ -622,13 +622,8 @@ public final class DisplayType else return "VARCHAR2(" + fieldLength + ")"; } - if (displayType == DisplayType.Color) // this condition is never reached - filtered above in isID - { - if (columnName.endsWith("_ID")) - return "NUMBER(10)"; - else - return "CHAR(" + fieldLength + ")"; - } + if (displayType == DisplayType.Color) + return "VARCHAR2(" + fieldLength + ")"; if (displayType == DisplayType.Button) { if (columnName.endsWith("_ID")) diff --git a/org.compiere.db.oracle.provider/src/org/compiere/db/DB_Oracle.java b/org.compiere.db.oracle.provider/src/org/compiere/db/DB_Oracle.java index 8da0b11fc1..b589e1ebb0 100644 --- a/org.compiere.db.oracle.provider/src/org/compiere/db/DB_Oracle.java +++ b/org.compiere.db.oracle.provider/src/org/compiere/db/DB_Oracle.java @@ -925,7 +925,6 @@ public class DB_Oracle implements AdempiereDatabase // IDs case DisplayType.Account: case DisplayType.Assignment: - case DisplayType.Color: case DisplayType.ID: case DisplayType.Location: case DisplayType.Locator: @@ -979,6 +978,7 @@ public class DB_Oracle implements AdempiereDatabase break; // NVARCHAR + case DisplayType.Color: case DisplayType.Memo: case DisplayType.String: case DisplayType.Text: