diff --git a/org.adempiere.base/src/org/compiere/model/MZoomCondition.java b/org.adempiere.base/src/org/compiere/model/MZoomCondition.java index 990a4114e4..2e1675fcd4 100644 --- a/org.adempiere.base/src/org/compiere/model/MZoomCondition.java +++ b/org.adempiere.base/src/org/compiere/model/MZoomCondition.java @@ -30,17 +30,18 @@ import org.idempiere.cache.ImmutablePOSupport; /** * Zoom Condition model * - * @author Nico + * @author Nicolas Micoud - TGI * @version $Id: MZoomCondition.java */ public class MZoomCondition extends X_AD_ZoomCondition implements ImmutablePOSupport { - /** - * - */ - private static final long serialVersionUID = -2472970418557589702L; /** + * + */ + private static final long serialVersionUID = 381986049328113973L; + + /** * UUID based Constructor * @param ctx Context * @param AD_ZoomCondition_UU UUID key @@ -404,4 +405,16 @@ public class MZoomCondition extends X_AD_ZoomCondition implements ImmutablePOSup return this; } + /** + * Before Save + * @param newRecord + * @return true if ok + */ + protected boolean beforeSave (boolean newRecord) { + if (getSeqNo() == 0) + setSeqNo(DB.getSQLValueEx(get_TrxName(), "SELECT COALESCE(MAX(SeqNo), 0) + 10 FROM AD_ZoomCondition WHERE AD_Table_ID = ?", getAD_Table_ID())); + + return true; + } + } // MZoomCondition \ No newline at end of file