IDEMPIERE-5629 Error when using context variables in info window view ID column (#1725)
This commit is contained in:
parent
0bdc997efe
commit
106cbc7e14
|
@ -1398,6 +1398,10 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
||||||
protected void prepareTable(ColumnInfo[] layout, String from, String where,
|
protected void prepareTable(ColumnInfo[] layout, String from, String where,
|
||||||
String orderBy) {
|
String orderBy) {
|
||||||
super.prepareTable(layout, from, where, orderBy);
|
super.prepareTable(layout, from, where, orderBy);
|
||||||
|
|
||||||
|
addViewIDToQuery();
|
||||||
|
addKeyViewToQuery();
|
||||||
|
|
||||||
if (m_sqlMain.indexOf("@") >= 0) {
|
if (m_sqlMain.indexOf("@") >= 0) {
|
||||||
String sql = Env.parseContext(infoContext, p_WindowNo, m_sqlMain, true);
|
String sql = Env.parseContext(infoContext, p_WindowNo, m_sqlMain, true);
|
||||||
if (sql == null || sql.length() == 0) {
|
if (sql == null || sql.length() == 0) {
|
||||||
|
@ -1406,10 +1410,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
||||||
m_sqlMain = sql;
|
m_sqlMain = sql;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addViewIDToQuery();
|
|
||||||
addKeyViewToQuery();
|
|
||||||
|
|
||||||
if (m_sqlMain.length() > 0 && infoWindow.isDistinct()) {
|
if (m_sqlMain.length() > 0 && infoWindow.isDistinct()) {
|
||||||
m_sqlMain = m_sqlMain.substring("SELECT ".length());
|
m_sqlMain = m_sqlMain.substring("SELECT ".length());
|
||||||
m_sqlMain = "SELECT DISTINCT " + m_sqlMain;
|
m_sqlMain = "SELECT DISTINCT " + m_sqlMain;
|
||||||
|
|
Loading…
Reference in New Issue