diff --git a/org.adempiere.base/src/org/compiere/model/MOrgInfo.java b/org.adempiere.base/src/org/compiere/model/MOrgInfo.java index 80cce0f6f8..baafac70fc 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrgInfo.java +++ b/org.adempiere.base/src/org/compiere/model/MOrgInfo.java @@ -186,5 +186,15 @@ public class MOrgInfo extends X_AD_OrgInfo implements ImmutablePOSupport makeImmutable(); return this; } + + @Override + protected boolean beforeSave(boolean newRecord) { + if(!newRecord && getParent_Org_ID()==get_ID()){ + log.saveError("Error", "Parent_Org_ID=AD_Org_ID"); + return false; + } + + return true; + } }