IDEMPIERE-5835 [Process Info] - Disallow Multiple Executions by different users (#2118)
- assign the default programatically to cover old 2Packs having this value as NULL
This commit is contained in:
parent
6f484ee701
commit
d4f5aabe64
|
@ -50,7 +50,12 @@ public class MProcess extends X_AD_Process implements ImmutablePOSupport
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 6928560924056836659L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -2068744950300991237L;
|
||||
|
||||
|
||||
/**
|
||||
* Get MProcess from Cache (immutable)
|
||||
|
@ -642,4 +647,16 @@ public class MProcess extends X_AD_Process implements ImmutablePOSupport
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called before Save for Pre-Save Operation
|
||||
* @param newRecord new record
|
||||
* @return true if record can be saved
|
||||
*/
|
||||
@Override
|
||||
protected boolean beforeSave(boolean newRecord) {
|
||||
if (getAllowMultipleExecution() == null)
|
||||
setAllowMultipleExecution(ALLOWMULTIPLEEXECUTION_NotFromSameUserAndParameters);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // MProcess
|
||||
|
|
Loading…
Reference in New Issue