IDEMPIERE-393 Setup wizards
This commit is contained in:
parent
a44a3a17df
commit
7fa15475a8
|
@ -0,0 +1,150 @@
|
|||
-- 201211201820_SetupWizard
|
||||
|
||||
--Nov 22, 2012 3:39:39 PM COT
|
||||
-- IDEMPIERE-393 Setup wizards
|
||||
ALTER TABLE AD_WizardProcess ADD COLUMN AD_User_ID NUMERIC(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Nov 15, 2012 5:07:01 PM COT
|
||||
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,IsEncrypted,Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton) VALUES (0,'N','N',0,200012,200913,'D','N','N','N',0,'N',30,'N',17,'N',138,'N','Y','286ad460-4317-40f1-afd5-582000e5fe0f','Y','N','AD_User_ID','User within the system - Internal or Business Partner Contact','The User identifies a unique user in the system. This could be an internal user or a business partner contact','User/Contact','Y',TO_DATE('2012-11-15 17:07:00','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-11-15 17:07:00','YYYY-MM-DD HH24:MI:SS'),0,0,'N')
|
||||
;
|
||||
|
||||
-- Nov 15, 2012 5:07:01 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200913 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:01:13 AM COT
|
||||
INSERT INTO AD_Window
|
||||
(AD_Window_ID, AD_Client_ID, AD_Org_ID, IsActive, Created, Createdby, Updated, UpdatedBy, Name, Description, WindowType, Issotrx, entitytype, processing, isdefault, winheight, winwidth, isbetafunctionality, ad_window_uu)
|
||||
VALUES (200020,0,0,'Y',TO_DATE('2012-11-20 11:01:13','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2012-11-20 11:34:06','YYYY-MM-DD HH24:MI:SS'),0,'Setup Wizard Maintenance','Maintenance Setup Wizard window','M','N','D','N','N',0,0,'N','ed26f18e-c8d2-4c3c-9a7a-a292429fd1e0')
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:04:49
|
||||
INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,Description,EntityType,HasTree,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,200031,200012,200020,TO_DATE('2012-11-20 11:04:49','YYYY-MM-DD HH24:MI:SS'),0,'Setup Wizard','D','N','Y','N','N','Y','N','N','N','N','Setup Wizard','N',10,0,TO_DATE('2012-11-20 11:04:49','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:05:56
|
||||
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,200315,200842,0,200031,TO_DATE('2012-11-20 11:05:56','YYYY-MM-DD HH24:MI:SS'),0,'Workflow Node (activity), step or process',10,'D','The Workflow Node indicates a unique step or process in a Workflow.','Y','Y','Y','N','N','N','Y','N','Node',TO_DATE('2012-11-20 15:26:20','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:05:57
|
||||
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,200913,200845,0,200031,TO_DATE('2012-11-20 11:05:57','YYYY-MM-DD HH24:MI:SS'),0,'User within the system - Internal or Business Partner Contact',10,'D','The User identifies a unique user in the system. This could be an internal user or a business partner contact','Y','Y','Y','N','N','N','N','N','User/Contact',TO_DATE('2012-11-20 15:26:37','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:05:58
|
||||
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,200310,200847,0,200031,TO_DATE('2012-11-20 11:05:58','YYYY-MM-DD HH24:MI:SS'),0,'',1,'D','','Y','Y','Y','N','N','N','N','N','Wizard Status',TO_DATE('2012-11-20 15:27:05','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:05:57
|
||||
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,200307,200844,0,200031,TO_DATE('2012-11-20 11:05:57','YYYY-MM-DD HH24:MI:SS'),0,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','Y','N','Organization',TO_DATE('2012-11-20 15:27:45','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:05:58
|
||||
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,200313,200846,0,200031,TO_DATE('2012-11-20 11:05:58','YYYY-MM-DD HH24:MI:SS'),0,'',22,'D','','Y','Y','Y','N','N','N','Y','N','Wizard Process',TO_DATE('2012-11-20 15:29:04','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:05:55
|
||||
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,200314,200840,0,200031,TO_DATE('2012-11-20 11:05:55','YYYY-MM-DD HH24:MI:SS'),0,'',36,'D','','Y','Y','Y','N','N','N','Y','N','AD_WizardProcess_UU',TO_DATE('2012-11-20 15:29:04','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:05:55
|
||||
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,200306,200841,0,200031,TO_DATE('2012-11-20 11:05:55','YYYY-MM-DD HH24:MI:SS'),0,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_DATE('2012-11-20 15:29:04','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:05:54
|
||||
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,200312,200839,0,200031,TO_DATE('2012-11-20 11:05:54','YYYY-MM-DD HH24:MI:SS'),0,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
|
||||
There are two reasons for de-activating and not deleting records:
|
||||
(1) The system requires the record for audit purposes.
|
||||
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','Y','N','Active',TO_DATE('2012-11-20 15:29:04','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:05:56
|
||||
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,200311,200843,0,200031,TO_DATE('2012-11-20 11:05:56','YYYY-MM-DD HH24:MI:SS'),0,'Optional additional user defined information',2000,'D','The Note field allows for optional entry of user defined information regarding this record','Y','Y','Y','N','N','N','N','N','Note',TO_DATE('2012-11-20 15:29:04','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 12:09:23 PM COT
|
||||
INSERT INTO AD_Menu (AD_Window_ID,AD_Menu_ID,IsSummary,IsSOTrx,IsReadOnly,EntityType,IsCentrallyMaintained,Name,action,AD_Menu_UU,IsActive,AD_Client_ID,CreatedBy,Updated,AD_Org_ID,Created,UpdatedBy) VALUES (200020,200026,'N','N','N','D','Y','Setup Wizard Maintenance','W','866bfc16-4543-43ea-856d-85e0c9be6463','Y',0,0,TO_DATE('2012-11-20 12:09:22','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2012-11-20 12:09:22','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 12:09:23 PM COT
|
||||
INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Menu_Trl_UU ) SELECT l.AD_Language,t.AD_Menu_ID, t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=200026 AND NOT EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 12:09:23 PM COT
|
||||
INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNodeMM_UU) SELECT t.AD_Client_ID, 0, 'Y', SysDate, 0, SysDate, 0,t.AD_Tree_ID, 200026, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200026)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 12:13:06 PM COT
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=10, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53083
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 12:18:55 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2012-11-20 12:18:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0, SeqNo=10 WHERE AD_Field_ID=200842
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 12:19:56 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2012-11-20 12:19:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0, XPosition=3, SeqNo=40 WHERE AD_Field_ID=200844
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 12:21:33 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2012-11-20 12:21:33','YYYY-MM-DD HH24:MI:SS'),SeqNo=50, UpdatedBy=0 WHERE AD_Field_ID=200846
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 12:22:02 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2012-11-20 12:22:02','YYYY-MM-DD HH24:MI:SS'),SeqNo=60, XPosition=3, UpdatedBy=0 WHERE AD_Field_ID=200840
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 12:22:48 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2012-11-20 12:22:48','YYYY-MM-DD HH24:MI:SS'),SeqNo=80, XPosition=4, UpdatedBy=0 WHERE AD_Field_ID=200839
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 2:52:50 PM COT
|
||||
UPDATE AD_Field SET SeqNo=90,NumLines=2, ColumnSpan=3, XPosition=3,Updated=TO_DATE('2012-11-20 14:52:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=200843
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 2:55:17 PM COT
|
||||
UPDATE AD_Field SET SeqNo=20, XPosition=3,Updated=TO_DATE('2012-11-20 14:55:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=200845
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 2:55:17 PM COT
|
||||
UPDATE AD_Field SET SeqNo=70,Updated=TO_DATE('2012-11-20 14:55:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=200841
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 2:55:17 PM COT
|
||||
UPDATE AD_Field SET SeqNo=30,Updated=TO_DATE('2012-11-20 14:55:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=200847
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 3:04:03 PM COT
|
||||
INSERT INTO AD_TreeBar (AD_Tree_ID,AD_User_ID,Node_ID, AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy)VALUES (10,0,495,0,0,'Y',SysDate,0,SysDate,0)
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201211201820_SetupWizard.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,150 @@
|
|||
-- 201211201820_SetupWizard
|
||||
|
||||
--Nov 22, 2012 3:39:39 PM COT
|
||||
-- IDEMPIERE-393 Setup wizards
|
||||
ALTER TABLE AD_WizardProcess ADD COLUMN AD_User_ID NUMERIC(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Nov 15, 2012 5:07:01 PM COT
|
||||
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,IsEncrypted,Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton) VALUES (0,'N','N',0,200012,200913,'D','N','N','N',0,'N',30,'N',17,'N',138,'N','Y','286ad460-4317-40f1-afd5-582000e5fe0f','Y','N','AD_User_ID','User within the system - Internal or Business Partner Contact','The User identifies a unique user in the system. This could be an internal user or a business partner contact','User/Contact','Y',TO_TIMESTAMP('2012-11-15 17:07:00','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-11-15 17:07:00','YYYY-MM-DD HH24:MI:SS'),0,0,'N')
|
||||
;
|
||||
|
||||
-- Nov 15, 2012 5:07:01 PM COT
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200913 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:01:13 AM COT
|
||||
INSERT INTO AD_Window
|
||||
(AD_Window_ID, AD_Client_ID, AD_Org_ID, IsActive, Created, Createdby, Updated, UpdatedBy, Name, Description, WindowType, Issotrx, entitytype, processing, isdefault, winheight, winwidth, isbetafunctionality, ad_window_uu)
|
||||
VALUES (200020,0,0,'Y',TO_TIMESTAMP('2012-11-20 11:01:13','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2012-11-20 11:34:06','YYYY-MM-DD HH24:MI:SS'),0,'Setup Wizard Maintenance','Maintenance Setup Wizard window','M','N','D','N','N',0,0,'N','ed26f18e-c8d2-4c3c-9a7a-a292429fd1e0')
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:04:49
|
||||
INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,Created,CreatedBy,Description,EntityType,HasTree,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,200031,200012,200020,TO_TIMESTAMP('2012-11-20 11:04:49','YYYY-MM-DD HH24:MI:SS'),0,'Setup Wizard','D','N','Y','N','N','Y','N','N','N','N','Setup Wizard','N',10,0,TO_TIMESTAMP('2012-11-20 11:04:49','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:05:56
|
||||
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,200315,200842,0,200031,TO_TIMESTAMP('2012-11-20 11:05:56','YYYY-MM-DD HH24:MI:SS'),0,'Workflow Node (activity), step or process',10,'D','The Workflow Node indicates a unique step or process in a Workflow.','Y','Y','Y','N','N','N','Y','N','Node',TO_TIMESTAMP('2012-11-20 15:26:20','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:05:57
|
||||
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,200913,200845,0,200031,TO_TIMESTAMP('2012-11-20 11:05:57','YYYY-MM-DD HH24:MI:SS'),0,'User within the system - Internal or Business Partner Contact',10,'D','The User identifies a unique user in the system. This could be an internal user or a business partner contact','Y','Y','Y','N','N','N','N','N','User/Contact',TO_TIMESTAMP('2012-11-20 15:26:37','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:05:58
|
||||
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,200310,200847,0,200031,TO_TIMESTAMP('2012-11-20 11:05:58','YYYY-MM-DD HH24:MI:SS'),0,'',1,'D','','Y','Y','Y','N','N','N','N','N','Wizard Status',TO_TIMESTAMP('2012-11-20 15:27:05','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:05:57
|
||||
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,200307,200844,0,200031,TO_TIMESTAMP('2012-11-20 11:05:57','YYYY-MM-DD HH24:MI:SS'),0,'Organizational entity within client',22,'D','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','Y','N','Organization',TO_TIMESTAMP('2012-11-20 15:27:45','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:05:58
|
||||
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,200313,200846,0,200031,TO_TIMESTAMP('2012-11-20 11:05:58','YYYY-MM-DD HH24:MI:SS'),0,'',22,'D','','Y','Y','Y','N','N','N','Y','N','Wizard Process',TO_TIMESTAMP('2012-11-20 15:29:04','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:05:55
|
||||
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,200314,200840,0,200031,TO_TIMESTAMP('2012-11-20 11:05:55','YYYY-MM-DD HH24:MI:SS'),0,'',36,'D','','Y','Y','Y','N','N','N','Y','N','AD_WizardProcess_UU',TO_TIMESTAMP('2012-11-20 15:29:04','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:05:55
|
||||
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,200306,200841,0,200031,TO_TIMESTAMP('2012-11-20 11:05:55','YYYY-MM-DD HH24:MI:SS'),0,'Client/Tenant for this installation.',22,'D','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','N','Client',TO_TIMESTAMP('2012-11-20 15:29:04','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:05:54
|
||||
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,200312,200839,0,200031,TO_TIMESTAMP('2012-11-20 11:05:54','YYYY-MM-DD HH24:MI:SS'),0,'The record is active in the system',1,'D','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
|
||||
There are two reasons for de-activating and not deleting records:
|
||||
(1) The system requires the record for audit purposes.
|
||||
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','Y','N','N','N','Y','N','Active',TO_TIMESTAMP('2012-11-20 15:29:04','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 11:05:56
|
||||
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,200311,200843,0,200031,TO_TIMESTAMP('2012-11-20 11:05:56','YYYY-MM-DD HH24:MI:SS'),0,'Optional additional user defined information',2000,'D','The Note field allows for optional entry of user defined information regarding this record','Y','Y','Y','N','N','N','N','N','Note',TO_TIMESTAMP('2012-11-20 15:29:04','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 12:09:23 PM COT
|
||||
INSERT INTO AD_Menu (AD_Window_ID,AD_Menu_ID,IsSummary,IsSOTrx,IsReadOnly,EntityType,IsCentrallyMaintained,Name,action,AD_Menu_UU,IsActive,AD_Client_ID,CreatedBy,Updated,AD_Org_ID,Created,UpdatedBy) VALUES (200020,200026,'N','N','N','D','Y','Setup Wizard Maintenance','W','866bfc16-4543-43ea-856d-85e0c9be6463','Y',0,0,TO_TIMESTAMP('2012-11-20 12:09:22','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2012-11-20 12:09:22','YYYY-MM-DD HH24:MI:SS'),0)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 12:09:23 PM COT
|
||||
INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Menu_Trl_UU ) SELECT l.AD_Language,t.AD_Menu_ID, t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=200026 AND NOT EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 12:09:23 PM COT
|
||||
INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNodeMM_UU) SELECT t.AD_Client_ID, 0, 'Y', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0,t.AD_Tree_ID, 200026, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200026)
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 12:13:06 PM COT
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=156, SeqNo=10, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53083
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 12:18:55 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2012-11-20 12:18:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0, SeqNo=10 WHERE AD_Field_ID=200842
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 12:19:56 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2012-11-20 12:19:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0, XPosition=3, SeqNo=40 WHERE AD_Field_ID=200844
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 12:21:33 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2012-11-20 12:21:33','YYYY-MM-DD HH24:MI:SS'),SeqNo=50, UpdatedBy=0 WHERE AD_Field_ID=200846
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 12:22:02 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2012-11-20 12:22:02','YYYY-MM-DD HH24:MI:SS'),SeqNo=60, XPosition=3, UpdatedBy=0 WHERE AD_Field_ID=200840
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 12:22:48 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2012-11-20 12:22:48','YYYY-MM-DD HH24:MI:SS'),SeqNo=80, XPosition=4, UpdatedBy=0 WHERE AD_Field_ID=200839
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 2:52:50 PM COT
|
||||
UPDATE AD_Field SET SeqNo=90,NumLines=2, ColumnSpan=3, XPosition=3,Updated=TO_TIMESTAMP('2012-11-20 14:52:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=200843
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 2:55:17 PM COT
|
||||
UPDATE AD_Field SET SeqNo=20, XPosition=3,Updated=TO_TIMESTAMP('2012-11-20 14:55:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=200845
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 2:55:17 PM COT
|
||||
UPDATE AD_Field SET SeqNo=70,Updated=TO_TIMESTAMP('2012-11-20 14:55:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=200841
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 2:55:17 PM COT
|
||||
UPDATE AD_Field SET SeqNo=30,Updated=TO_TIMESTAMP('2012-11-20 14:55:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=200847
|
||||
;
|
||||
|
||||
-- Nov 20, 2012 3:04:03 PM COT
|
||||
INSERT INTO AD_TreeBar (AD_Tree_ID,AD_User_ID,Node_ID, AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy)VALUES (10,0,495,0,0,'Y',CURRENT_TIMESTAMP,0,CURRENT_TIMESTAMP,0)
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201211201820_SetupWizard.sql') FROM dual
|
||||
;
|
||||
|
|
@ -62,6 +62,21 @@ public interface I_AD_WizardProcess
|
|||
*/
|
||||
public int getAD_Org_ID();
|
||||
|
||||
/** Column name AD_User_ID */
|
||||
public static final String COLUMNNAME_AD_User_ID = "AD_User_ID";
|
||||
|
||||
/** Set User/Contact.
|
||||
* User within the system - Internal or Business Partner Contact
|
||||
*/
|
||||
public void setAD_User_ID (int AD_User_ID);
|
||||
|
||||
/** Get User/Contact.
|
||||
* User within the system - Internal or Business Partner Contact
|
||||
*/
|
||||
public int getAD_User_ID();
|
||||
|
||||
public org.compiere.model.I_AD_User getAD_User() throws RuntimeException;
|
||||
|
||||
/** Column name AD_WF_Node_ID */
|
||||
public static final String COLUMNNAME_AD_WF_Node_ID = "AD_WF_Node_ID";
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ public class X_AD_WizardProcess extends PO implements I_AD_WizardProcess, I_Pers
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20121031L;
|
||||
private static final long serialVersionUID = 20121116L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_AD_WizardProcess (Properties ctx, int AD_WizardProcess_ID, String trxName)
|
||||
|
@ -70,6 +70,34 @@ public class X_AD_WizardProcess extends PO implements I_AD_WizardProcess, I_Pers
|
|||
return sb.toString();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_User getAD_User() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_User)MTable.get(getCtx(), org.compiere.model.I_AD_User.Table_Name)
|
||||
.getPO(getAD_User_ID(), get_TrxName()); }
|
||||
|
||||
/** Set User/Contact.
|
||||
@param AD_User_ID
|
||||
User within the system - Internal or Business Partner Contact
|
||||
*/
|
||||
public void setAD_User_ID (int AD_User_ID)
|
||||
{
|
||||
if (AD_User_ID < 1)
|
||||
set_Value (COLUMNNAME_AD_User_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID));
|
||||
}
|
||||
|
||||
/** Get User/Contact.
|
||||
@return User within the system - Internal or Business Partner Contact
|
||||
*/
|
||||
public int getAD_User_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_WF_Node getAD_WF_Node() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_WF_Node)MTable.get(getCtx(), org.compiere.model.I_AD_WF_Node.Table_Name)
|
||||
|
|
|
@ -24,13 +24,16 @@ import java.util.logging.Level;
|
|||
|
||||
import org.adempiere.model.MWizardProcess;
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.adempiere.webui.component.Button;
|
||||
import org.adempiere.webui.component.Checkbox;
|
||||
import org.adempiere.webui.component.Grid;
|
||||
import org.adempiere.webui.component.Label;
|
||||
import org.adempiere.webui.component.Panel;
|
||||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
import org.adempiere.webui.editor.WSearchEditor;
|
||||
import org.adempiere.webui.editor.WTableDirEditor;
|
||||
import org.adempiere.webui.event.ValueChangeEvent;
|
||||
import org.adempiere.webui.event.ValueChangeListener;
|
||||
|
@ -38,6 +41,7 @@ import org.adempiere.webui.panel.ADForm;
|
|||
import org.adempiere.webui.panel.CustomForm;
|
||||
import org.adempiere.webui.panel.IFormController;
|
||||
import org.adempiere.webui.session.SessionManager;
|
||||
import org.adempiere.webui.util.TreeUtils;
|
||||
import org.compiere.apps.form.SetupWizard;
|
||||
import org.compiere.model.MLookup;
|
||||
import org.compiere.model.MLookupFactory;
|
||||
|
@ -62,6 +66,7 @@ import org.zkoss.zul.Treecell;
|
|||
import org.zkoss.zul.Treechildren;
|
||||
import org.zkoss.zul.Treeitem;
|
||||
import org.zkoss.zul.Treerow;
|
||||
import org.zkoss.zul.Vbox;
|
||||
import org.zkoss.zul.West;
|
||||
|
||||
/**
|
||||
|
@ -87,17 +92,37 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
|||
private Label notesLabel = new Label(Msg.getElement(Env.getCtx(), MWizardProcess.COLUMNNAME_Note));
|
||||
private Textbox notesField = new Textbox();
|
||||
|
||||
private Label userLabel = new Label(Msg.getMsg(Env.getCtx(), "User"));
|
||||
private WSearchEditor userField;
|
||||
|
||||
private Label statusLabel = new Label();
|
||||
private WTableDirEditor statusField;
|
||||
|
||||
private Button bRefresh = new Button();
|
||||
private Button bOK = new Button();
|
||||
private Button bNext = new Button();
|
||||
private Button bZoom = new Button();
|
||||
private Button bExpand = new Button();
|
||||
|
||||
|
||||
|
||||
private Checkbox justmine = new Checkbox();
|
||||
private Checkbox showColors = new Checkbox();
|
||||
|
||||
private ArrayList<Treeitem> nextItems = new ArrayList<Treeitem>();
|
||||
|
||||
private static final String WIZARD_LABEL_STYLE = "font-weight: bold";
|
||||
private static final String NODE_LABEL_STYLE = "margin-left:20px";
|
||||
|
||||
private boolean expandTree = false;
|
||||
private Vbox east = new Vbox();
|
||||
private Vbox eastdown = new Vbox();
|
||||
private Vbox westdown = new Vbox();
|
||||
|
||||
private Boolean [] status= null;
|
||||
private boolean first = true;
|
||||
private int i = 0;
|
||||
|
||||
|
||||
|
||||
public WSetupWizard()
|
||||
{
|
||||
|
@ -106,6 +131,7 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
|||
preInit();
|
||||
jbInit ();
|
||||
LayoutUtils.sendDeferLayoutEvent(mainLayout, 100);
|
||||
first = false;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -120,6 +146,7 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
|||
{
|
||||
wfnodeTree = new Tree();
|
||||
wfnodeTree.addEventListener(Events.ON_SELECT, this);
|
||||
showColors.setChecked(true);
|
||||
loadWizardNodes();
|
||||
} // preInit
|
||||
|
||||
|
@ -128,14 +155,15 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
|||
*/
|
||||
private void loadWizardNodes() {
|
||||
Treechildren treeChildren = wfnodeTree.getTreechildren();
|
||||
List<MWorkflow> wfwizards = getWfWizards();
|
||||
if (treeChildren == null)
|
||||
{
|
||||
treeChildren = new Treechildren();
|
||||
wfnodeTree.appendChild(treeChildren);
|
||||
wfnodeTree.setMultiple(false);
|
||||
status= new Boolean[wfwizards.size()];
|
||||
}
|
||||
|
||||
List<MWorkflow> wfwizards = getWfWizards();
|
||||
for(MWorkflow wfwizard : wfwizards)
|
||||
{
|
||||
addWfEntry(wfwizard);
|
||||
|
@ -161,10 +189,18 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
|||
Treecell treecell = new Treecell();
|
||||
treerow.appendChild(treecell);
|
||||
treecell.appendChild(div);
|
||||
|
||||
if(first)
|
||||
nextItems.add(treeitemwf);
|
||||
|
||||
if (status[i] != null){
|
||||
treeitemwf.setOpen(status[i]);
|
||||
i++;
|
||||
}
|
||||
addNodes(wfwizard, treeitemwf);
|
||||
|
||||
treeitemwf.setAttribute("AD_Workflow_ID", wfwizard.getAD_Workflow_ID());
|
||||
|
||||
}
|
||||
|
||||
private void addNodes(MWorkflow wfwizard, Treeitem treeitemwf) {
|
||||
|
@ -177,7 +213,22 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
|||
private void addWfNode(MWFNode node, Treeitem treeitemwf) {
|
||||
/* TODO: Color of node according to wizard status */
|
||||
Label nodeLabel = new Label(node.getName(true));
|
||||
nodeLabel.setStyle(NODE_LABEL_STYLE);
|
||||
if (node != null && showColors.isChecked()){
|
||||
MWizardProcess wp = MWizardProcess.get(Env.getCtx(), node.getAD_WF_Node_ID(), Env.getAD_Client_ID(Env.getCtx()));
|
||||
|
||||
if (MWizardProcess.WIZARDSTATUS_Pending.equals(wp.getWizardStatus()) ||
|
||||
MWizardProcess.WIZARDSTATUS_Delayed.equals(wp.getWizardStatus()) ||
|
||||
MWizardProcess.WIZARDSTATUS_In_Progress.equals(wp.getWizardStatus()) ||
|
||||
wp.getWizardStatus() == null){
|
||||
nodeLabel.setStyle("background-color: #FFFF00;margin-left:20px;");
|
||||
|
||||
|
||||
}else if (MWizardProcess.WIZARDSTATUS_Finished.equals(wp.getWizardStatus()) ||
|
||||
MWizardProcess.WIZARDSTATUS_Skipped.equals(wp.getWizardStatus())){
|
||||
nodeLabel.setStyle("background-color: #00b300;margin-left:20px;");
|
||||
}
|
||||
}
|
||||
|
||||
Div div = new Div();
|
||||
div.setStyle("display:inline;");
|
||||
div.appendChild(nodeLabel);
|
||||
|
@ -198,6 +249,7 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
|||
treecell.appendChild(div);
|
||||
|
||||
childItem.setAttribute("AD_WF_Node_ID", node.getAD_WF_Node_ID());
|
||||
if(first)
|
||||
nextItems.add(childItem);
|
||||
}
|
||||
|
||||
|
@ -227,6 +279,24 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
|||
bNext.setTooltiptext(Msg.getMsg(Env.getCtx(), "Next"));
|
||||
bNext.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
bZoom.setImage("/images/Zoom16.png");
|
||||
bZoom.setTooltiptext(Msg.getMsg(Env.getCtx(), "Zoom"));
|
||||
bZoom.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
bExpand.setLabel("Expand Tree");
|
||||
bExpand.setTooltiptext(Msg.getMsg(Env.getCtx(), "ExpandTree"));
|
||||
bExpand.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
justmine.setLabel("Just Mine");
|
||||
justmine.setTooltiptext(Msg.getMsg(Env.getCtx(), "JustMine"));
|
||||
justmine.addEventListener(Events.ON_CHECK,this);
|
||||
|
||||
|
||||
showColors.setLabel("Show Colors");
|
||||
showColors.setTooltiptext(Msg.getMsg(Env.getCtx(), "ShowColors"));
|
||||
showColors.addEventListener(Events.ON_CHECK,this);
|
||||
|
||||
|
||||
North north = new North();
|
||||
mainLayout.appendChild(north);
|
||||
north.appendChild(northPanel);
|
||||
|
@ -247,12 +317,19 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
|||
statusField.setValue(MWizardProcess.WIZARDSTATUS_Pending);
|
||||
statusField.addValueChangeListener(this);
|
||||
|
||||
//
|
||||
east.setVflex("1");
|
||||
east.setHflex("1");
|
||||
West west = new West();
|
||||
mainLayout.appendChild(west);
|
||||
west.appendChild(wfnodeTree);
|
||||
west.appendChild(east);
|
||||
east.appendChild(wfnodeTree);
|
||||
wfnodeTree.setVflex("1");
|
||||
wfnodeTree.setHflex("1");
|
||||
east.appendChild(eastdown);
|
||||
eastdown.setOrient("horizontal");
|
||||
eastdown.appendChild(bExpand);
|
||||
eastdown.appendChild(justmine);
|
||||
eastdown.appendChild(showColors);
|
||||
west.setAutoscroll(true);
|
||||
west.setWidth("30%");
|
||||
|
||||
|
@ -288,17 +365,29 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
|||
notesField.setRows(4);
|
||||
notesField.setWidth("100%");
|
||||
|
||||
MLookup lookup = MLookupFactory.get(Env.getCtx(), form.getWindowNo(),
|
||||
0, 200913, DisplayType.Search);
|
||||
userField = new WSearchEditor(lookup, Msg.translate(
|
||||
Env.getCtx(), "AD_User_ID"), "", false, false, true);
|
||||
userField.addValueChangeListener(this);
|
||||
|
||||
|
||||
row = new Row();
|
||||
rows.appendChild(row);
|
||||
Div div = new Div();
|
||||
div.appendChild(statusLabel);
|
||||
div.appendChild(statusField.getComponent());
|
||||
div.appendChild(new Space());
|
||||
div.setAlign("right");
|
||||
div.appendChild(bRefresh);
|
||||
div.appendChild(bOK);
|
||||
div.appendChild(bNext);
|
||||
row.appendChild(div);
|
||||
westdown.setOrient("horizontal");
|
||||
westdown.appendChild(bZoom);
|
||||
westdown.appendChild(userLabel);
|
||||
westdown.appendChild(userField.getComponent());
|
||||
westdown.appendChild(new Space());
|
||||
westdown.appendChild(statusLabel);
|
||||
westdown.appendChild(statusField.getComponent());
|
||||
westdown.appendChild(new Space());
|
||||
westdown.appendChild(bRefresh);
|
||||
westdown.appendChild(bOK);
|
||||
westdown.appendChild(bNext);
|
||||
row.appendChild(westdown);
|
||||
row.setAlign("right");
|
||||
|
||||
|
||||
East east = new East();
|
||||
mainLayout.appendChild(east);
|
||||
|
@ -323,6 +412,7 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
|||
progressLabel.setText(msg);
|
||||
progressbar.setValue(percent);
|
||||
progressbar.setTooltiptext(msg);
|
||||
progressbar.setStyle("background: #BBC2DB;");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -345,25 +435,115 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
|||
refresh();
|
||||
showInRightPanel(0, m_node.getAD_WF_Node_ID());
|
||||
} else if (e.getTarget() == bOK) {
|
||||
save(notesField.getText(), (String) statusField.getValue());
|
||||
int userid = 0;
|
||||
if (!userField.isNullOrEmpty())
|
||||
userid = (Integer)userField.getValue();
|
||||
save(notesField.getText(), (String) statusField.getValue(), userid);
|
||||
showInRightPanel(0, m_node.getAD_WF_Node_ID());
|
||||
refreshProgress();
|
||||
repaintTree();
|
||||
} else if (e.getTarget() == bNext) {
|
||||
navigateToNext();
|
||||
} else if (e.getTarget() == bZoom) {
|
||||
zoom();
|
||||
} else if (e.getTarget() == bExpand) {
|
||||
expandTree();
|
||||
} else if (e.getTarget() == justmine) {
|
||||
justMine();
|
||||
} else if (e.getTarget() == showColors) {
|
||||
showColors();
|
||||
}
|
||||
|
||||
} // actionPerformed
|
||||
|
||||
private void showColors() {
|
||||
if(!showColors.isChecked()){
|
||||
for (Treeitem nextItem : nextItems){
|
||||
Treeitem ti= nextItem;
|
||||
if (ti.getLevel()!= 0){
|
||||
MWizardProcess wp = MWizardProcess.get(Env.getCtx(), (Integer) ti.getAttribute("AD_WF_Node_ID"), Env.getAD_Client_ID(Env.getCtx()));
|
||||
ti.setStyle("background-color: #FFFFFF;");
|
||||
}
|
||||
}
|
||||
}
|
||||
repaintTree();
|
||||
|
||||
}
|
||||
|
||||
private void justMine() {
|
||||
|
||||
if(justmine.isChecked()){
|
||||
showChildren(false);
|
||||
}else {
|
||||
showChildren(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void showChildren(Boolean show) {
|
||||
int user = Env.getAD_User_ID(Env.getCtx());
|
||||
for (Treeitem nextItem : nextItems){
|
||||
Treeitem ti= nextItem;
|
||||
if (ti.getLevel()!= 0){
|
||||
MWizardProcess wp = MWizardProcess.get(Env.getCtx(), (Integer) ti.getAttribute("AD_WF_Node_ID"), Env.getAD_Client_ID(Env.getCtx()));
|
||||
if (wp.getAD_User_ID() != user){
|
||||
ti.setVisible(show);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void expandTree() {
|
||||
if(!expandTree){
|
||||
TreeUtils.expandAll(wfnodeTree);
|
||||
expandTree = true;
|
||||
}else{
|
||||
TreeUtils.collapseAll(wfnodeTree);
|
||||
expandTree = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void zoom() {
|
||||
if(m_node != null)
|
||||
AEnv.zoom(m_node.getAD_Window_ID(), null);
|
||||
|
||||
}
|
||||
|
||||
private void repaintTree() {
|
||||
east.removeChild(wfnodeTree);
|
||||
east.removeChild(eastdown);
|
||||
east.setVflex("1");
|
||||
east.setHflex("1");
|
||||
for (Treeitem nextItem : nextItems){
|
||||
Treeitem ti= nextItem;
|
||||
ti.getValue();
|
||||
if(ti.getLevel()==0){
|
||||
status[i]= ti.isOpen();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
i=0;
|
||||
wfnodeTree.clear();
|
||||
loadWizardNodes();
|
||||
i=0;
|
||||
east.appendChild(wfnodeTree);
|
||||
east.appendChild(eastdown);
|
||||
refreshProgress();
|
||||
}
|
||||
|
||||
private void refresh() {
|
||||
if (m_node != null) {
|
||||
MWizardProcess wp = MWizardProcess.get(Env.getCtx(), m_node.getAD_WF_Node_ID(), Env.getAD_Client_ID(Env.getCtx()));
|
||||
notesField.setText(wp.getNote());
|
||||
statusField.setValue(wp.getWizardStatus());
|
||||
userField.setValue(wp.getAD_User());
|
||||
}
|
||||
}
|
||||
|
||||
private void navigateToNext() {
|
||||
if (m_node != null) {
|
||||
save(notesField.getText(), (String) statusField.getValue());
|
||||
save(notesField.getText(), (String) statusField.getValue(), (Integer)userField.getValue());
|
||||
refreshProgress();
|
||||
}
|
||||
Treeitem ti = wfnodeTree.getSelectedItem();
|
||||
|
@ -413,6 +593,11 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
|||
MWizardProcess wp = MWizardProcess.get(Env.getCtx(), ad_wf_node_id, Env.getAD_Client_ID(Env.getCtx()));
|
||||
notesField.setText(wp.getNote());
|
||||
statusField.setValue(wp.getWizardStatus());
|
||||
if (wp.getAD_User_ID()==0){
|
||||
userField.setValue(null);
|
||||
}else{
|
||||
userField.setValue(wp.getAD_User_ID());
|
||||
}
|
||||
setNotesPanelVisible(true);
|
||||
} else {
|
||||
MWorkflow wf = MWorkflow.get(Env.getCtx(), ad_workflow_id);
|
||||
|
@ -439,6 +624,9 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL
|
|||
bOK.setVisible(visible);
|
||||
statusLabel.setVisible(visible);
|
||||
statusField.setVisible(visible);
|
||||
userLabel.setVisible(visible);
|
||||
userField.setVisible(visible);
|
||||
bZoom.setVisible(visible);
|
||||
}
|
||||
|
||||
public ADForm getForm()
|
||||
|
|
|
@ -80,12 +80,14 @@ public class SetupWizard
|
|||
.list();
|
||||
}
|
||||
|
||||
public void save(String note, String wizardStatus) {
|
||||
public void save(String note, String wizardStatus, int userField) {
|
||||
MWizardProcess wp = MWizardProcess.get(Env.getCtx(), m_node.getAD_WF_Node_ID(), Env.getAD_Client_ID(Env.getCtx()));
|
||||
if (note != null && note.length() == 0)
|
||||
note = null;
|
||||
if (wizardStatus != null && wizardStatus.length() == 0)
|
||||
wizardStatus = null;
|
||||
if ((wp.getAD_User_ID() == 0 && userField != 0) || (userField == 0 && userField != wp.getAD_User_ID()))
|
||||
wp.setAD_User_ID(userField);
|
||||
if ((wp.getNote() == null && note != null) || (note != null && !note.equals(wp.getNote())))
|
||||
wp.setNote(note);
|
||||
if ((wp.getWizardStatus() == null && wizardStatus != null) || (wizardStatus != null && !wizardStatus.equals(wp.getWizardStatus())))
|
||||
|
|
Loading…
Reference in New Issue