IDEMPIERE-489 Make use of AD_Language configuration

This commit is contained in:
Carlos Ruiz 2013-04-13 20:25:26 -05:00
parent 2261e10219
commit 02b7c217b3
5 changed files with 31 additions and 18 deletions

View File

@ -0,0 +1,8 @@
-- Apr 13, 2013 8:13:48 PM COT
-- IDEMPIERE-489 Make use of AD_Language configuration
UPDATE AD_Column SET AD_Reference_Value_ID=NULL, AD_Reference_ID=20, Updated=TO_DATE('2013-04-13 20:13:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=13080
;
SELECT register_migration_script('201304132014_IDEMPIERE-489.sql') FROM dual
;

View File

@ -0,0 +1,8 @@
-- Apr 13, 2013 8:13:48 PM COT
-- IDEMPIERE-489 Make use of AD_Language configuration
UPDATE AD_Column SET AD_Reference_Value_ID=NULL, AD_Reference_ID=20, Updated=TO_TIMESTAMP('2013-04-13 20:13:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=13080
;
SELECT register_migration_script('201304132014_IDEMPIERE-489.sql') FROM dual
;

View File

@ -182,12 +182,12 @@ public interface I_AD_Language
/** Set Decimal Point. /** Set Decimal Point.
* The number notation has a decimal point (no decimal comma) * The number notation has a decimal point (no decimal comma)
*/ */
public void setIsDecimalPoint (String IsDecimalPoint); public void setIsDecimalPoint (boolean IsDecimalPoint);
/** Get Decimal Point. /** Get Decimal Point.
* The number notation has a decimal point (no decimal comma) * The number notation has a decimal point (no decimal comma)
*/ */
public String getIsDecimalPoint(); public boolean isDecimalPoint();
/** Column name IsLoginLocale */ /** Column name IsLoginLocale */
public static final String COLUMNNAME_IsLoginLocale = "IsLoginLocale"; public static final String COLUMNNAME_IsLoginLocale = "IsLoginLocale";

View File

@ -30,7 +30,7 @@ public class X_AD_Language extends PO implements I_AD_Language, I_Persistent
/** /**
* *
*/ */
private static final long serialVersionUID = 20130315L; private static final long serialVersionUID = 20130413L;
/** Standard Constructor */ /** Standard Constructor */
public X_AD_Language (Properties ctx, int AD_Language_ID, String trxName) public X_AD_Language (Properties ctx, int AD_Language_ID, String trxName)
@ -214,28 +214,28 @@ public class X_AD_Language extends PO implements I_AD_Language, I_Persistent
return false; return false;
} }
/** IsDecimalPoint AD_Reference_ID=319 */
public static final int ISDECIMALPOINT_AD_Reference_ID=319;
/** Yes = Y */
public static final String ISDECIMALPOINT_Yes = "Y";
/** No = N */
public static final String ISDECIMALPOINT_No = "N";
/** Set Decimal Point. /** Set Decimal Point.
@param IsDecimalPoint @param IsDecimalPoint
The number notation has a decimal point (no decimal comma) The number notation has a decimal point (no decimal comma)
*/ */
public void setIsDecimalPoint (String IsDecimalPoint) public void setIsDecimalPoint (boolean IsDecimalPoint)
{ {
set_Value (COLUMNNAME_IsDecimalPoint, Boolean.valueOf(IsDecimalPoint));
set_Value (COLUMNNAME_IsDecimalPoint, IsDecimalPoint);
} }
/** Get Decimal Point. /** Get Decimal Point.
@return The number notation has a decimal point (no decimal comma) @return The number notation has a decimal point (no decimal comma)
*/ */
public String getIsDecimalPoint () public boolean isDecimalPoint ()
{ {
return (String)get_Value(COLUMNNAME_IsDecimalPoint); Object oo = get_Value(COLUMNNAME_IsDecimalPoint);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
} }
/** Set Login Locale. /** Set Login Locale.

View File

@ -154,9 +154,6 @@ public class Language implements Serializable
} }
MLanguage dblang = MLanguage.get(Env.getCtx(), langInfo); MLanguage dblang = MLanguage.get(Env.getCtx(), langInfo);
if (dblang != null) { if (dblang != null) {
Boolean decimalPoint = null;
if (dblang.getIsDecimalPoint() != null)
decimalPoint = "Y".equals(dblang.getIsDecimalPoint());
if (!( language.equals(dblang.getLanguageISO()) if (!( language.equals(dblang.getLanguageISO())
&& country.equals(dblang.getCountryCode()) && country.equals(dblang.getCountryCode())
) )
@ -168,7 +165,7 @@ public class Language implements Serializable
MPrintPaper pp = MPrintPaper.get(dblang.getAD_PrintPaper_ID()); MPrintPaper pp = MPrintPaper.get(dblang.getAD_PrintPaper_ID());
mediaSize = pp.getMediaSize(); mediaSize = pp.getMediaSize();
} }
ll = new Language(dblang.getPrintName(), langInfo, locale, decimalPoint, dblang.getDatePattern(), mediaSize); ll = new Language(dblang.getPrintName(), langInfo, locale, null, dblang.getDatePattern(), mediaSize);
ll.m_fromDB = true; ll.m_fromDB = true;
if (dblang.isBaseLanguage()) { if (dblang.isBaseLanguage()) {
idxReplace = 0; idxReplace = 0;