IDEMPIERE-2957 Account Combination mismatch between multiple orgs/schemas

This commit is contained in:
Carlos Ruiz 2018-08-06 21:05:37 +02:00
parent 4fab960043
commit 320b194b97
1 changed files with 5 additions and 1 deletions

View File

@ -96,7 +96,11 @@ public class WAccountEditor extends WEditor implements ContextMenuListener
*/
public void cmd_button()
{
int C_AcctSchema_ID = Env.getContextAsInt(Env.getCtx(), gridField.getWindowNo(), "C_AcctSchema_ID");
int C_AcctSchema_ID;
if (gridField.getGridTab() != null)
C_AcctSchema_ID = Env.getContextAsInt(Env.getCtx(), gridField.getWindowNo(), gridField.getGridTab().getTabNo(), "C_AcctSchema_ID");
else
C_AcctSchema_ID = Env.getContextAsInt(Env.getCtx(), gridField.getWindowNo(), "C_AcctSchema_ID");
// Try to get C_AcctSchema_ID from global context - teo_sarca BF [ 1830531 ]
if (C_AcctSchema_ID <= 0)
{