IDEMPIERE-3898 Wrong value for Print Format Item when exporting to excel and AD_Column_ID > 0 with type != field
This commit is contained in:
parent
9aeb90550f
commit
c0b2c25de3
|
@ -58,10 +58,14 @@ extends AbstractExcelExporter
|
||||||
m_printData.setRowIndex(row);
|
m_printData.setRowIndex(row);
|
||||||
//
|
//
|
||||||
MPrintFormatItem item = m_printFormat.getItem(col);
|
MPrintFormatItem item = m_printFormat.getItem(col);
|
||||||
int AD_Column_ID = item.getAD_Column_ID();
|
|
||||||
Object obj = null;
|
Object obj = null;
|
||||||
if (AD_Column_ID > 0)
|
|
||||||
obj = m_printData.getNode(Integer.valueOf(AD_Column_ID));
|
if (item.isTypeField() || item.isTypePrintFormat() && item.isImageField()) {
|
||||||
|
int AD_Column_ID = item.getAD_Column_ID();
|
||||||
|
if (AD_Column_ID > 0)
|
||||||
|
obj = m_printData.getNode(Integer.valueOf(AD_Column_ID));
|
||||||
|
}
|
||||||
|
|
||||||
if (obj != null && obj instanceof PrintDataElement) {
|
if (obj != null && obj instanceof PrintDataElement) {
|
||||||
return (PrintDataElement)obj;
|
return (PrintDataElement)obj;
|
||||||
}
|
}
|
||||||
|
|
|
@ -649,6 +649,9 @@ public class MPrintFormatItem extends X_AD_PrintFormatItem
|
||||||
setImageIsAttached(false);
|
setImageIsAttached(false);
|
||||||
setImageURL(null);
|
setImageURL(null);
|
||||||
}
|
}
|
||||||
|
if (!isTypeField() && !isTypePrintFormat() && !isImageField()) {
|
||||||
|
setAD_Column_ID(0);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
} // beforeSave
|
} // beforeSave
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue