ProcessedOn should not be copied by MOrder.copyFrom

Description

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

Environment

None

Attachments

1

Activity

Show:

Carlos RuizJune 17, 2013 at 11:19 PM

You were right Armen, solving it

Armen RizalJuly 13, 2012 at 2:37 PM
Edited

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")
// Goodwill: enforce

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

Fixed

Details

Assignee

Reporter

Components

Priority

Created September 5, 2011 at 11:01 PM
Updated March 13, 2014 at 2:20 PM
Resolved September 19, 2011 at 3:41 AM