From 073dfef2dedd1eea701fc452231dbec5da9d6b1c Mon Sep 17 00:00:00 2001 From: vpj-cd Date: Fri, 24 Jul 2009 06:07:38 +0000 Subject: [PATCH] The Order and Included Columns should be to fill mandatory http://sourceforge.net/tracker/?func=detail&aid=2826384&group_id=176962&atid=879335 --- base/src/org/compiere/model/MTab.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/base/src/org/compiere/model/MTab.java b/base/src/org/compiere/model/MTab.java index 8676e843e5..25ff5f99cb 100644 --- a/base/src/org/compiere/model/MTab.java +++ b/base/src/org/compiere/model/MTab.java @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.Properties; import java.util.logging.Level; +import org.adempiere.exceptions.AdempiereException; import org.compiere.util.CLogger; import org.compiere.util.DB; @@ -166,6 +167,18 @@ public class MTab extends X_AD_Tab // UPDATE AD_Tab SET IsInsertRecord='N' WHERE IsInsertRecord='Y' AND IsReadOnly='Y' if (isReadOnly() && isInsertRecord()) setIsInsertRecord(false); + if(isSortTab()) + { + if(getAD_ColumnSortOrder_ID() == 0) + { + throw new AdempiereException("@FillMandatory@ @AD_ColumnSortOrder_ID@"); + } + if(getAD_ColumnSortYesNo_ID() == 0) + { + throw new AdempiereException("@FillMandatory@ @AD_ColumnSortYesNo_ID@"); + } + + } return true; }