From 965048d168f88c50203952978b26da3406762a93 Mon Sep 17 00:00:00 2001 From: Deepak Pansheriya Date: Thu, 24 Sep 2020 20:47:51 +0530 Subject: [PATCH] =?UTF-8?q?IDEMPIERE-2955:=20Adding=20Attribute=20Set=20Ty?= =?UTF-8?q?pe=20to=20use=20attribute=20set=20for=20di=E2=80=A6=20(#264)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * IDEMPIERE-2955: Adding Attribute Set Type to use attribute set for different purpose * IDEMPIERE-2955: Fixing migration files swept between Oracle and postgresql folder. * IDEMPIERE-2955: Fixing oracle migration script having mistakenly deleted comments --- .../oracle/201602161510_IDEMPIERE-2955.sql | 50 +++++++++++++++++++ .../201602161510_IDEMPIERE-2955.sql | 47 +++++++++++++++++ .../org/compiere/model/I_M_AttributeSet.java | 9 ++++ .../org/compiere/model/X_M_AttributeSet.java | 23 ++++++++- 4 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 migration/i7.1z/oracle/201602161510_IDEMPIERE-2955.sql create mode 100644 migration/i7.1z/postgresql/201602161510_IDEMPIERE-2955.sql diff --git a/migration/i7.1z/oracle/201602161510_IDEMPIERE-2955.sql b/migration/i7.1z/oracle/201602161510_IDEMPIERE-2955.sql new file mode 100644 index 0000000000..fd2c9dfce5 --- /dev/null +++ b/migration/i7.1z/oracle/201602161510_IDEMPIERE-2955.sql @@ -0,0 +1,50 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- IDEMPIERE-2955 Adding Attribute set type field (M_AttributeSet_Type), support DMS/MM +-- Dec 2, 2015 11:53:13 AM IST +INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (202952,0,0,'Y',TO_DATE('2015-12-02 11:53:12','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-12-02 11:53:12','YYYY-MM-DD HH24:MI:SS'),100,'M_AttributeSet_Type','AttributeSet Type','AttributeSet Type','D','7b193413-66ff-4a9b-a4e3-73cacc8d413d') +; + +-- Dec 2, 2015 11:53:49 AM IST +INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,DefaultValue) VALUES (212554,0,'AttributeSet Type',560,'M_AttributeSet_Type',3,'N','N','Y','N','N',0,'N',17,0,0,'Y',TO_DATE('2015-12-02 11:53:44','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-12-02 11:53:44','YYYY-MM-DD HH24:MI:SS'),100,202952,'Y','N','D','N','N','N','Y','b0f70177-747f-4e25-9d88-df4111f43712','Y',0,'N','N','MMS') +; + +-- Dec 2, 2015 11:54:23 AM IST +INSERT INTO AD_Reference (AD_Reference_ID,Name,ValidationType,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,IsOrderByValue,AD_Reference_UU) VALUES (200115,'AttributeSet Type','L',0,0,'Y',TO_DATE('2015-12-02 11:54:22','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-12-02 11:54:22','YYYY-MM-DD HH24:MI:SS'),100,'D','N','dc52c0cb-adec-4c9e-a176-29ca09f0072e') +; + +-- Dec 2, 2015 11:56:12 AM IST +INSERT INTO AD_Ref_List (AD_Ref_List_ID,Name,AD_Reference_ID,Value,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,AD_Ref_List_UU) VALUES (200344,'Material Management System',200115,'MMS',0,0,'Y',TO_DATE('2015-12-02 11:56:10','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-12-02 11:56:10','YYYY-MM-DD HH24:MI:SS'),100,'D','4455f892-2ea1-499d-a0b9-c01b3226f97d') +; + +-- Dec 2, 2015 11:56:29 AM IST +UPDATE AD_Column SET AD_Reference_Value_ID=200115,Updated=TO_DATE('2015-12-02 11:56:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212554 +; + +-- Dec 2, 2015 11:56:42 AM IST +ALTER TABLE M_AttributeSet ADD M_AttributeSet_Type VARCHAR2(3 CHAR) DEFAULT 'MMS' +; + +-- Dec 2, 2015 12:01:46 PM IST +INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (204081,'AttributeSet Type',461,212554,'Y',0,220,0,'N','N','N','N',0,0,'Y',TO_DATE('2015-12-02 12:01:45','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-12-02 12:01:45','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','caa0a379-b7c5-4485-ba5b-5d4bff21d144','Y',210,1,1,1,'N','N','N') +; + +-- Dec 2, 2015 12:03:35 PM IST +UPDATE AD_Field SET SeqNo=220, ColumnSpan=2,Updated=TO_DATE('2015-12-02 12:03:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204081 +; + +-- Mar 10, 2016 8:08:28 PM IST +INSERT INTO AD_Val_Rule (AD_Val_Rule_ID,Name,Description,Type,Code,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,AD_Val_Rule_UU) VALUES (200093,'AttributeSetMMS','Get MMS type AttributeSet','S','M_AttributeSet_Type=''MMS''',0,0,'Y',TO_DATE('2016-03-10 20:08:27','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-03-10 20:08:27','YYYY-MM-DD HH24:MI:SS'),100,'D','1dc169ec-e8ac-4d7a-91d4-fa7789170cf1') +; + +-- Mar 10, 2016 8:35:47 PM IST +UPDATE AD_Column SET AD_Val_Rule_ID=200093,Updated=TO_DATE('2016-03-10 20:35:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=8417 +; + +-- Sep 14, 2020, 6:30:08 PM IST +UPDATE AD_InfoColumn SET AD_Val_Rule_ID=200093, SeqNoSelection=10,Updated=TO_DATE('2020-09-14 18:30:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200007 +; + +SELECT register_migration_script('201602161510_IDEMPIERE-2955.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i7.1z/postgresql/201602161510_IDEMPIERE-2955.sql b/migration/i7.1z/postgresql/201602161510_IDEMPIERE-2955.sql new file mode 100644 index 0000000000..c2384f98b3 --- /dev/null +++ b/migration/i7.1z/postgresql/201602161510_IDEMPIERE-2955.sql @@ -0,0 +1,47 @@ +-- IDEMPIERE-2955 Adding Attribute set type field (M_AttributeSet_Type), support DMS/MM +-- Dec 2, 2015 11:53:13 AM IST +INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (202952,0,0,'Y',TO_TIMESTAMP('2015-12-02 11:53:12','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-12-02 11:53:12','YYYY-MM-DD HH24:MI:SS'),100,'M_AttributeSet_Type','AttributeSet Type','AttributeSet Type','D','7b193413-66ff-4a9b-a4e3-73cacc8d413d') +; + +-- Dec 2, 2015 11:53:49 AM IST +INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,DefaultValue) VALUES (212554,0,'AttributeSet Type',560,'M_AttributeSet_Type',3,'N','N','Y','N','N',0,'N',17,0,0,'Y',TO_TIMESTAMP('2015-12-02 11:53:44','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-12-02 11:53:44','YYYY-MM-DD HH24:MI:SS'),100,202952,'Y','N','D','N','N','N','Y','b0f70177-747f-4e25-9d88-df4111f43712','Y',0,'N','N','MMS') +; + +-- Dec 2, 2015 11:54:23 AM IST +INSERT INTO AD_Reference (AD_Reference_ID,Name,ValidationType,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,IsOrderByValue,AD_Reference_UU) VALUES (200115,'AttributeSet Type','L',0,0,'Y',TO_TIMESTAMP('2015-12-02 11:54:22','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-12-02 11:54:22','YYYY-MM-DD HH24:MI:SS'),100,'D','N','dc52c0cb-adec-4c9e-a176-29ca09f0072e') +; + +-- Dec 2, 2015 11:56:12 AM IST +INSERT INTO AD_Ref_List (AD_Ref_List_ID,Name,AD_Reference_ID,Value,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,AD_Ref_List_UU) VALUES (200344,'Material Management System',200115,'MMS',0,0,'Y',TO_TIMESTAMP('2015-12-02 11:56:10','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-12-02 11:56:10','YYYY-MM-DD HH24:MI:SS'),100,'D','4455f892-2ea1-499d-a0b9-c01b3226f97d') +; + +-- Dec 2, 2015 11:56:29 AM IST +UPDATE AD_Column SET AD_Reference_Value_ID=200115,Updated=TO_TIMESTAMP('2015-12-02 11:56:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212554 +; + +-- Dec 2, 2015 11:56:42 AM IST +ALTER TABLE M_AttributeSet ADD COLUMN M_AttributeSet_Type VARCHAR(3) DEFAULT 'MMS' +; + +-- Dec 2, 2015 12:01:46 PM IST +INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,SortNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines,IsQuickEntry,IsDefaultFocus,IsAdvancedField) VALUES (204081,'AttributeSet Type',461,212554,'Y',0,220,0,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-12-02 12:01:45','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-12-02 12:01:45','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','caa0a379-b7c5-4485-ba5b-5d4bff21d144','Y',210,1,1,1,'N','N','N') +; + +-- Dec 2, 2015 12:03:35 PM IST +UPDATE AD_Field SET SeqNo=220, ColumnSpan=2,Updated=TO_TIMESTAMP('2015-12-02 12:03:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204081 +; + +-- Mar 10, 2016 8:08:28 PM IST +INSERT INTO AD_Val_Rule (AD_Val_Rule_ID,Name,Description,Type,Code,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,AD_Val_Rule_UU) VALUES (200093,'AttributeSetMMS','Get MMS type AttributeSet','S','M_AttributeSet_Type=''MMS''',0,0,'Y',TO_TIMESTAMP('2016-03-10 20:08:27','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-03-10 20:08:27','YYYY-MM-DD HH24:MI:SS'),100,'D','1dc169ec-e8ac-4d7a-91d4-fa7789170cf1') +; + +-- Mar 10, 2016 8:35:47 PM IST +UPDATE AD_Column SET AD_Val_Rule_ID=200093,Updated=TO_TIMESTAMP('2016-03-10 20:35:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=8417 +; + +-- Sep 14, 2020, 6:30:08 PM IST +UPDATE AD_InfoColumn SET AD_Val_Rule_ID=200093, SeqNoSelection=10,Updated=TO_TIMESTAMP('2020-09-14 18:30:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200007 +; + +SELECT register_migration_script('201602161510_IDEMPIERE-2955.sql') FROM dual +; diff --git a/org.adempiere.base/src/org/compiere/model/I_M_AttributeSet.java b/org.adempiere.base/src/org/compiere/model/I_M_AttributeSet.java index 93a1ec0aab..113fd7ba4c 100644 --- a/org.adempiere.base/src/org/compiere/model/I_M_AttributeSet.java +++ b/org.adempiere.base/src/org/compiere/model/I_M_AttributeSet.java @@ -269,6 +269,15 @@ public interface I_M_AttributeSet */ public int getM_AttributeSet_ID(); + /** Column name M_AttributeSet_Type */ + public static final String COLUMNNAME_M_AttributeSet_Type = "M_AttributeSet_Type"; + + /** Set AttributeSet Type */ + public void setM_AttributeSet_Type (String M_AttributeSet_Type); + + /** Get AttributeSet Type */ + public String getM_AttributeSet_Type(); + /** Column name M_AttributeSet_UU */ public static final String COLUMNNAME_M_AttributeSet_UU = "M_AttributeSet_UU"; diff --git a/org.adempiere.base/src/org/compiere/model/X_M_AttributeSet.java b/org.adempiere.base/src/org/compiere/model/X_M_AttributeSet.java index c1b5c5728e..4610d9306b 100644 --- a/org.adempiere.base/src/org/compiere/model/X_M_AttributeSet.java +++ b/org.adempiere.base/src/org/compiere/model/X_M_AttributeSet.java @@ -30,7 +30,7 @@ public class X_M_AttributeSet extends PO implements I_M_AttributeSet, I_Persiste /** * */ - private static final long serialVersionUID = 20200413L; + private static final long serialVersionUID = 20200909L; /** Standard Constructor */ public X_M_AttributeSet (Properties ctx, int M_AttributeSet_ID, String trxName) @@ -47,6 +47,8 @@ public class X_M_AttributeSet extends PO implements I_M_AttributeSet, I_Persiste setIsSerNoMandatory (false); setMandatoryType (null); setM_AttributeSet_ID (0); + setM_AttributeSet_Type (null); +// MMS setName (null); } */ } @@ -388,6 +390,25 @@ public class X_M_AttributeSet extends PO implements I_M_AttributeSet, I_Persiste return ii.intValue(); } + /** M_AttributeSet_Type AD_Reference_ID=200115 */ + public static final int M_ATTRIBUTESET_TYPE_AD_Reference_ID=200115; + /** Material Management System = MMS */ + public static final String M_ATTRIBUTESET_TYPE_MaterialManagementSystem = "MMS"; + /** Set AttributeSet Type. + @param M_AttributeSet_Type AttributeSet Type */ + public void setM_AttributeSet_Type (String M_AttributeSet_Type) + { + + set_Value (COLUMNNAME_M_AttributeSet_Type, M_AttributeSet_Type); + } + + /** Get AttributeSet Type. + @return AttributeSet Type */ + public String getM_AttributeSet_Type () + { + return (String)get_Value(COLUMNNAME_M_AttributeSet_Type); + } + /** Set M_AttributeSet_UU. @param M_AttributeSet_UU M_AttributeSet_UU */ public void setM_AttributeSet_UU (String M_AttributeSet_UU)