ProcessedOn should not be copied by MOrder.copyFrom
Description
Environment
Attachments
Activity
Carlos RuizJune 17, 2013 at 11:19 PM
You were right Armen, solving it
Armen RizalJuly 13, 2012 at 2:37 PMEdited
Hi all,
This new implementation may lead to human error in implementation if we forget to uncheck Allow Copy for certain columns that in the past were not copied. So to enforce a strong check, I add more codes for those obvious columns.
WDYT ?
Armen
// Validations for IsAllowCopy - some columns must never be set as allowed copying
String colname = getColumnName();
if (isAllowCopy()) {
if ( isKey()
isStandardColumn() | |
---|---|
isVirtualColumn() | |
colname.equals(getAD_Table().getTableName()+"_UU") | |
colname.equals("EntityType") | colname.equals("DocumentNo") |
colname.equals("DocAction") | colname.equals("DocStatus") |
colname.equals("Processed") | colname.equals("Processing") |
colname.equals("ProcessedOn") | colname.equals("Posted") |
colname.equals("IsGenerated") | colname.equals("IsApproved") |
colname.equals("Line") | |
colname.startsWith("Ref_") |
)
setIsAllowCopy(false);
}
sorry, the codes I pasted here are somewhat losing format
Carlos RuizSeptember 12, 2011 at 1:18 AM
Carlos RuizSeptember 10, 2011 at 9:07 PM
Fixed in globalqss361 http://kenai.com/projects/adempiere361/sources/adempiere361/revision/6119
Will integrate to iDempiere later
Related to idempiere-63. When an order is copied it does not get a new document number when it is completed because filed ProcessedOn is not empty.
Proposed fix: ignore the field in PO.copyValues
Regards,
Dirk Niemeyer