IDEMPIERE-136 Tenant base language improvement

This commit is contained in:
Carlos Ruiz 2013-04-29 21:43:56 -05:00
parent f1231c0e63
commit 61d91207fd
1 changed files with 3 additions and 3 deletions

View File

@ -77,16 +77,16 @@ public class ChangeBaseLanguage extends SvrProcess
if (lang.isSystemLanguage())
throw new AdempiereUserError("Base language cannot be a system language");
MLanguage baselang = MLanguage.get(getCtx(), Language.getBaseAD_Language());
if (baselang.equals(p_Language))
if (Language.getBaseAD_Language().equals(p_Language))
throw new AdempiereUserError("Same base language");
// Disable the base flag on the actual
MLanguage baselang = MLanguage.get(getCtx(), Language.getBaseAD_Language());
baselang.setIsBaseLanguage(false);
baselang.saveEx(get_TrxName());
// Enable base flag on new language
lang.setIsBaseLanguage(false);
lang.setIsBaseLanguage(true);
lang.saveEx(get_TrxName());
Language.setBaseLanguage(p_Language);