IDEMPIERE-4766 Record ID button would be more useful if it shows the ID (#658)

This commit is contained in:
Carlos Ruiz 2021-04-19 14:48:01 +02:00 committed by GitHub
parent 9d059b13fe
commit a497e03b69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -177,6 +177,7 @@ public class WButtonEditor extends WEditor implements IProcessButton
getComponent().setIconSclass("z-icon-Zoom");
else
getComponent().setImage(ThemeManager.getThemeResource("images/Zoom16.png")); // 16*16
// NOTE the label of Record_ID button is overwritten in setValue
getComponent().setLabel(Msg.getMsg(Env.getCtx(), "ZoomDocument"));
}
else if (columnName.equals("Posted"))
@ -235,10 +236,14 @@ public class WButtonEditor extends WEditor implements IProcessButton
String text = m_text;
// Nothing to show or Record_ID
if (value == null || super.getColumnName().equals("Record_ID"))
if (value == null)
{
;
}
else if (super.getColumnName().equals("Record_ID"))
{
text = m_text + " (" + value.toString() + ")";
}
else if (super.getColumnName().equals("DocAction")
&& !MSysConfig.getBooleanValue(MSysConfig.DOCACTIONBUTTON_SHOWACTIONNAME, false, Env.getAD_Client_ID(Env.getCtx())))
{