From 96baf0b7cd6a5a9454571106ec6b57ba19b6c87a Mon Sep 17 00:00:00 2001 From: Deepak Pansheriya Date: Mon, 30 Aug 2021 17:26:34 +0530 Subject: [PATCH] =?UTF-8?q?IDEMPIERE-2853:=20Support=20for=20IADTabPanel?= =?UTF-8?q?=20as=20factory=20to=20add=20custom=20Tab=20=E2=80=A6=20(#579)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * IDEMPIERE-2853: Support for IADTabPanel as factory to add custom Tab types sh: q: command not found * IDEMPIERE-2853: adding requested Java doc, fixing seq mismatch in oracle and postgresql, Using Interface method instead of manual isSortTab check, * IDEMPIERE-2853: Adding default implementation for isEnableCustomizeButton in IADTabpanel * IDEMPIERE-2853: renaming reference label and Added support for allowing implementor to update toolbar state. * IDEMPIERE-2853: Fixing compilation issue due to merging to master branch --- db/ddlutils/oracle/views/AD_TAB_V.sql | 4 +- db/ddlutils/oracle/views/AD_TAB_VT.sql | 4 +- db/ddlutils/postgresql/views/AD_TAB_V.sql | 4 +- db/ddlutils/postgresql/views/AD_TAB_VT.sql | 4 +- .../oracle/201601221200_IDEMPIERE-2853.sql | 195 ++++++++++++++++++ .../oracle/202102141100_IDEMPIERE-2853.sql | 11 + .../201601221200_IDEMPIERE-2853.sql | 195 ++++++++++++++++++ .../202102141100_IDEMPIERE-2853.sql | 8 + .../src/org/compiere/model/GridTab.java | 9 + .../src/org/compiere/model/GridTabVO.java | 7 +- .../src/org/compiere/model/I_AD_Tab.java | 25 ++- .../src/org/compiere/model/X_AD_Tab.java | 42 +++- .../OSGI-INF/tabpanelfactory.xml | 8 + .../src/org/adempiere/webui/Extensions.java | 22 ++ .../adempiere/webui/adwindow/ADSortTab.java | 57 ++++- .../adempiere/webui/adwindow/ADTabpanel.java | 32 ++- .../adwindow/AbstractADWindowContent.java | 99 +++++---- .../webui/adwindow/CompositeADTabbox.java | 16 +- .../adempiere/webui/adwindow/DetailPane.java | 31 +-- .../adempiere/webui/adwindow/IADTabpanel.java | 55 ++++- .../webui/apps/form/WTrxMaterial.java | 2 +- .../webui/factory/DefaultTabPanelFactory.java | 41 ++++ .../webui/factory/IADTabPanelFactory.java | 30 +++ .../webui/window/WAccountDialog.java | 2 +- org.adempiere.ui.zk/build.properties | 1 + 25 files changed, 792 insertions(+), 112 deletions(-) create mode 100644 migration/i8.2z/oracle/201601221200_IDEMPIERE-2853.sql create mode 100644 migration/i8.2z/oracle/202102141100_IDEMPIERE-2853.sql create mode 100644 migration/i8.2z/postgresql/201601221200_IDEMPIERE-2853.sql create mode 100644 migration/i8.2z/postgresql/202102141100_IDEMPIERE-2853.sql create mode 100644 org.adempiere.ui.zk/OSGI-INF/tabpanelfactory.xml create mode 100644 org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/factory/DefaultTabPanelFactory.java create mode 100644 org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/factory/IADTabPanelFactory.java diff --git a/db/ddlutils/oracle/views/AD_TAB_V.sql b/db/ddlutils/oracle/views/AD_TAB_V.sql index a8cbe9b061..90cf8562d2 100644 --- a/db/ddlutils/oracle/views/AD_TAB_V.sql +++ b/db/ddlutils/oracle/views/AD_TAB_V.sql @@ -7,7 +7,7 @@ CREATE OR REPLACE VIEW AD_TAB_V READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID, ISSORTTAB, ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID, INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON, - MAXQUERYRECORDS, IsAllowAdvancedLookup, IsLookupOnlySelection) + MAXQUERYRECORDS, IsAllowAdvancedLookup, IsLookupOnlySelection, AD_TabType) AS SELECT t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, t.Name, t.Description, t.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType, @@ -18,7 +18,7 @@ SELECT t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, t.Name, t.Description, t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab, t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID, t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn, t.MaxQueryRecords, - t.IsAllowAdvancedLookup, t.IsLookupOnlySelection + t.IsAllowAdvancedLookup, t.IsLookupOnlySelection, t.AD_TabType FROM AD_Tab t INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID) WHERE t.IsActive='Y' diff --git a/db/ddlutils/oracle/views/AD_TAB_VT.sql b/db/ddlutils/oracle/views/AD_TAB_VT.sql index 455cb3cec2..68e5b03810 100644 --- a/db/ddlutils/oracle/views/AD_TAB_VT.sql +++ b/db/ddlutils/oracle/views/AD_TAB_VT.sql @@ -7,7 +7,7 @@ CREATE OR REPLACE VIEW AD_TAB_VT COMMITWARNING, READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID, ISSORTTAB, ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID, INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON, - MAXQUERYRECORDS, IsAllowAdvancedLookup, IsLookupOnlySelection) + MAXQUERYRECORDS, IsAllowAdvancedLookup, IsLookupOnlySelection, AD_TabType) AS SELECT trl.AD_Language, t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, trl.Name, trl.Description, trl.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType, @@ -18,7 +18,7 @@ SELECT trl.AD_Language, t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, trl.Name, tr t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab, t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID, t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn, t.MaxQueryRecords, - t.IsAllowAdvancedLookup, t.IsLookupOnlySelection + t.IsAllowAdvancedLookup, t.IsLookupOnlySelection, t.AD_TabType FROM AD_Tab t INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID) INNER JOIN AD_Tab_Trl trl ON (t.AD_Tab_ID = trl.AD_Tab_ID) diff --git a/db/ddlutils/postgresql/views/AD_TAB_V.sql b/db/ddlutils/postgresql/views/AD_TAB_V.sql index 7ae792117b..1628e18629 100644 --- a/db/ddlutils/postgresql/views/AD_TAB_V.sql +++ b/db/ddlutils/postgresql/views/AD_TAB_V.sql @@ -7,7 +7,7 @@ CREATE OR REPLACE VIEW AD_TAB_V READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID, ISSORTTAB, ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID, INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON, - MAXQUERYRECORDS, IsAllowAdvancedLookup, IsLookupOnlySelection) + MAXQUERYRECORDS, IsAllowAdvancedLookup, IsLookupOnlySelection, AD_TabType) AS SELECT t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, t.Name, t.Description, t.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType, @@ -18,7 +18,7 @@ SELECT t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, t.Name, t.Description, t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab, t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID, t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn, t.MaxQueryRecords, - t.IsAllowAdvancedLookup, t.IsLookupOnlySelection + t.IsAllowAdvancedLookup, t.IsLookupOnlySelection, t.AD_TabType FROM AD_Tab t INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID) WHERE t.IsActive='Y' diff --git a/db/ddlutils/postgresql/views/AD_TAB_VT.sql b/db/ddlutils/postgresql/views/AD_TAB_VT.sql index 455cb3cec2..68e5b03810 100644 --- a/db/ddlutils/postgresql/views/AD_TAB_VT.sql +++ b/db/ddlutils/postgresql/views/AD_TAB_VT.sql @@ -7,7 +7,7 @@ CREATE OR REPLACE VIEW AD_TAB_VT COMMITWARNING, READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID, ISSORTTAB, ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID, INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON, - MAXQUERYRECORDS, IsAllowAdvancedLookup, IsLookupOnlySelection) + MAXQUERYRECORDS, IsAllowAdvancedLookup, IsLookupOnlySelection, AD_TabType) AS SELECT trl.AD_Language, t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, trl.Name, trl.Description, trl.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType, @@ -18,7 +18,7 @@ SELECT trl.AD_Language, t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, trl.Name, tr t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab, t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID, t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn, t.MaxQueryRecords, - t.IsAllowAdvancedLookup, t.IsLookupOnlySelection + t.IsAllowAdvancedLookup, t.IsLookupOnlySelection, t.AD_TabType FROM AD_Tab t INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID) INNER JOIN AD_Tab_Trl trl ON (t.AD_Tab_ID = trl.AD_Tab_ID) diff --git a/migration/i8.2z/oracle/201601221200_IDEMPIERE-2853.sql b/migration/i8.2z/oracle/201601221200_IDEMPIERE-2853.sql new file mode 100644 index 0000000000..2c79f57ecf --- /dev/null +++ b/migration/i8.2z/oracle/201601221200_IDEMPIERE-2853.sql @@ -0,0 +1,195 @@ +-- IDEMPIERE-2853: Panel tab as a factory +-- Jan 22, 2016 11:47:02 AM IST +INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (202974,0,0,'Y',TO_DATE('2016-01-22 11:47:01','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-22 11:47:01','YYYY-MM-DD HH24:MI:SS'),100,'AD_TabType','Tab Type','Defines Tab Type','Tab Type','D','5c68092e-e403-4013-8c0f-ae3f1266d989') +; + +-- Jan 22, 2016 11:50:50 AM IST +INSERT INTO AD_Reference (AD_Reference_ID,Name,Description,ValidationType,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,IsOrderByValue,AD_Reference_UU) VALUES (200117,'TabTypeList','List of tab type','L',0,0,'Y',TO_DATE('2016-01-22 11:50:49','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-22 11:50:49','YYYY-MM-DD HH24:MI:SS'),100,'D','N','5cc837cc-e950-4a01-8044-4aa6a69d9515') +; + +-- Jan 22, 2016 11:51:22 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 (200347,'Form',200117,'FORM',0,0,'Y',TO_DATE('2016-01-22 11:51:21','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-22 11:51:21','YYYY-MM-DD HH24:MI:SS'),100,'D','590c7ccd-4400-4208-aca4-d86e508e0f4d') +; + +-- Jan 22, 2016 11:51:36 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 (200348,'Sort',200117,'SORT',0,0,'Y',TO_DATE('2016-01-22 11:51:36','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-22 11:51:36','YYYY-MM-DD HH24:MI:SS'),100,'D','47729861-5eed-4209-8228-7858e0ae7c13') +; + +-- Jan 22, 2016 11:52:05 AM IST +INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_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) VALUES (212616,0,'Tab Type','Defines Tab Type',106,'AD_TabType',40,'N','N','N','N','N',0,'N',17,200117,0,0,'Y',TO_DATE('2016-01-22 11:52:04','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-22 11:52:04','YYYY-MM-DD HH24:MI:SS'),100,202974,'Y','N','D','N','N','N','Y','41054b6a-58eb-427a-9748-a192f20f6efb','Y',0,'N','N') +; + +-- Jan 22, 2016 11:52:18 AM IST +ALTER TABLE AD_Tab ADD AD_TabType VARCHAR2(40 CHAR) DEFAULT NULL +; + +-- Jan 22, 2016 11:52:41 AM IST +INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (204121,'Tab Type','Defines Tab Type',106,212616,'Y',40,400,'N','N','N','N',0,0,'Y',TO_DATE('2016-01-22 11:52:40','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-22 11:52:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','644e396b-717a-4f99-a0d3-4007862a59c2','Y',330,2) +; + +-- Dec 11, 2020, 4:10:34 PM IST +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204121 +; + +-- Dec 11, 2020, 4:10:34 PM IST +UPDATE AD_Field SET SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=124 +; + +-- Dec 11, 2020, 4:10:34 PM IST +UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=312 +; + +-- Dec 11, 2020, 4:10:34 PM IST +UPDATE AD_Field SET SeqNo=140, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202515 +; + +-- Dec 11, 2020, 4:10:34 PM IST +UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11997 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=927 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=170, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5707 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=180, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=928 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=190, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206078 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206079 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=210, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5709 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=220, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5708 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=230, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1546 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=240, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206373 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=250, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=57266 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=260, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2575 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=270, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11265 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=280, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=929 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=290, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11998 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=300, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=271 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=310, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11266 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=320, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1548 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=330, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1550 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=340, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1549 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=350, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4956 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=360, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201811 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=370, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5131 +; + +CREATE OR REPLACE VIEW AD_TAB_V +(AD_TAB_ID, AD_WINDOW_ID, AD_TABLE_ID, NAME, DESCRIPTION, + HELP, SEQNO, ISSINGLEROW, HASTREE, ISINFOTAB, + REPLICATIONTYPE, TABLENAME, ACCESSLEVEL, ISSECURITYENABLED, ISDELETEABLE, + ISHIGHVOLUME, ISVIEW, HASASSOCIATION, ISTRANSLATIONTAB, ISREADONLY, + AD_IMAGE_ID, TABLEVEL, WHERECLAUSE, ORDERBYCLAUSE, COMMITWARNING, + READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID, ISSORTTAB, + ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID, + INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON, + MAXQUERYRECORDS, IsAllowAdvancedLookup, IsLookupOnlySelection, AD_TabType) +AS +SELECT t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, t.Name, t.Description, + t.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType, + tbl.TableName, tbl.AccessLevel, tbl.IsSecurityEnabled, tbl.IsDeleteable, + tbl.IsHighVolume, tbl.IsView, cast('N' as char) AS HasAssociation, -- compatibility + t.IsTranslationTab, t.IsReadOnly, t.AD_Image_ID, t.TabLevel, + t.WhereClause, t.OrderByClause, t.CommitWarning, t.ReadOnlyLogic, t.DisplayLogic, + t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab, + t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID, + t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn, t.MaxQueryRecords, + t.IsAllowAdvancedLookup, t.IsLookupOnlySelection, t.AD_TabType +FROM AD_Tab t + INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID) +WHERE t.IsActive='Y' + AND tbl.IsActive='Y' +; + +CREATE OR REPLACE VIEW AD_TAB_VT +(AD_LANGUAGE, AD_TAB_ID, AD_WINDOW_ID, AD_TABLE_ID, NAME, + DESCRIPTION, HELP, SEQNO, ISSINGLEROW, HASTREE, + ISINFOTAB, REPLICATIONTYPE, TABLENAME, ACCESSLEVEL, ISSECURITYENABLED, + ISDELETEABLE, ISHIGHVOLUME, ISVIEW, HASASSOCIATION, ISTRANSLATIONTAB, + ISREADONLY, AD_IMAGE_ID, TABLEVEL, WHERECLAUSE, ORDERBYCLAUSE, + COMMITWARNING, READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID, + ISSORTTAB, ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID, + INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON, + MAXQUERYRECORDS, IsAllowAdvancedLookup, IsLookupOnlySelection, AD_TabType) +AS +SELECT trl.AD_Language, t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, trl.Name, trl.Description, + trl.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType, + tbl.TableName, tbl.AccessLevel, tbl.IsSecurityEnabled, tbl.IsDeleteable, + tbl.IsHighVolume, tbl.IsView, cast('N' as char) AS HasAssociation, -- compatibility + t.IsTranslationTab, t.IsReadOnly, t.AD_Image_ID, t.TabLevel, + t.WhereClause, t.OrderByClause, trl.CommitWarning, t.ReadOnlyLogic, t.DisplayLogic, + t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab, + t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID, + t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn, t.MaxQueryRecords, + t.IsAllowAdvancedLookup, t.IsLookupOnlySelection, t.AD_TabType +FROM AD_Tab t + INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID) + INNER JOIN AD_Tab_Trl trl ON (t.AD_Tab_ID = trl.AD_Tab_ID) +WHERE t.IsActive='Y' + AND tbl.IsActive='Y' +; + +-- Jan 22, 2016 11:53:09 AM IST +SELECT register_migration_script('201601221200_IDEMPIERE-2853.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i8.2z/oracle/202102141100_IDEMPIERE-2853.sql b/migration/i8.2z/oracle/202102141100_IDEMPIERE-2853.sql new file mode 100644 index 0000000000..5bc6f024b5 --- /dev/null +++ b/migration/i8.2z/oracle/202102141100_IDEMPIERE-2853.sql @@ -0,0 +1,11 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Feb 14, 2021, 10:47:10 AM IST +UPDATE AD_Field SET IsActive='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2021-02-14 10:47:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5707 +; + +update AD_Tab set ad_tabtype='SORT' where isSortTab='Y'; + +SELECT register_migration_script('202102141100_IDEMPIERE-2853.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i8.2z/postgresql/201601221200_IDEMPIERE-2853.sql b/migration/i8.2z/postgresql/201601221200_IDEMPIERE-2853.sql new file mode 100644 index 0000000000..872a9acd48 --- /dev/null +++ b/migration/i8.2z/postgresql/201601221200_IDEMPIERE-2853.sql @@ -0,0 +1,195 @@ +-- IDEMPIERE-2853: Panel tab as a factory +-- Jan 22, 2016 11:47:02 AM IST +INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,PrintName,EntityType,AD_Element_UU) VALUES (202974,0,0,'Y',TO_TIMESTAMP('2016-01-22 11:47:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-22 11:47:01','YYYY-MM-DD HH24:MI:SS'),100,'AD_TabType','Tab Type','Defines Tab Type','Tab Type','D','5c68092e-e403-4013-8c0f-ae3f1266d989') +; + +-- Jan 22, 2016 11:50:50 AM IST +INSERT INTO AD_Reference (AD_Reference_ID,Name,Description,ValidationType,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,EntityType,IsOrderByValue,AD_Reference_UU) VALUES (200117,'TabTypeList','List of tab type','L',0,0,'Y',TO_TIMESTAMP('2016-01-22 11:50:49','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-22 11:50:49','YYYY-MM-DD HH24:MI:SS'),100,'D','N','5cc837cc-e950-4a01-8044-4aa6a69d9515') +; + +-- Jan 22, 2016 11:51:22 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 (200347,'Form',200117,'FORM',0,0,'Y',TO_TIMESTAMP('2016-01-22 11:51:21','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-22 11:51:21','YYYY-MM-DD HH24:MI:SS'),100,'D','590c7ccd-4400-4208-aca4-d86e508e0f4d') +; + +-- Jan 22, 2016 11:51:36 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 (200348,'Sort',200117,'SORT',0,0,'Y',TO_TIMESTAMP('2016-01-22 11:51:36','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-22 11:51:36','YYYY-MM-DD HH24:MI:SS'),100,'D','47729861-5eed-4209-8228-7858e0ae7c13') +; + +-- Jan 22, 2016 11:52:05 AM IST +INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_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) VALUES (212616,0,'Tab Type','Defines Tab Type',106,'AD_TabType',40,'N','N','N','N','N',0,'N',17,200117,0,0,'Y',TO_TIMESTAMP('2016-01-22 11:52:04','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-22 11:52:04','YYYY-MM-DD HH24:MI:SS'),100,202974,'Y','N','D','N','N','N','Y','41054b6a-58eb-427a-9748-a192f20f6efb','Y',0,'N','N') +; + +-- Jan 22, 2016 11:52:18 AM IST +ALTER TABLE AD_Tab ADD COLUMN AD_TabType VARCHAR(40) DEFAULT NULL +; + +-- Jan 22, 2016 11:52:41 AM IST +INSERT INTO AD_Field (AD_Field_ID,Name,Description,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (204121,'Tab Type','Defines Tab Type',106,212616,'Y',40,400,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2016-01-22 11:52:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-22 11:52:40','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','644e396b-717a-4f99-a0d3-4007862a59c2','Y',330,2) +; + +-- Dec 11, 2020, 4:10:34 PM IST +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204121 +; + +-- Dec 11, 2020, 4:10:34 PM IST +UPDATE AD_Field SET SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=124 +; + +-- Dec 11, 2020, 4:10:34 PM IST +UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=312 +; + +-- Dec 11, 2020, 4:10:34 PM IST +UPDATE AD_Field SET SeqNo=140, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202515 +; + +-- Dec 11, 2020, 4:10:34 PM IST +UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11997 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=927 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=170, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5707 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=180, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=928 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=190, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206078 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206079 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=210, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5709 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=220, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5708 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=230, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1546 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=240, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=206373 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=250, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=57266 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=260, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=2575 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=270, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11265 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=280, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=929 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=290, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11998 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=300, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=271 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=310, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=11266 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=320, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1548 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=330, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1550 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=340, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1549 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=350, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4956 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=360, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201811 +; + +-- Dec 11, 2020, 4:10:35 PM IST +UPDATE AD_Field SET SeqNo=370, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2020-12-11 16:10:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5131 +; + +CREATE OR REPLACE VIEW AD_TAB_V +(AD_TAB_ID, AD_WINDOW_ID, AD_TABLE_ID, NAME, DESCRIPTION, + HELP, SEQNO, ISSINGLEROW, HASTREE, ISINFOTAB, + REPLICATIONTYPE, TABLENAME, ACCESSLEVEL, ISSECURITYENABLED, ISDELETEABLE, + ISHIGHVOLUME, ISVIEW, HASASSOCIATION, ISTRANSLATIONTAB, ISREADONLY, + AD_IMAGE_ID, TABLEVEL, WHERECLAUSE, ORDERBYCLAUSE, COMMITWARNING, + READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID, ISSORTTAB, + ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID, + INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON, + MAXQUERYRECORDS, IsAllowAdvancedLookup, IsLookupOnlySelection, AD_TabType) +AS +SELECT t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, t.Name, t.Description, + t.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType, + tbl.TableName, tbl.AccessLevel, tbl.IsSecurityEnabled, tbl.IsDeleteable, + tbl.IsHighVolume, tbl.IsView, cast('N' as char) AS HasAssociation, -- compatibility + t.IsTranslationTab, t.IsReadOnly, t.AD_Image_ID, t.TabLevel, + t.WhereClause, t.OrderByClause, t.CommitWarning, t.ReadOnlyLogic, t.DisplayLogic, + t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab, + t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID, + t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn, t.MaxQueryRecords, + t.IsAllowAdvancedLookup, t.IsLookupOnlySelection, t.AD_TabType +FROM AD_Tab t + INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID) +WHERE t.IsActive='Y' + AND tbl.IsActive='Y' +; + +CREATE OR REPLACE VIEW AD_TAB_VT +(AD_LANGUAGE, AD_TAB_ID, AD_WINDOW_ID, AD_TABLE_ID, NAME, + DESCRIPTION, HELP, SEQNO, ISSINGLEROW, HASTREE, + ISINFOTAB, REPLICATIONTYPE, TABLENAME, ACCESSLEVEL, ISSECURITYENABLED, + ISDELETEABLE, ISHIGHVOLUME, ISVIEW, HASASSOCIATION, ISTRANSLATIONTAB, + ISREADONLY, AD_IMAGE_ID, TABLEVEL, WHERECLAUSE, ORDERBYCLAUSE, + COMMITWARNING, READONLYLOGIC, DISPLAYLOGIC, AD_COLUMN_ID, AD_PROCESS_ID, + ISSORTTAB, ISINSERTRECORD, ISADVANCEDTAB, AD_COLUMNSORTORDER_ID, AD_COLUMNSORTYESNO_ID, + INCLUDED_TAB_ID, PARENT_COLUMN_ID, AD_Tab_UU, AD_Table_UU, TREEDISPLAYEDON, + MAXQUERYRECORDS, IsAllowAdvancedLookup, IsLookupOnlySelection, AD_TabType) +AS +SELECT trl.AD_Language, t.AD_Tab_ID, t.AD_Window_ID, t.AD_Table_ID, trl.Name, trl.Description, + trl.Help, t.SeqNo, t.IsSingleRow, t.HasTree, t.IsInfoTab, tbl.ReplicationType, + tbl.TableName, tbl.AccessLevel, tbl.IsSecurityEnabled, tbl.IsDeleteable, + tbl.IsHighVolume, tbl.IsView, cast('N' as char) AS HasAssociation, -- compatibility + t.IsTranslationTab, t.IsReadOnly, t.AD_Image_ID, t.TabLevel, + t.WhereClause, t.OrderByClause, trl.CommitWarning, t.ReadOnlyLogic, t.DisplayLogic, + t.AD_Column_ID, t.AD_Process_ID, t.IsSortTab, t.IsInsertRecord, t.IsAdvancedTab, + t.AD_ColumnSortOrder_ID, t.AD_ColumnSortYesNo_ID, t.Included_Tab_ID, t.Parent_Column_ID, + t.AD_Tab_UU, tbl.AD_Table_UU, t.TreeDisplayedOn, t.MaxQueryRecords, + t.IsAllowAdvancedLookup, t.IsLookupOnlySelection, t.AD_TabType +FROM AD_Tab t + INNER JOIN AD_Table tbl ON (t.AD_Table_ID = tbl.AD_Table_ID) + INNER JOIN AD_Tab_Trl trl ON (t.AD_Tab_ID = trl.AD_Tab_ID) +WHERE t.IsActive='Y' + AND tbl.IsActive='Y' +; + +-- Jan 22, 2016 11:53:09 AM IST +SELECT register_migration_script('201601221200_IDEMPIERE-2853.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i8.2z/postgresql/202102141100_IDEMPIERE-2853.sql b/migration/i8.2z/postgresql/202102141100_IDEMPIERE-2853.sql new file mode 100644 index 0000000000..47d61d9901 --- /dev/null +++ b/migration/i8.2z/postgresql/202102141100_IDEMPIERE-2853.sql @@ -0,0 +1,8 @@ +-- Feb 14, 2021, 10:47:10 AM IST +UPDATE AD_Field SET IsActive='N', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2021-02-14 10:47:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5707 +; + +update AD_Tab set ad_tabtype='SORT' where isSortTab='Y'; + +SELECT register_migration_script('202102141100_IDEMPIERE-2853.sql') FROM dual +; diff --git a/org.adempiere.base/src/org/compiere/model/GridTab.java b/org.adempiere.base/src/org/compiere/model/GridTab.java index 1e7a27d461..229e108646 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTab.java +++ b/org.adempiere.base/src/org/compiere/model/GridTab.java @@ -591,6 +591,15 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable // m_mTable.addTableModelListener(this); } // enableEvents + /** + * get Tab Type + * @return String + */ + public String getTabType() + { + return m_vo.AD_TabType; + } // getTabType + /** * Assemble whereClause and query MTable and position to row 0. *
diff --git a/org.adempiere.base/src/org/compiere/model/GridTabVO.java b/org.adempiere.base/src/org/compiere/model/GridTabVO.java
index 05235ec419..a84bc67ae4 100644
--- a/org.adempiere.base/src/org/compiere/model/GridTabVO.java
+++ b/org.adempiere.base/src/org/compiere/model/GridTabVO.java
@@ -43,7 +43,7 @@ public class GridTabVO implements Evaluatee, Serializable
 	/**
 	 * 
 	 */
-	private static final long serialVersionUID = 2088372161131336289L;
+	private static final long serialVersionUID = 8781340605954851838L;
 
 	/**************************************************************************
 	 *	Create MTab VO
@@ -288,6 +288,7 @@ public class GridTabVO implements Evaluatee, Serializable
 				vo.AD_ColumnSortOrder_ID = rs.getInt("AD_ColumnSortOrder_ID");
 				vo.AD_ColumnSortYesNo_ID = rs.getInt("AD_ColumnSortYesNo_ID");
 			}
+			vo.AD_TabType = rs.getString("AD_TabType");
 			//
 			//	Replication Type - set R/O if Reference
 			try
@@ -545,6 +546,8 @@ public class GridTabVO implements Evaluatee, Serializable
 	public  boolean     onlyCurrentRows = true;
 	/**	Only Current Days - derived	*/
 	public int			onlyCurrentDays = 0;
+	/** Tab type uses by IADTabpanel service to identify implementors*/
+	public String AD_TabType = null;
 
 	/** Fields contain MFieldVO entities    */
 	private ArrayList	Fields = null;
@@ -642,7 +645,7 @@ public class GridTabVO implements Evaluatee, Serializable
 		//  Derived
 		clone.onlyCurrentRows = true;
 		clone.onlyCurrentDays = 0;
-
+		clone.AD_TabType = AD_TabType;
 		clone.Fields = new ArrayList();
 		for (int i = 0; i < Fields.size(); i++)
 		{
diff --git a/org.adempiere.base/src/org/compiere/model/I_AD_Tab.java b/org.adempiere.base/src/org/compiere/model/I_AD_Tab.java
index 5000ef54f5..22f0ee9226 100644
--- a/org.adempiere.base/src/org/compiere/model/I_AD_Tab.java
+++ b/org.adempiere.base/src/org/compiere/model/I_AD_Tab.java
@@ -161,6 +161,15 @@ public interface I_AD_Tab
 	  */
 	public int getAD_Tab_ID();
 
+    /** Column name AD_Tab_UU */
+    public static final String COLUMNNAME_AD_Tab_UU = "AD_Tab_UU";
+
+	/** Set AD_Tab_UU	  */
+	public void setAD_Tab_UU (String AD_Tab_UU);
+
+	/** Get AD_Tab_UU	  */
+	public String getAD_Tab_UU();
+
     /** Column name AD_Table_ID */
     public static final String COLUMNNAME_AD_Table_ID = "AD_Table_ID";
 
@@ -176,14 +185,18 @@ public interface I_AD_Tab
 
 	public org.compiere.model.I_AD_Table getAD_Table() throws RuntimeException;
 
-    /** Column name AD_Tab_UU */
-    public static final String COLUMNNAME_AD_Tab_UU = "AD_Tab_UU";
+    /** Column name AD_TabType */
+    public static final String COLUMNNAME_AD_TabType = "AD_TabType";
 
-	/** Set AD_Tab_UU	  */
-	public void setAD_Tab_UU (String AD_Tab_UU);
+	/** Set Tab Type.
+	  * Defines Tab Type
+	  */
+	public void setAD_TabType (String AD_TabType);
 
-	/** Get AD_Tab_UU	  */
-	public String getAD_Tab_UU();
+	/** Get Tab Type.
+	  * Defines Tab Type
+	  */
+	public String getAD_TabType();
 
     /** Column name AD_Window_ID */
     public static final String COLUMNNAME_AD_Window_ID = "AD_Window_ID";
diff --git a/org.adempiere.base/src/org/compiere/model/X_AD_Tab.java b/org.adempiere.base/src/org/compiere/model/X_AD_Tab.java
index aaf1473779..ad24a08651 100644
--- a/org.adempiere.base/src/org/compiere/model/X_AD_Tab.java
+++ b/org.adempiere.base/src/org/compiere/model/X_AD_Tab.java
@@ -30,7 +30,7 @@ public class X_AD_Tab extends PO implements I_AD_Tab, I_Persistent
 	/**
 	 *
 	 */
-	private static final long serialVersionUID = 20201220L;
+	private static final long serialVersionUID = 20210309L;
 
     /** Standard Constructor */
     public X_AD_Tab (Properties ctx, int AD_Tab_ID, String trxName)
@@ -279,6 +279,20 @@ public class X_AD_Tab extends PO implements I_AD_Tab, I_Persistent
 		return ii.intValue();
 	}
 
+	/** Set AD_Tab_UU.
+		@param AD_Tab_UU AD_Tab_UU	  */
+	public void setAD_Tab_UU (String AD_Tab_UU)
+	{
+		set_Value (COLUMNNAME_AD_Tab_UU, AD_Tab_UU);
+	}
+
+	/** Get AD_Tab_UU.
+		@return AD_Tab_UU	  */
+	public String getAD_Tab_UU () 
+	{
+		return (String)get_Value(COLUMNNAME_AD_Tab_UU);
+	}
+
 	public org.compiere.model.I_AD_Table getAD_Table() throws RuntimeException
     {
 		return (org.compiere.model.I_AD_Table)MTable.get(getCtx(), org.compiere.model.I_AD_Table.Table_Name)
@@ -307,18 +321,28 @@ public class X_AD_Tab extends PO implements I_AD_Tab, I_Persistent
 		return ii.intValue();
 	}
 
-	/** Set AD_Tab_UU.
-		@param AD_Tab_UU AD_Tab_UU	  */
-	public void setAD_Tab_UU (String AD_Tab_UU)
+	/** AD_TabType AD_Reference_ID=200117 */
+	public static final int AD_TABTYPE_AD_Reference_ID=200117;
+	/** Form = FORM */
+	public static final String AD_TABTYPE_Form = "FORM";
+	/** Sort = SORT */
+	public static final String AD_TABTYPE_Sort = "SORT";
+	/** Set Tab Type.
+		@param AD_TabType 
+		Defines Tab Type
+	  */
+	public void setAD_TabType (String AD_TabType)
 	{
-		set_Value (COLUMNNAME_AD_Tab_UU, AD_Tab_UU);
+
+		set_Value (COLUMNNAME_AD_TabType, AD_TabType);
 	}
 
-	/** Get AD_Tab_UU.
-		@return AD_Tab_UU	  */
-	public String getAD_Tab_UU () 
+	/** Get Tab Type.
+		@return Defines Tab Type
+	  */
+	public String getAD_TabType () 
 	{
-		return (String)get_Value(COLUMNNAME_AD_Tab_UU);
+		return (String)get_Value(COLUMNNAME_AD_TabType);
 	}
 
 	public org.compiere.model.I_AD_Window getAD_Window() throws RuntimeException
diff --git a/org.adempiere.ui.zk/OSGI-INF/tabpanelfactory.xml b/org.adempiere.ui.zk/OSGI-INF/tabpanelfactory.xml
new file mode 100644
index 0000000000..73b9dc614f
--- /dev/null
+++ b/org.adempiere.ui.zk/OSGI-INF/tabpanelfactory.xml
@@ -0,0 +1,8 @@
+
+
+   
+   
+   
+      
+   
+
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/Extensions.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/Extensions.java
index ef44c5372b..cc7111c271 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/Extensions.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/Extensions.java
@@ -28,8 +28,10 @@ import java.util.stream.Collectors;
 import org.adempiere.base.IServiceReferenceHolder;
 import org.adempiere.base.Service;
 import org.adempiere.base.ServiceQuery;
+import org.adempiere.webui.adwindow.IADTabpanel;
 import org.adempiere.webui.apps.IProcessParameterListener;
 import org.adempiere.webui.apps.graph.IChartRendererService;
+import org.adempiere.webui.factory.IADTabPanelFactory;
 import org.adempiere.webui.factory.IDashboardGadgetFactory;
 import org.adempiere.webui.factory.IFormFactory;
 import org.adempiere.webui.factory.IMappedFormFactory;
@@ -368,4 +370,24 @@ public class Extensions {
 		
 		return null;
 	}
+	
+	/**
+	 * @param  tabType
+	 * @return         {@link IADTabpanel}
+	 */
+	public static IADTabpanel getADTabPanel(String tabType)
+	{
+		IADTabpanel Object = null;
+		List factoryList = Service.locator().list(IADTabPanelFactory.class).getServices();
+		if (factoryList == null)
+			return null;
+
+		for (IADTabPanelFactory factory : factoryList)
+		{
+			Object = factory.getInstance(tabType);
+			if (Object != null)
+				return Object;
+		}
+		return null;
+	} // getADTabPanel
 }
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java
index b027e97609..1c6c2ba2ba 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java
@@ -56,6 +56,7 @@ import org.zkoss.zk.ui.event.EventListener;
 import org.zkoss.zk.ui.event.Events;
 import org.zkoss.zk.ui.util.Clients;
 import org.zkoss.zul.Hlayout;
+import org.zkoss.zul.Toolbar;
 import org.zkoss.zul.event.ListDataEvent;
 
 /**
@@ -79,18 +80,26 @@ public class ADSortTab extends Panel implements IADTabpanel
 	/**
 	 * 
 	 */
-	private static final long serialVersionUID = -2238411612673317537L;
+	private static final long serialVersionUID = 4302282658814599752L;
+
+	public ADSortTab()
+	{
+	}
 
 	/**
-	 *	Sort Tab Constructor
-	 *
-	 *  @param WindowNo Window No
-	 *  @param GridTab
+	 * Initiate
+	 * 
+	 * @param winPanel
+	 * @param WindowNo
+	 * @param gridTab
+	 * @param gridWindow
 	 */
-	public ADSortTab(int WindowNo, GridTab gridTab)
+	@Override
+	public void init(AbstractADWindowContent winPanel, GridTab gridTab)
 	{
+		this.adWindowPanel = winPanel;
 		if (log.isLoggable(Level.CONFIG)) log.config("SortOrder=" + gridTab.getAD_ColumnSortOrder_ID() + ", SortYesNo=" + gridTab.getAD_ColumnSortYesNo_ID());
-		m_WindowNo = WindowNo;
+		m_WindowNo = winPanel.getWindowNo();
 		this.gridTab = gridTab;
 
 		m_AD_Table_ID = gridTab.getAD_Table_ID();
@@ -102,7 +111,7 @@ public class ADSortTab extends Panel implements IADTabpanel
 				removeAttribute(ATTR_ON_ACTIVATE_POSTED);
 			}
 		});
-	}	//	ADSortTab
+	} // init
 
 	/**	Logger			*/
 	protected static final CLogger log = CLogger.getCLogger(ADSortTab.class);
@@ -1056,5 +1065,35 @@ public class ADSortTab extends Panel implements IADTabpanel
 	{
 		return false;
 	}
-}	//ADSortTab
 
+	@Override
+	public List getToolbarButtons()
+	{
+		return new ArrayList();
+	}
+
+	@Override
+	public boolean isEnableCustomizeButton()
+	{
+		return false;
+	}
+
+	@Override
+	public boolean isEnableProcessButton()
+	{
+		return false;
+	}
+
+	@Override
+	public void updateToolbar(ADWindowToolbar toolbar)
+	{
+
+	}
+
+	@Override
+	public void updateDetailToolbar(Toolbar toolbar)
+	{
+
+	}
+
+}	//ADSortTab
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java
index 56bb3270af..7e89955bcd 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java
@@ -118,6 +118,7 @@ import org.zkoss.zul.Separator;
 import org.zkoss.zul.South;
 import org.zkoss.zul.Space;
 import org.zkoss.zul.Style;
+import org.zkoss.zul.Toolbar;
 import org.zkoss.zul.Tabpanels;
 import org.zkoss.zul.Tabs;
 import org.zkoss.zul.TreeModel;
@@ -153,7 +154,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
 	/**
 	 * 
 	 */
-	private static final long serialVersionUID = -6023888511495744589L;
+	private static final long serialVersionUID = -5335610241895151024L;
 
 	private static final String ON_SAVE_OPEN_PREFERENCE_EVENT = "onSaveOpenPreference";
 
@@ -175,7 +176,6 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
 
     private GridTab           gridTab;
 
-    @SuppressWarnings("unused")
 	private GridWindow        gridWindow;
 
     private AbstractADWindowContent      windowPanel;
@@ -388,15 +388,12 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
     /**
      *
      * @param winPanel
-     * @param windowNo
      * @param gridTab
-     * @param gridWindow
      */
-    public void init(AbstractADWindowContent winPanel, int windowNo, GridTab gridTab,
-            GridWindow gridWindow)
+    public void init(AbstractADWindowContent winPanel, GridTab gridTab)
     {
-        this.windowNo = windowNo;
-        this.gridWindow = gridWindow;
+        this.gridWindow = gridTab.getGridWindow();
+        this.windowNo = gridWindow.getWindowNo();
         this.gridTab = gridTab;
         // callout dialog ask for input - devCoffee #3390
         gridTab.setCalloutUI(new CalloutDialog(Executions.getCurrent().getDesktop(), windowNo));
@@ -2305,4 +2302,23 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
 		}
 		tabbox.setVisible(isGroupTabVisible);
 	}
+
+	@Override
+	public boolean isEnableCustomizeButton()
+	{
+		return isGridView();
+	}
+
+	@Override
+	public void updateToolbar(ADWindowToolbar toolbar)
+	{
+
+	}
+
+	@Override
+	public void updateDetailToolbar(Toolbar toolbar)
+	{
+
+	}
+
 }
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java
index b787629d51..577e2ee95c 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java
@@ -39,6 +39,7 @@ import org.adempiere.util.Callback;
 import org.adempiere.webui.AdempiereIdGenerator;
 import org.adempiere.webui.AdempiereWebUI;
 import org.adempiere.webui.ClientInfo;
+import org.adempiere.webui.Extensions;
 import org.adempiere.webui.LayoutUtils;
 import org.adempiere.webui.WArchive;
 import org.adempiere.webui.WRequest;
@@ -637,9 +638,23 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
 			gTab.setUpdateWindowContext(false);
 		}
 
-		if (gTab.isSortTab())
+		String type = gTab.getTabType();
+		if (!Util.isEmpty(type))
 		{
-			ADSortTab sortTab = new ADSortTab(curWindowNo, gTab);
+			IADTabpanel adTabPanal = Extensions.getADTabPanel(type);
+			if (adTabPanal != null)
+			{
+				initTabPanel(query, tabIndex, gTab, adTabPanal);
+			}
+			else
+			{
+				logger.log(Level.SEVERE, "No implementaton for tab type " + type + " Found", new Exception("No implementaton for tab type " + type + " Found"));
+			}
+		}
+		else if (gTab.isSortTab())
+		{
+			ADSortTab sortTab = new ADSortTab();
+			sortTab.init(this, gTab);
 			adTabbox.addTab(gTab, sortTab);
 			sortTab.registerAPanel(this);
 			if (tabIndex == 0) {
@@ -654,14 +669,23 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
 		else
 		{
 			ADTabpanel fTabPanel = new ADTabpanel();
-			fTabPanel.addEventListener(ADTabpanel.ON_DYNAMIC_DISPLAY_EVENT, this);
-	    	gTab.addDataStatusListener(this);
-	    	fTabPanel.init(this, curWindowNo, gTab, gridWindow);
-	    	adTabbox.addTab(gTab, fTabPanel);
-		    if (tabIndex == 0) {
-		    	fTabPanel.createUI();
-		    	if (!m_queryInitiating)
-				{
+			initTabPanel(query, tabIndex, gTab, fTabPanel);
+		}
+
+		return gTab;
+	} // initTab
+
+	private void initTabPanel(MQuery query, int tabIndex, final GridTab gTab, IADTabpanel adTabPanal)
+	{
+		adTabPanal.addEventListener(ADTabpanel.ON_DYNAMIC_DISPLAY_EVENT, this);
+		gTab.addDataStatusListener(this);
+		adTabPanal.init(this, gTab);
+		adTabbox.addTab(gTab, adTabPanal);
+		if (tabIndex == 0)
+		{
+			adTabPanal.createUI();
+			if (!m_queryInitiating)
+			{
 		    		try {
 						initFirstTabpanel();
 		    		} catch (Exception e) {
@@ -669,17 +693,14 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
 		        			FDialog.error(curWindowNo, GridTable.LOAD_TIMEOUT_ERROR_MESSAGE);
 		        		}
 		    		}
-				}
-		    }
-
-		    if (!m_queryInitiating && tabIndex == 0)
-		    {
-		    	initQueryOnNew(query);
-		    }
+			}
 		}
 
-		return gTab;
-	}
+		if (!m_queryInitiating && tabIndex == 0)
+		{
+			initQueryOnNew(query);
+		}
+	} // initTabPanel
 
 	private void initFirstTabpanel() {
 		adTabbox.getSelectedTabpanel().query(m_onlyCurrentRows, m_onlyCurrentDays, adTabbox.getSelectedGridTab().getMaxQueryRecords());
@@ -1112,9 +1133,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
     public void onToggle()
     {
     	adTabbox.getSelectedTabpanel().switchRowPresentation();
-    	//Deepak-Enabling customize button IDEMPIERE-364
-        if(!(adTabbox.getSelectedTabpanel() instanceof ADSortTab))
-        	toolbar.enableCustomize(((ADTabpanel)adTabbox.getSelectedTabpanel()).isGridView());
+    	toolbar.enableCustomize(adTabbox.getSelectedTabpanel().isEnableCustomizeButton());
     	focusToActivePanel();
     }
 
@@ -1261,9 +1280,9 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
     	}
     	else if (ADTabpanel.ON_DYNAMIC_DISPLAY_EVENT.equals(event.getName()))
     	{
-    		ADTabpanel adtab = (ADTabpanel) event.getTarget();
+    		IADTabpanel adtab = (IADTabpanel) event.getTarget();
     		if (adtab == adTabbox.getSelectedTabpanel()) {
-    			toolbar.enableProcessButton(adtab.getToolbarButtons().size() > 0 && !adTabbox.getSelectedGridTab().isNew());
+    			toolbar.enableProcessButton(adtab.isEnableProcessButton());
     			toolbar.dynamicDisplay();
     		}
     	}
@@ -1462,22 +1481,19 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
 
 		toolbar.enableQuickForm(adTabbox.getSelectedTabpanel().isEnableQuickFormButton() && !adTabbox.getSelectedGridTab().isReadOnly());
 
-        boolean isNewRow = adTabbox.getSelectedGridTab().getRowCount() == 0 || adTabbox.getSelectedGridTab().isNew();
-        //Deepak-Enabling customize button IDEMPIERE-364
-        if(adTabbox.getSelectedTabpanel() instanceof ADSortTab){//consistent with dataStatusChanged
-        	toolbar.enableProcessButton (false);
-        	toolbar.enableCustomize(false);
-        }else{
-        	ADTabpanel adtab = (ADTabpanel) adTabbox.getSelectedTabpanel();
-            toolbar.enableProcessButton(!isNewRow && adtab != null && adtab.getToolbarButtons().size() > 0);
-            toolbar.enableCustomize(adtab.isGridView());
-        }
+		boolean isNewRow = adTabbox.getSelectedGridTab().getRowCount() == 0 || adTabbox.getSelectedGridTab().isNew();
+        
+		IADTabpanel adtab = adTabbox.getSelectedTabpanel();
+        toolbar.enableProcessButton(adtab != null && adtab.isEnableProcessButton());
+        toolbar.enableCustomize(adtab.isEnableCustomizeButton());
         
 		toolbar.setPressed("Find",adTabbox.getSelectedGridTab().isQueryActive() || 
 				(!isNewRow && (m_onlyCurrentRows || m_onlyCurrentDays > 0)));
 		
 		toolbar.refreshUserQuery(adTabbox.getSelectedGridTab().getAD_Tab_ID(), getCurrentFindWindow() != null ? getCurrentFindWindow().getAD_UserQuery_ID() : 0);
 
+		// update from customized implementation
+		adtab.updateToolbar(toolbar);
 	}
 
 	/**
@@ -1879,15 +1895,10 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
         
         toolbar.enableTabNavigation(breadCrumb.hasParentLink(), adTabbox.getSelectedDetailADTabpanel() != null);
         
-        //Deepak-Enabling customize button IDEMPIERE-364
-        if(adTabbox.getSelectedTabpanel() instanceof ADSortTab){//consistent with updateToolbar
-        	toolbar.enableProcessButton (false);
-        	toolbar.enableCustomize(false);
-        }else{
-        	ADTabpanel adtab = (ADTabpanel) adTabbox.getSelectedTabpanel();
-            toolbar.enableProcessButton(!isNewRow && adtab != null && adtab.getToolbarButtons().size() > 0);
-            toolbar.enableCustomize(adtab.isGridView());
-        }
+        IADTabpanel adtab = adTabbox.getSelectedTabpanel();
+        toolbar.enableProcessButton(adtab != null && adtab.isEnableProcessButton());
+        toolbar.enableCustomize(adtab.isEnableCustomizeButton());
+
     }
 
     /**
@@ -3699,7 +3710,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
 	public void onProcess() {
 		ProcessButtonPopup popup = new ProcessButtonPopup();
 		popup.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "processButtonPopup");
-		ADTabpanel adtab = (ADTabpanel) adTabbox.getSelectedTabpanel();
+		IADTabpanel adtab = adTabbox.getSelectedTabpanel();
 		popup.render(adtab.getToolbarButtons());
 		if (popup.getChildren().size() > 0) {
 			popup.setPage(this.getComponent().getPage());
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java
index 8083a0dcfa..3f0372951c 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java
@@ -306,7 +306,7 @@ public class CompositeADTabbox extends AbstractADTabbox
 			headerTab.switchRowPresentation();
 		}
 		
-		if (!headerTab.getGridTab().isSortTab())
+		if (!headerTab.getGridTab().isSortTab() && headerTab instanceof ADTabpanel)
 			headerTab.getGridTab().setCurrentRow(row, true);
 		
 		if (headerTab.isGridView()) {
@@ -998,11 +998,15 @@ public class CompositeADTabbox extends AbstractADTabbox
 			headerTab.getDetailPane().updateToolbar(false, true);
 		} else {
 			tabPanel.dynamicDisplay(0);
-			RowRenderer renderer = tabPanel.getGridView().getListbox().getRowRenderer();
-			GridTabRowRenderer gtr = (GridTabRowRenderer)renderer;
-			Row row = gtr.getCurrentRow();
-			if (row != null)	
-				gtr.setCurrentRow(row);
+			if (tabPanel.getGridView() != null && tabPanel.getGridView().getListbox() != null) {
+				RowRenderer renderer = tabPanel.getGridView().getListbox().getRowRenderer();
+				if (renderer != null) {
+					GridTabRowRenderer gtr = (GridTabRowRenderer) renderer;
+					Row row = gtr.getCurrentRow();
+					if (row != null)
+						gtr.setCurrentRow(row);
+				}
+			}
 		}
 		if (wasForm) {
 			// maintain form on header when zooming to a detail tab
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java
index 67c1ba6762..1ecd5a352d 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java
@@ -89,21 +89,21 @@ public class DetailPane extends Panel implements EventListener, IdSpace {
 	/**
 	 * generated serial id
 	 */
-	private static final long serialVersionUID = -6839563468328913930L;
+	private static final long serialVersionUID = 6251897492168864784L;
 
-	private static final String BTN_PROCESS_ID = "BtnProcess";
+	public static final String BTN_PROCESS_ID = "BtnProcess";
 
-	private static final String BTN_DELETE_ID = "BtnDelete";
+	public static final String BTN_DELETE_ID = "BtnDelete";
 
-	private static final String BTN_EDIT_ID = "BtnEdit";
+	public static final String BTN_EDIT_ID = "BtnEdit";
 
-	private static final String BTN_NEW_ID = "BtnNew";
+	public static final String BTN_NEW_ID = "BtnNew";
 	
-	private static final String BTN_SAVE_ID = "BtnSave";
+	public static final String BTN_SAVE_ID = "BtnSave";
 	
-	private static final String BTN_QUICK_FORM_ID = "BtnQuickForm";
+	public static final String BTN_QUICK_FORM_ID = "BtnQuickForm";
 
-	private static final String BTN_CUSTOMIZE_ID = "BtnCustomize";
+	public static final String BTN_CUSTOMIZE_ID = "BtnCustomize";
 	
 	private static final String BTN_TOGGLE_ID = "BtnToggle";
 	
@@ -570,8 +570,9 @@ public class DetailPane extends Panel implements EventListener, IdSpace {
 	 */
 	protected void onProcess(Component button) {
 		ProcessButtonPopup popup = new ProcessButtonPopup();
-		ADTabpanel adtab = (ADTabpanel) getSelectedADTabpanel();
-		popup.render(adtab.getToolbarButtons());
+		IADTabpanel adtab = getSelectedADTabpanel();
+		if (adtab.getToolbarButtons() != null && adtab.getToolbarButtons().size() > 0)
+			popup.render(adtab.getToolbarButtons());
 		if (popup.getChildren().size() > 0) {
 			popup.setPage(button.getPage());
 			popup.open(button, "after_start");
@@ -885,8 +886,11 @@ public class DetailPane extends Panel implements EventListener, IdSpace {
         		}else {
         			btn.setVisible(true);
         		}
-        	}        	
-        }               
+        	}
+        }
+
+		// update from customized implementation
+		adtab.updateDetailToolbar(toolbar);
 	}
 	
 	private void updateProcessToolbar() {
@@ -906,7 +910,8 @@ public class DetailPane extends Panel implements EventListener, IdSpace {
         			if (adtab.getGridTab().isSortTab()) {
         				btn.setDisabled(true);
         			} else {
-        				btn.setDisabled(((ADTabpanel)adtab).getToolbarButtons().isEmpty());
+						boolean isToolbarDisabled = (adtab.getToolbarButtons() == null || adtab.getToolbarButtons().isEmpty());
+						btn.setDisabled(isToolbarDisabled);
         			}
         			break;
         		}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/IADTabpanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/IADTabpanel.java
index 83c85e96fd..2a0f687d8d 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/IADTabpanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/IADTabpanel.java
@@ -12,9 +12,13 @@
  *****************************************************************************/
 package org.adempiere.webui.adwindow;
 
+import java.util.List;
+
 import org.compiere.model.GridTab;
 import org.compiere.util.Evaluatee;
 import org.zkoss.zk.ui.Component;
+import org.zkoss.zul.Button;
+import org.zkoss.zul.Toolbar;
 
 /**
  * Interface for UI component that edit/display record using ad_tab definitions
@@ -26,6 +30,14 @@ public interface IADTabpanel extends Component, Evaluatee {
 	public static final String ON_ACTIVATE_EVENT = "onActivate";
 	public static final String ATTR_ON_ACTIVATE_POSTED = "org.adempiere.webui.adwindow.IADTabpanel.onActivatePosted";
 
+	/**
+	 * @param winPanel
+	 * @param windowNo
+	 * @param gridTab
+	 * @param gridWindow
+	 */
+	public void init(AbstractADWindowContent winPanel, GridTab gridTab);
+
 	/**
 	 * @return display logic
 	 */
@@ -141,7 +153,7 @@ public interface IADTabpanel extends Component, Evaluatee {
 	 * 
 	 * @return gridview instance
 	 */
-	public abstract GridView getGridView();	
+	public GridView getGridView();	
 	
 	/**
 	 * 
@@ -184,18 +196,18 @@ public interface IADTabpanel extends Component, Evaluatee {
 	/**
 	 * reset detail data grid when parent tab current record is new and not saved yet
 	 */
-	public abstract void resetDetailForNewParentRecord();
+	public void resetDetailForNewParentRecord();
 	
 	/**
 	 * @return treepanel instance
 	 */
-	public abstract ADTreePanel getTreePanel();	
+	public ADTreePanel getTreePanel();	
 
 	/**
 	 * @return Quick Form Button Enabled/Disabled
 	 */
-	public abstract boolean isEnableQuickFormButton();
-	
+	public boolean isEnableQuickFormButton();
+
 	/**
 	 * Get is detail pane visible
 	 * @return boolean
@@ -203,4 +215,37 @@ public interface IADTabpanel extends Component, Evaluatee {
 	public default boolean isDetailVisible() {
 		return false;
 	}
+	
+	/**
+	  *  @return List of toolbar buttons
+	 */
+	public List