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:
Carlos Ruiz 2023-11-27 09:00:58 +01:00 committed by GitHub
parent 6f484ee701
commit d4f5aabe64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 1 deletions

View File

@ -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