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@");
|
throw new AdempiereUserError("@Error@ @AD_Table_ID@");
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
MField[] oldFields = from.getFields(false, get_TrxName());
|
for (MField oldField : from.getFields(false, get_TrxName()))
|
||||||
for (int i = 0; i < oldFields.length; i++)
|
|
||||||
{
|
{
|
||||||
MField oldField = oldFields[i];
|
|
||||||
MField newField = new MField (to, oldField);
|
MField newField = new MField (to, oldField);
|
||||||
|
if (! oldField.isActive())
|
||||||
|
newField.setIsActive(false);
|
||||||
if (newField.save())
|
if (newField.save())
|
||||||
count++;
|
count++;
|
||||||
else
|
else
|
||||||
|
|
|
@ -84,9 +84,9 @@ public class WindowCopy extends SvrProcess
|
||||||
// Copy Fields
|
// Copy Fields
|
||||||
for (MField oldField : oldTab.getFields(false, get_TrxName()))
|
for (MField oldField : oldTab.getFields(false, get_TrxName()))
|
||||||
{
|
{
|
||||||
if (! oldField.isActive())
|
|
||||||
continue;
|
|
||||||
MField newField = new MField (newTab, oldField);
|
MField newField = new MField (newTab, oldField);
|
||||||
|
if (! oldField.isActive())
|
||||||
|
newField.setIsActive(false);
|
||||||
if (newField.save())
|
if (newField.save())
|
||||||
fieldCount++;
|
fieldCount++;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue