IDEMPIERE-1027 inactive fields are not or wrong copied in WindowCopy/TabCopy process
This commit is contained in:
parent
e34e51ce3b
commit
bd13bead02
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue