IDEMPIERE-3599 allow DocActions to be selected in a more flexible way / Allow adding Reactivate on Closed

This commit is contained in:
Carlos Ruiz 2018-10-15 11:19:03 +02:00
parent 38ac6686fe
commit 7b8157861f
2 changed files with 4 additions and 2 deletions

View File

@ -61,7 +61,7 @@ public interface DocAction
/** Invalidate = IN */
public static final String ACTION_Invalidate = "IN";
/** ReOpen = OP */
public static final String ACTION_ReOpen = "OP";
// public static final String ACTION_ReOpen = "OP";
/** Drafted = DR */
public static final String STATUS_Drafted = "DR";

View File

@ -692,7 +692,7 @@ public class DocumentEngine implements DocAction
ACTION_Post, ACTION_Void};
if (isClosed())
return new String[] {ACTION_Post, ACTION_ReOpen};
return new String[] {ACTION_Post, ACTION_ReActivate};
if (isReversed() || isVoided())
return new String[] {ACTION_Post};
@ -965,11 +965,13 @@ public class DocumentEngine implements DocAction
options[index++] = DocumentEngine.ACTION_Void;
options[index++] = DocumentEngine.ACTION_Prepare;
}
/* IDEMPIERE-3599 - commented to allow adding options to these terminal status
// Closed, Voided, REversed .. CL/VO/RE
else if (docStatus.equals(DocumentEngine.STATUS_Closed)
|| docStatus.equals(DocumentEngine.STATUS_Voided)
|| docStatus.equals(DocumentEngine.STATUS_Reversed))
return 0;
*/
/********************
* Order