IDEMPIERE-1168 Master-detail issue with context variables (problem paying multiple invoices). Implement ~ prefix for current tab variable.
This commit is contained in:
parent
2aebb1b5ea
commit
0f04122f5b
|
@ -884,7 +884,15 @@ public class GridField
|
||||||
if( m_vo.TabNo == 0)
|
if( m_vo.TabNo == 0)
|
||||||
return Env.getContext (ctx, m_vo.WindowNo, variableName, true);
|
return Env.getContext (ctx, m_vo.WindowNo, variableName, true);
|
||||||
else
|
else
|
||||||
return Env.getContext (ctx, m_vo.WindowNo, m_vo.TabNo, variableName, false, true);
|
{
|
||||||
|
boolean tabOnly = false;
|
||||||
|
if (variableName.startsWith("~"))
|
||||||
|
{
|
||||||
|
variableName = variableName.substring(1);
|
||||||
|
tabOnly = true;
|
||||||
|
}
|
||||||
|
return Env.getContext (ctx, m_vo.WindowNo, m_vo.TabNo, variableName, tabOnly, true);
|
||||||
|
}
|
||||||
} // get_ValueAsString
|
} // get_ValueAsString
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -171,6 +171,10 @@ public class Evaluator
|
||||||
firstEval = defaultValue;
|
firstEval = defaultValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//NPE sanity check
|
||||||
|
if (firstEval == null)
|
||||||
|
firstEval = "";
|
||||||
|
|
||||||
firstEval = firstEval.replace('\'', ' ').replace('"', ' ').trim(); // strip ' and "
|
firstEval = firstEval.replace('\'', ' ').replace('"', ' ').trim(); // strip ' and "
|
||||||
|
|
||||||
// Comperator
|
// Comperator
|
||||||
|
@ -283,6 +287,8 @@ public class Evaluator
|
||||||
String variable = s.substring(0, pos);
|
String variable = s.substring(0, pos);
|
||||||
s = s.substring(pos+1);
|
s = s.substring(pos+1);
|
||||||
// log.fine( variable);
|
// log.fine( variable);
|
||||||
|
if (variable.startsWith("~"))
|
||||||
|
variable = variable.substring(1);
|
||||||
list.add(variable);
|
list.add(variable);
|
||||||
}
|
}
|
||||||
} // parseDepends
|
} // parseDepends
|
||||||
|
|
Loading…
Reference in New Issue