diff --git a/org.adempiere.base.process/src/org/compiere/process/TabCopy.java b/org.adempiere.base.process/src/org/compiere/process/TabCopy.java index b2f34cd1b7..fa9a07f369 100644 --- a/org.adempiere.base.process/src/org/compiere/process/TabCopy.java +++ b/org.adempiere.base.process/src/org/compiere/process/TabCopy.java @@ -73,11 +73,11 @@ public class TabCopy extends SvrProcess throw new AdempiereUserError("@Error@ @AD_Table_ID@"); int count = 0; - MField[] oldFields = from.getFields(false, get_TrxName()); - for (int i = 0; i < oldFields.length; i++) + for (MField oldField : from.getFields(false, get_TrxName())) { - MField oldField = oldFields[i]; MField newField = new MField (to, oldField); + if (! oldField.isActive()) + newField.setIsActive(false); if (newField.save()) count++; else diff --git a/org.adempiere.base.process/src/org/compiere/process/WindowCopy.java b/org.adempiere.base.process/src/org/compiere/process/WindowCopy.java index 33bb61b820..422bb62554 100644 --- a/org.adempiere.base.process/src/org/compiere/process/WindowCopy.java +++ b/org.adempiere.base.process/src/org/compiere/process/WindowCopy.java @@ -84,9 +84,9 @@ public class WindowCopy extends SvrProcess // Copy Fields for (MField oldField : oldTab.getFields(false, get_TrxName())) { - if (! oldField.isActive()) - continue; MField newField = new MField (newTab, oldField); + if (! oldField.isActive()) + newField.setIsActive(false); if (newField.save()) fieldCount++; else