From 1ec37be85439a544a97b414b717c9eea7637999e Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sat, 27 Jan 2024 13:32:00 +0100 Subject: [PATCH] IDEMPIERE-6015 Allow usage of _ID or _UU columns in print format item scripts (#2208) --- org.adempiere.base/src/org/compiere/print/DataEngine.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/print/DataEngine.java b/org.adempiere.base/src/org/compiere/print/DataEngine.java index dcfe630dd4..d2c5618e9b 100644 --- a/org.adempiere.base/src/org/compiere/print/DataEngine.java +++ b/org.adempiere.base/src/org/compiere/print/DataEngine.java @@ -1398,7 +1398,11 @@ public class DataEngine Object tokenPDE = pd.getNode(token); if (tokenPDE == null) return "\"Item not found: " + token + "\""; - Object value = ((PrintDataElement)tokenPDE).getValue(); + Object value; + if (token.endsWith("_ID") || token.endsWith("_UU")) + value = ((PrintDataElement)tokenPDE).getValueKey(); + else + value = ((PrintDataElement)tokenPDE).getValue(); outStr.append(value); } else if (token.equals("LINE"))