From ed3c14270ec6ea2b94114de586564c1e9a0115fa Mon Sep 17 00:00:00 2001 From: Diego Ruiz <12065321+d-ruiz@users.noreply.github.com> Date: Tue, 30 Jun 2020 14:29:02 +0200 Subject: [PATCH] IDEMPIERE-4352 Jasper reports set the current language always to the login language (#149) --- .../src/org/adempiere/report/jasper/ReportStarter.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/org.adempiere.report.jasper/src/org/adempiere/report/jasper/ReportStarter.java b/org.adempiere.report.jasper/src/org/adempiere/report/jasper/ReportStarter.java index 2e22e8a1ad..0d7a7cd454 100644 --- a/org.adempiere.report.jasper/src/org/adempiere/report/jasper/ReportStarter.java +++ b/org.adempiere.report.jasper/src/org/adempiere/report/jasper/ReportStarter.java @@ -601,6 +601,12 @@ public class ReportStarter implements ProcessCall, ClientProcess //params.put("LoginLogo", reportPath); Language currLang = Env.getLanguage(Env.getCtx()); + if ((params.containsKey("AD_Language") && params.get("AD_Language") != null) || + (params.containsKey("CURRENT_LANG") && params.get("CURRENT_LANG") != null)) { + String langInfo = params.get("AD_Language") != null ? params.get("AD_Language").toString() : + params.get("CURRENT_LANG").toString(); + currLang = Language.getLanguage(langInfo); + } String printerName = null; MPrintFormat printFormat = null; PrintInfo printInfo = null;