diff --git a/base/src/org/adempiere/pipo/PackInHandler.java b/base/src/org/adempiere/pipo/PackInHandler.java
index 468459be1f..1bff4b3801 100644
--- a/base/src/org/adempiere/pipo/PackInHandler.java
+++ b/base/src/org/adempiere/pipo/PackInHandler.java
@@ -52,6 +52,7 @@ import org.adempiere.pipo.handler.CommonTranslationHandler;
import org.adempiere.pipo.handler.DataElementHandler;
import org.adempiere.pipo.handler.DistFileElementHandler;
import org.adempiere.pipo.handler.DynValRuleElementHandler;
+import org.adempiere.pipo.handler.EntityTypeElementHandler;
import org.adempiere.pipo.handler.FieldElementHandler;
import org.adempiere.pipo.handler.FieldGroupElementHandler;
import org.adempiere.pipo.handler.FormAccessElementHandler;
@@ -240,6 +241,7 @@ public class PackInHandler extends DefaultHandler {
handlers.put("element", new AdElementHandler());
handlers.put("trl", new CommonTranslationHandler());
handlers.put(ModelValidatorElementHandler.TAG_Name, new ModelValidatorElementHandler());
+ handlers.put(EntityTypeElementHandler.TAG_Name, new EntityTypeElementHandler());
}
/**
diff --git a/base/src/org/adempiere/pipo/PackOut.java b/base/src/org/adempiere/pipo/PackOut.java
index 2a8db4a012..93c33dc399 100644
--- a/base/src/org/adempiere/pipo/PackOut.java
+++ b/base/src/org/adempiere/pipo/PackOut.java
@@ -43,6 +43,7 @@ import org.adempiere.pipo.handler.CommonTranslationHandler;
import org.adempiere.pipo.handler.DataElementHandler;
import org.adempiere.pipo.handler.DistFileElementHandler;
import org.adempiere.pipo.handler.DynValRuleElementHandler;
+import org.adempiere.pipo.handler.EntityTypeElementHandler;
import org.adempiere.pipo.handler.FieldGroupElementHandler;
import org.adempiere.pipo.handler.FormElementHandler;
import org.adempiere.pipo.handler.ImpFormatElementHandler;
@@ -120,6 +121,7 @@ public class PackOut extends SvrProcess
AdElementHandler adElementHandler = new AdElementHandler();
CommonTranslationHandler translationHandler = new CommonTranslationHandler();
ModelValidatorElementHandler modelValidatorHandler = new ModelValidatorElementHandler();
+ EntityTypeElementHandler entitytypeHandler = new EntityTypeElementHandler();
/**
* Prepare - e.g., get Parameters.
@@ -311,6 +313,8 @@ public class PackOut extends SvrProcess
createPrintFormat(rs.getInt(X_AD_Package_Exp_Detail.COLUMNNAME_AD_PrintFormat_ID), packOutDocument);
else if (Type.compareTo(X_AD_Package_Exp_Detail.TYPE_ModelValidator) == 0)
createModelValidator(rs.getInt(X_AD_Package_Exp_Detail.COLUMNNAME_AD_ModelValidator_ID), packOutDocument);
+ else if (Type.compareTo(X_AD_Package_Exp_Detail.TYPE_EntityType) == 0)
+ createEntityType(rs.getInt(X_AD_Package_Exp_Detail.COLUMNNAME_AD_EntityType_ID), packOutDocument);
else if (Type.compareTo("C") == 0){
log.log(Level.INFO,"In PackOut.java handling Code or Other 2pack module creation");
@@ -807,6 +811,19 @@ public class PackOut extends SvrProcess
modelValidatorHandler.create(getCtx(), packOutDocument);
getCtx().remove(X_AD_Package_Exp_Detail.COLUMNNAME_AD_ModelValidator_ID);
}
+
+ /**
+ *
+ * @param AD_EntityType_ID
+ * @param packOutDocument
+ * @throws Exception
+ */
+ public void createEntityType (int AD_EntityType_ID, TransformerHandler packOutDocument) throws Exception
+ {
+ Env.setContext(getCtx(), X_AD_Package_Exp_Detail.COLUMNNAME_AD_EntityType_ID, AD_EntityType_ID);
+ entitytypeHandler.create(getCtx(), packOutDocument);
+ getCtx().remove(X_AD_Package_Exp_Detail.COLUMNNAME_AD_EntityType_ID);
+ }
public void copyFile (String sourceName, String copyName ) {
diff --git a/base/src/org/adempiere/pipo/handler/EntityTypeElementHandler.java b/base/src/org/adempiere/pipo/handler/EntityTypeElementHandler.java
new file mode 100644
index 0000000000..2408ab4cc9
--- /dev/null
+++ b/base/src/org/adempiere/pipo/handler/EntityTypeElementHandler.java
@@ -0,0 +1,161 @@
+/**
+ *
+ */
+package org.adempiere.pipo.handler;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import javax.xml.transform.sax.TransformerHandler;
+
+import org.adempiere.pipo.AbstractElementHandler;
+import org.adempiere.pipo.Element;
+import org.adempiere.pipo.PackOut;
+import org.adempiere.pipo.exception.POSaveFailedException;
+import org.compiere.model.I_AD_EntityType;
+import org.compiere.model.MEntityType;
+import org.compiere.model.PO;
+import org.compiere.model.X_AD_Package_Exp_Detail;
+import org.compiere.util.Env;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.AttributesImpl;
+
+/**
+ * @author Teo Sarca
+ *
FR [ 2847694 ] 2pack import/export AD_EntityType functionality
+ * https://sourceforge.net/tracker/?func=detail&atid=879335&aid=2847694&group_id=176962
+ */
+public class EntityTypeElementHandler extends AbstractElementHandler
+{
+ public static final String TAG_Name = "entitytype";
+
+ private final List entityTypes = new ArrayList();
+
+ public void startElement(Properties ctx, Element element) throws SAXException
+ {
+ final String elementValue = element.getElementValue();
+ final Attributes atts = element.attributes;
+ final String entitytype = atts.getValue(I_AD_EntityType.COLUMNNAME_EntityType);
+ log.info(elementValue+" "+entitytype);
+ if (isProcessElement(ctx, entitytype))
+ {
+ int id = get_IDWithColumn(ctx, I_AD_EntityType.Table_Name, I_AD_EntityType.COLUMNNAME_EntityType, entitytype);
+ final MEntityType entity = new MEntityType(ctx, id, getTrxName(ctx));
+ final int AD_Backup_ID;
+ final String Object_Status;
+ if (id <= 0 && getIntValue(atts, I_AD_EntityType.COLUMNNAME_AD_EntityType_ID, 0) <= PackOut.MAX_OFFICIAL_ID)
+ {
+ entity.setAD_EntityType_ID(getIntValue(atts, I_AD_EntityType.COLUMNNAME_AD_EntityType_ID, 0));
+ }
+ if (id > 0)
+ {
+ AD_Backup_ID = copyRecord(ctx, I_AD_EntityType.Table_Name, entity);
+ Object_Status = "Update";
+ }
+ else
+ {
+ Object_Status = "New";
+ AD_Backup_ID = 0;
+ }
+
+ entity.setName(getStringValue(atts, I_AD_EntityType.COLUMNNAME_Name));
+ entity.setDescription(getStringValue(atts, I_AD_EntityType.COLUMNNAME_Description));
+ entity.setHelp(getStringValue(atts, I_AD_EntityType.COLUMNNAME_Help));
+ entity.setEntityType(getStringValue(atts, I_AD_EntityType.COLUMNNAME_EntityType));
+ entity.setVersion(atts.getValue(I_AD_EntityType.COLUMNNAME_Version));
+ entity.setIsActive(getBooleanValue(atts, I_AD_EntityType.COLUMNNAME_IsActive, true));
+ entity.setModelPackage(getStringValue(atts, I_AD_EntityType.COLUMNNAME_ModelPackage));
+ entity.setClasspath(getStringValue(atts, I_AD_EntityType.COLUMNNAME_Classpath));
+ if (entity.save(getTrxName(ctx)) == true)
+ {
+ record_log (ctx, 1, entity.getEntityType(), TAG_Name, entity.get_ID(),
+ AD_Backup_ID, Object_Status,
+ I_AD_EntityType.Table_Name, I_AD_EntityType.Table_ID);
+ }
+ else
+ {
+ record_log (ctx, 0, entity.getEntityType(), TAG_Name, entity.get_ID(),
+ AD_Backup_ID, Object_Status,
+ I_AD_EntityType.Table_Name, I_AD_EntityType.Table_ID);
+ throw new POSaveFailedException("Failed to save message.");
+ }
+ }
+ else
+ {
+ element.skip = true;
+ }
+ }
+
+ public void endElement(Properties ctx, Element element) throws SAXException
+ {
+ }
+
+ public void create(Properties ctx, TransformerHandler document) throws SAXException
+ {
+ // TODO
+ final int AD_EntityType_ID = Env.getContextAsInt(ctx, X_AD_Package_Exp_Detail.COLUMNNAME_AD_EntityType_ID);
+ if (entityTypes.contains(AD_EntityType_ID))
+ return;
+ entityTypes.add(AD_EntityType_ID);
+
+
+ final MEntityType entity = new MEntityType(ctx, AD_EntityType_ID, null);
+ AttributesImpl atts = new AttributesImpl();
+ createMessageBinding(atts, entity);
+ document.startElement("", "", TAG_Name, atts);
+ document.endElement("", "", TAG_Name);
+ }
+
+ private AttributesImpl createMessageBinding(AttributesImpl atts, MEntityType entity)
+ {
+ atts.clear();
+ if (entity.getAD_EntityType_ID() <= PackOut.MAX_OFFICIAL_ID)
+ {
+ addAttribute(atts, I_AD_EntityType.COLUMNNAME_AD_EntityType_ID, entity);
+ }
+
+ addAttribute(atts, I_AD_EntityType.COLUMNNAME_Name, entity);
+ addAttribute(atts, I_AD_EntityType.COLUMNNAME_Description, entity);
+ addAttribute(atts, I_AD_EntityType.COLUMNNAME_Help, entity);
+ addAttribute(atts, I_AD_EntityType.COLUMNNAME_EntityType, entity);
+ addAttribute(atts, I_AD_EntityType.COLUMNNAME_Version, entity);
+ addAttribute(atts, I_AD_EntityType.COLUMNNAME_IsActive, entity);
+ addAttribute(atts, I_AD_EntityType.COLUMNNAME_ModelPackage, entity);
+ addAttribute(atts, I_AD_EntityType.COLUMNNAME_Classpath, entity);
+
+ return atts;
+ }
+
+ protected boolean getBooleanValue(Attributes atts, String qName, boolean defaultValue)
+ {
+ String s = atts.getValue(qName);
+ return s != null ? Boolean.valueOf(s) : defaultValue;
+ }
+
+ protected int getIntValue(Attributes atts, String qName, int defaultValue)
+ {
+ Object o = atts.getValue(qName);
+ if (o == null)
+ return defaultValue;
+ if (o instanceof Number)
+ return ((Number)o).intValue();
+ return Integer.parseInt(o.toString());
+ }
+
+ private final void addAttribute(AttributesImpl atts, String name, PO po)
+ {
+ Object value = po.get_Value(name);
+ atts.addAttribute("", "", name, "CDATA", toStringAttribute(value));
+ }
+
+ private final String toStringAttribute(Object value)
+ {
+ if (value == null)
+ return "";
+ if (value instanceof Boolean)
+ return ((Boolean)value).booleanValue() == true ? "true" : "false";
+ return value.toString();
+ }
+}
diff --git a/base/src/org/compiere/model/I_AD_Package_Exp_Detail.java b/base/src/org/compiere/model/I_AD_Package_Exp_Detail.java
index 41455b054a..e14672e877 100644
--- a/base/src/org/compiere/model/I_AD_Package_Exp_Detail.java
+++ b/base/src/org/compiere/model/I_AD_Package_Exp_Detail.java
@@ -49,6 +49,21 @@ public interface I_AD_Package_Exp_Detail
*/
public int getAD_Client_ID();
+ /** Column name AD_EntityType_ID */
+ public static final String COLUMNNAME_AD_EntityType_ID = "AD_EntityType_ID";
+
+ /** Set Entity Type.
+ * System Entity Type
+ */
+ public void setAD_EntityType_ID (int AD_EntityType_ID);
+
+ /** Get Entity Type.
+ * System Entity Type
+ */
+ public int getAD_EntityType_ID();
+
+ public I_AD_EntityType getAD_EntityType() throws RuntimeException;
+
/** Column name AD_Form_ID */
public static final String COLUMNNAME_AD_Form_ID = "AD_Form_ID";
diff --git a/base/src/org/compiere/model/X_AD_Package_Exp_Detail.java b/base/src/org/compiere/model/X_AD_Package_Exp_Detail.java
index 41c2eff7b2..7a175a3db3 100644
--- a/base/src/org/compiere/model/X_AD_Package_Exp_Detail.java
+++ b/base/src/org/compiere/model/X_AD_Package_Exp_Detail.java
@@ -76,6 +76,45 @@ public class X_AD_Package_Exp_Detail extends PO implements I_AD_Package_Exp_Deta
return sb.toString();
}
+ public I_AD_EntityType getAD_EntityType() throws RuntimeException
+ {
+ Class> clazz = MTable.getClass(I_AD_EntityType.Table_Name);
+ I_AD_EntityType result = null;
+ try {
+ Constructor> constructor = null;
+ constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
+ result = (I_AD_EntityType)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_EntityType_ID()), get_TrxName()});
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
+ log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
+ throw new RuntimeException( e );
+ }
+ return result;
+ }
+
+ /** Set Entity Type.
+ @param AD_EntityType_ID
+ System Entity Type
+ */
+ public void setAD_EntityType_ID (int AD_EntityType_ID)
+ {
+ if (AD_EntityType_ID < 1)
+ set_Value (COLUMNNAME_AD_EntityType_ID, null);
+ else
+ set_Value (COLUMNNAME_AD_EntityType_ID, Integer.valueOf(AD_EntityType_ID));
+ }
+
+ /** Get Entity Type.
+ @return System Entity Type
+ */
+ public int getAD_EntityType_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_AD_EntityType_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
public I_AD_Form getAD_Form() throws RuntimeException
{
Class> clazz = MTable.getClass(I_AD_Form.Table_Name);
@@ -1016,6 +1055,8 @@ public class X_AD_Package_Exp_Detail extends PO implements I_AD_Package_Exp_Deta
public static final String TYPE_Reference = "REF";
/** Model Validator = MV */
public static final String TYPE_ModelValidator = "MV";
+ /** Entity Type = ET */
+ public static final String TYPE_EntityType = "ET";
/** Set Type.
@param Type
Type of Validation (SQL, Java Script, Java Language)
diff --git a/migration/353a-trunk/oracle/552_FR2847694_2Pack_EntityType.sql b/migration/353a-trunk/oracle/552_FR2847694_2Pack_EntityType.sql
new file mode 100644
index 0000000000..52c9deef41
--- /dev/null
+++ b/migration/353a-trunk/oracle/552_FR2847694_2Pack_EntityType.sql
@@ -0,0 +1,215 @@
+-- Aug 31, 2009 3:38:40 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Ref_List_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53505,50004,TO_DATE('2009-08-31 15:38:40','YYYY-MM-DD HH24:MI:SS'),0,'D','Y','Entity Type',TO_DATE('2009-08-31 15:38:40','YYYY-MM-DD HH24:MI:SS'),0,'ET')
+;
+
+-- Aug 31, 2009 3:38:40 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53505 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID)
+;
+
+-- Aug 31, 2009 3:39:50 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,57959,3052,0,30,50006,'AD_EntityType_ID',TO_DATE('2009-08-31 15:39:50','YYYY-MM-DD HH24:MI:SS'),0,'System Entity Type','D',10,'The entity type determines the ownership of Application Dictionary entries. The types "Dictionary" and "Adempiere" should not be used and are maintainted by Adempiere (i.e. all changes are reversed during migration to the current definition).','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Entity Type',0,TO_DATE('2009-08-31 15:39:50','YYYY-MM-DD HH24:MI:SS'),0,0)
+;
+
+-- Aug 31, 2009 3:39:50 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=57959 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Aug 31, 2009 3:39:57 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+ALTER TABLE AD_Package_Exp_Detail ADD AD_EntityType_ID NUMBER(10) DEFAULT NULL
+;
+
+-- Aug 31, 2009 3:40:26 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,57959,57419,0,50006,TO_DATE('2009-08-31 15:40:25','YYYY-MM-DD HH24:MI:SS'),0,'System Entity Type',10,'D','The entity type determines the ownership of Application Dictionary entries. The types "Dictionary" and "Adempiere" should not be used and are maintainted by Adempiere (i.e. all changes are reversed during migration to the current definition).','Y','Y','Y','N','N','N','N','N','Entity Type',TO_DATE('2009-08-31 15:40:25','YYYY-MM-DD HH24:MI:SS'),0)
+;
+
+-- Aug 31, 2009 3:40:26 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=57419 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
+;
+
+-- Aug 31, 2009 3:40:38 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=50182
+;
+
+-- Aug 31, 2009 3:40:38 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=50183
+;
+
+-- Aug 31, 2009 3:40:38 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=50187
+;
+
+-- Aug 31, 2009 3:40:38 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=50116
+;
+
+-- Aug 31, 2009 3:40:38 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=50117
+;
+
+-- Aug 31, 2009 3:40:38 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=53284
+;
+
+-- Aug 31, 2009 3:40:38 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=57418
+;
+
+-- Aug 31, 2009 3:40:38 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=57419
+;
+
+-- Aug 31, 2009 3:40:57 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET DisplayLogic='@Type@=ET',Updated=TO_DATE('2009-08-31 15:40:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=57419
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=57419
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=50097
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=50098
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=50099
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=50100
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=50101
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=50102
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=50103
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=50104
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=50105
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=50106
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=50107
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=50108
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=50109
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=50110
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=50111
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=50112
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=50113
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=50114
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=50115
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=50182
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=50183
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=50187
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=50116
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=50117
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=53284
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=57418
+;
+
diff --git a/migration/353a-trunk/postgresql/552_FR2847694_2Pack_EntityType.sql b/migration/353a-trunk/postgresql/552_FR2847694_2Pack_EntityType.sql
new file mode 100644
index 0000000000..5b751ebc46
--- /dev/null
+++ b/migration/353a-trunk/postgresql/552_FR2847694_2Pack_EntityType.sql
@@ -0,0 +1,215 @@
+-- Aug 31, 2009 3:38:40 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Ref_List_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53505,50004,TO_TIMESTAMP('2009-08-31 15:38:40','YYYY-MM-DD HH24:MI:SS'),0,'D','Y','Entity Type',TO_TIMESTAMP('2009-08-31 15:38:40','YYYY-MM-DD HH24:MI:SS'),0,'ET')
+;
+
+-- Aug 31, 2009 3:38:40 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53505 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID)
+;
+
+-- Aug 31, 2009 3:39:50 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,57959,3052,0,30,50006,'AD_EntityType_ID',TO_TIMESTAMP('2009-08-31 15:39:50','YYYY-MM-DD HH24:MI:SS'),0,'System Entity Type','D',10,'The entity type determines the ownership of Application Dictionary entries. The types "Dictionary" and "Adempiere" should not be used and are maintainted by Adempiere (i.e. all changes are reversed during migration to the current definition).','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Entity Type',0,TO_TIMESTAMP('2009-08-31 15:39:50','YYYY-MM-DD HH24:MI:SS'),0,0)
+;
+
+-- Aug 31, 2009 3:39:50 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=57959 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
+;
+
+-- Aug 31, 2009 3:39:57 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+ALTER TABLE AD_Package_Exp_Detail ADD COLUMN AD_EntityType_ID NUMERIC(10) DEFAULT NULL
+;
+
+-- Aug 31, 2009 3:40:26 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,57959,57419,0,50006,TO_TIMESTAMP('2009-08-31 15:40:25','YYYY-MM-DD HH24:MI:SS'),0,'System Entity Type',10,'D','The entity type determines the ownership of Application Dictionary entries. The types "Dictionary" and "Adempiere" should not be used and are maintainted by Adempiere (i.e. all changes are reversed during migration to the current definition).','Y','Y','Y','N','N','N','N','N','Entity Type',TO_TIMESTAMP('2009-08-31 15:40:25','YYYY-MM-DD HH24:MI:SS'),0)
+;
+
+-- Aug 31, 2009 3:40:26 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=57419 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
+;
+
+-- Aug 31, 2009 3:40:38 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=50182
+;
+
+-- Aug 31, 2009 3:40:38 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=50183
+;
+
+-- Aug 31, 2009 3:40:38 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=50187
+;
+
+-- Aug 31, 2009 3:40:38 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=50116
+;
+
+-- Aug 31, 2009 3:40:38 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=50117
+;
+
+-- Aug 31, 2009 3:40:38 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=53284
+;
+
+-- Aug 31, 2009 3:40:38 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=57418
+;
+
+-- Aug 31, 2009 3:40:38 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=57419
+;
+
+-- Aug 31, 2009 3:40:57 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET DisplayLogic='@Type@=ET',Updated=TO_TIMESTAMP('2009-08-31 15:40:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=57419
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=57419
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=50097
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=50098
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=50099
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=50100
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=50101
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=50102
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=50103
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=50104
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=50105
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=50106
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=50107
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=50108
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=50109
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=50110
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=50111
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=50112
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=50113
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=50114
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=50115
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=50182
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=50183
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=50187
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=50116
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=50117
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=53284
+;
+
+-- Aug 31, 2009 3:41:43 PM EEST
+-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
+UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=57418
+;
+