IDEMPIERE-592 Copy window is copying inactive tabs and fields

This commit is contained in:
Carlos Ruiz 2013-01-23 16:04:57 -08:00
parent 17b194ede6
commit 3eb6bc9151
1 changed files with 6 additions and 6 deletions

View File

@ -73,19 +73,19 @@ public class WindowCopy extends SvrProcess
int tabCount = 0; int tabCount = 0;
int fieldCount = 0; int fieldCount = 0;
MTab[] oldTabs = from.getTabs(false, get_TrxName()); for (MTab oldTab : from.getTabs(false, get_TrxName()))
for (int i = 0; i < oldTabs.length; i++)
{ {
MTab oldTab = oldTabs[i]; if (! oldTab.isActive())
continue;
MTab newTab = new MTab (to, oldTab); MTab newTab = new MTab (to, oldTab);
if (newTab.save()) if (newTab.save())
{ {
tabCount++; tabCount++;
// Copy Fields // Copy Fields
MField[] oldFields = oldTab.getFields(false, get_TrxName()); for (MField oldField : oldTab.getFields(false, get_TrxName()))
for (int j = 0; j < oldFields.length; j++)
{ {
MField oldField = oldFields[j]; if (! oldField.isActive())
continue;
MField newField = new MField (newTab, oldField); MField newField = new MField (newTab, oldField);
if (newField.save()) if (newField.save())
fieldCount++; fieldCount++;