From c53e0f08c7148965fb7d9beb0c70669bc1bd135a Mon Sep 17 00:00:00 2001 From: Juliana Corredor Date: Sun, 23 Jun 2013 13:59:57 -0500 Subject: [PATCH] IDEMPIERE-1089 Document Type list in wrong language --- .../src/org/compiere/model/MLookupFactory.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MLookupFactory.java b/org.adempiere.base/src/org/compiere/model/MLookupFactory.java index faabcfb338..32722cefc0 100644 --- a/org.adempiere.base/src/org/compiere/model/MLookupFactory.java +++ b/org.adempiere.base/src/org/compiere/model/MLookupFactory.java @@ -360,8 +360,13 @@ public class MLookupFactory static private MLookupInfo getLookup_Table (Properties ctx, Language language, int WindowNo, int AD_Reference_Value_ID) { - // Try cache - assume no language change - StringBuilder key = new StringBuilder().append(Env.getAD_Client_ID(ctx)).append("|").append(String.valueOf(AD_Reference_Value_ID)); + String lang; + if (language == null) { + lang = Env.getAD_Language(Env.getCtx()); + } else { + lang = language.getAD_Language(); + } + StringBuilder key = new StringBuilder().append(Env.getAD_Client_ID(ctx)).append("|").append(lang).append("|").append(String.valueOf(AD_Reference_Value_ID)); MLookupInfo retValue = (MLookupInfo)s_cacheRefTable.get(key.toString()); if (retValue != null) {