IDEMPIERE-6015 Allow usage of _ID or _UU columns in print format item scripts (#2208)

This commit is contained in:
Carlos Ruiz 2024-01-27 13:32:00 +01:00
parent 2b785e3900
commit 1ec37be854
1 changed files with 5 additions and 1 deletions

View File

@ -1398,7 +1398,11 @@ public class DataEngine
Object tokenPDE = pd.getNode(token); Object tokenPDE = pd.getNode(token);
if (tokenPDE == null) if (tokenPDE == null)
return "\"Item not found: " + token + "\""; 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); outStr.append(value);
} }
else if (token.equals("LINE")) else if (token.equals("LINE"))