diff --git a/base/src/org/compiere/model/X_AD_Color.java b/base/src/org/compiere/model/X_AD_Color.java index 46c990df24..c9ec568d94 100644 --- a/base/src/org/compiere/model/X_AD_Color.java +++ b/base/src/org/compiere/model/X_AD_Color.java @@ -42,7 +42,7 @@ super (ctx, AD_Color_ID, trxName); setAD_Color_ID (0); setAlpha (0); setBlue (0); -setColorType (0); +setColorType (null); setGreen (0); setImageAlpha (Env.ZERO); setIsDefault (false); @@ -205,20 +205,23 @@ public static final String COLORTYPE_Line = "L"; public static final String COLORTYPE_TexturePicture = "T"; /** Set Color Type. @param ColorType Color presentation for this color */ -public void setColorType (int ColorType) +public void setColorType (String ColorType) { if (ColorType == null) throw new IllegalArgumentException ("ColorType is mandatory"); if (ColorType.equals("F") || ColorType.equals("G") || ColorType.equals("L") || ColorType.equals("T")); else throw new IllegalArgumentException ("ColorType Invalid value - " + ColorType + " - Reference_ID=243 - F - G - L - T"); -set_Value ("ColorType", Integer.valueOf(ColorType)); +if (ColorType.length() > 1) +{ +log.warning("Length > 1 - truncated"); +ColorType = ColorType.substring(0,0); +} +set_Value ("ColorType", ColorType); } /** Get Color Type. @return Color presentation for this color */ -public int getColorType() +public String getColorType() { -Integer ii = (Integer)get_Value("ColorType"); -if (ii == null) return 0; -return ii.intValue(); +return (String)get_Value("ColorType"); } /** Column name ColorType */ public static final String COLUMNNAME_ColorType = "ColorType"; diff --git a/base/src/org/compiere/util/DisplayType.java b/base/src/org/compiere/util/DisplayType.java index 23a8368cbe..aecc8808bd 100644 --- a/base/src/org/compiere/util/DisplayType.java +++ b/base/src/org/compiere/util/DisplayType.java @@ -85,7 +85,7 @@ public final class DisplayType public static final int TextLong = 36; /** Display Type 37 CostPrice */ public static final int CostPrice = 37; - /** Display Type 36 File Path */ + /** Display Type 38 File Path */ public static final int FilePath = 38; /** Display Type 39 File Name */ public static final int FileName = 39; diff --git a/migration/320-trunk/026_BF_1759181.sql b/migration/320-trunk/026_BF_1759181.sql new file mode 100644 index 0000000000..19ea38ff0c --- /dev/null +++ b/migration/320-trunk/026_BF_1759181.sql @@ -0,0 +1,10 @@ +/* + Fix bug in Application Dictionary + [ 1759181 ] AD_Color.ColorType is defined as Color and must be List +*/ + +UPDATE AD_COLUMN + SET ad_reference_id = 17 + WHERE ad_column_id = 6232 AND ad_reference_id = 27; + +COMMIT; \ No newline at end of file diff --git a/migration/320-trunk/postgresql/026_BF_1759181.sql b/migration/320-trunk/postgresql/026_BF_1759181.sql new file mode 100644 index 0000000000..19ea38ff0c --- /dev/null +++ b/migration/320-trunk/postgresql/026_BF_1759181.sql @@ -0,0 +1,10 @@ +/* + Fix bug in Application Dictionary + [ 1759181 ] AD_Color.ColorType is defined as Color and must be List +*/ + +UPDATE AD_COLUMN + SET ad_reference_id = 17 + WHERE ad_column_id = 6232 AND ad_reference_id = 27; + +COMMIT; \ No newline at end of file