IDEMPIERE-3000 Automatic opening of menu entries at login
This commit is contained in:
parent
bee8bc4d67
commit
a34211b032
|
@ -0,0 +1,233 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-3000
|
||||
-- Jan 12, 2016 10:23:45 AM CET
|
||||
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 (202958,0,0,'Y',TO_DATE('2016-01-12 10:23:44','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-12 10:23:44','YYYY-MM-DD HH24:MI:SS'),100,'IsFavourite','Favourite','This record is a favourite','Favourite','U','0a31aa8d-9aad-48b2-855c-746f80b9f261')
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:23:50 AM CET
|
||||
UPDATE AD_Element SET EntityType='D',Updated=TO_DATE('2016-01-12 10:23:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=202958
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:24:57 AM CET
|
||||
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 (202959,0,0,'Y',TO_DATE('2016-01-12 10:24:57','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-12 10:24:57','YYYY-MM-DD HH24:MI:SS'),100,'LoginOpenSeqNo','Login automatic open sequence','Determine the order items will be automatically opened when user logs in','Login automatic open sequence','D','4f45e332-f582-45ef-be7e-35f970fb3f74')
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:25:30 AM CET
|
||||
UPDATE AD_Column SET AD_Val_Rule_ID=150, IsUpdateable='N',Updated=TO_DATE('2016-01-12 10:25:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6212
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:26:05 AM CET
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (212587,0,'Favourite','This record is a favourite',456,'IsFavourite','Y',1,'N','N','Y','N','N',0,'N',20,0,0,'Y',TO_DATE('2016-01-12 10:26:04','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-12 10:26:04','YYYY-MM-DD HH24:MI:SS'),100,202958,'Y','N','U','N','N','N','Y','05a76d6a-3357-4ad7-b594-43652f111d49','Y',0,'N','N')
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:26:06 AM CET
|
||||
ALTER TABLE AD_TreeBar ADD IsFavourite CHAR(1) DEFAULT 'Y' CHECK (IsFavourite IN ('Y','N')) NOT NULL
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:26:09 AM CET
|
||||
ALTER TABLE AD_TreeBar MODIFY IsFavourite CHAR(1) DEFAULT 'Y'
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:26:09 AM CET
|
||||
UPDATE AD_TreeBar SET IsFavourite='Y' WHERE IsFavourite IS NULL
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:26:25 AM CET
|
||||
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_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 (212588,0,'Login automatic open sequence','Determine the order items will be automatically opened when user logs in',456,'LoginOpenSeqNo',10,'N','N','N','N','N',0,'N',11,0,0,'Y',TO_DATE('2016-01-12 10:26:25','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-12 10:26:25','YYYY-MM-DD HH24:MI:SS'),100,202959,'Y','N','U','N','N','N','Y','c0e29ca1-f92d-48aa-bd6b-b4d6ffb56ad5','Y',0,'N','N')
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:26:25 AM CET
|
||||
ALTER TABLE AD_TreeBar ADD LoginOpenSeqNo NUMBER(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:26:38 AM CET
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,ColumnSQL,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (212589,0,'Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',456,'Name',60,'N','N','N','N','Y',0,'N',10,0,0,'Y',TO_DATE('2016-01-12 10:26:38','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-12 10:26:38','YYYY-MM-DD HH24:MI:SS'),100,469,'N','Y','U','N','N','(SELECT Name FROM AD_Menu WHERE AD_Menu_ID = AD_TreeBar.Node_ID)','N','Y','b9dd089d-3bdf-4140-a9bf-9801221cbb58','N',0,'N','N')
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:26:54 AM CET
|
||||
UPDATE AD_Column SET IsUpdateable='N', IsSelectionColumn='Y', SeqNoSelection=1,Updated=TO_DATE('2016-01-12 10:26:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6212
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:26:58 AM CET
|
||||
UPDATE AD_Column SET IsUpdateable='N', IsSelectionColumn='Y', SeqNoSelection=2,Updated=TO_DATE('2016-01-12 10:26:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6214
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:27:03 AM CET
|
||||
UPDATE AD_Column SET SeqNoSelection=3,Updated=TO_DATE('2016-01-12 10:27:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212589
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:27:19 AM CET
|
||||
INSERT INTO AD_Window (AD_Window_ID,Name,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,WindowType,Processing,EntityType,IsSOTrx,IsDefault,WinHeight,WinWidth,IsBetaFunctionality,AD_Window_UU) VALUES (200083,'Menu favourites',0,0,'Y',TO_DATE('2016-01-12 10:27:18','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-12 10:27:18','YYYY-MM-DD HH24:MI:SS'),100,'M','N','D','Y','N',0,0,'N','6cc7d70f-6937-4dd0-bb29-1ae097e0e0c1')
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:27:27 AM CET
|
||||
UPDATE AD_Table SET AD_Window_ID=200083,Updated=TO_DATE('2016-01-12 10:27:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=456
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:27:51 AM CET
|
||||
UPDATE AD_Column SET EntityType='D',Updated=TO_DATE('2016-01-12 10:27:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212587
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:27:58 AM CET
|
||||
UPDATE AD_Column SET EntityType='D',Updated=TO_DATE('2016-01-12 10:27:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212588
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:28:03 AM CET
|
||||
UPDATE AD_Table SET IsHighVolume='Y',Updated=TO_DATE('2016-01-12 10:28:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=456
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:03 AM CET
|
||||
INSERT INTO AD_Tab (AD_Tab_ID,Name,Description,AD_Window_ID,SeqNo,IsSingleRow,AD_Table_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,HasTree,IsInfoTab,IsTranslationTab,IsReadOnly,Processing,ImportFields,TabLevel,IsSortTab,EntityType,IsInsertRecord,IsAdvancedTab,AD_Tab_UU,TreeDisplayedOn) VALUES (200209,'Menu entries','In this tab, you''ll be able to manage favourites and entries which will open automatically on login',200083,10,'N',456,0,0,'Y',TO_DATE('2016-01-12 10:29:03','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-12 10:29:03','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N','N','N','N',0,'N','U','Y','N','aca32c5d-0142-42f5-809a-770e152efa85','B')
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:13 AM CET
|
||||
UPDATE AD_Tab SET EntityType='D',Updated=TO_DATE('2016-01-12 10:29:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200209
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:17 AM CET
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,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 (204110,'Client','Client/Tenant for this installation.','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',200209,6205,'Y',22,10,'N','N','N','N',0,0,'Y',TO_DATE('2016-01-12 10:29:16','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-12 10:29:16','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','0740e23c-ec14-40b7-a389-56cee8660550','Y',10,2)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:17 AM CET
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,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,IsAllowCopy,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (204111,'Organization','Organizational entity within client','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.',200209,6206,'Y',22,20,'N','N','N','N',0,0,'Y',TO_DATE('2016-01-12 10:29:17','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-12 10:29:17','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','5c0062ec-c924-4ef1-871f-f6e184696c2a','Y','Y',20,4,2)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:18 AM CET
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,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 (204112,'Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',200209,212589,'Y',60,30,'N','N','N','N',0,0,'Y',TO_DATE('2016-01-12 10:29:17','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-12 10:29:17','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','9eae7aa7-cf87-4dc7-b00c-b00ec8a6c18b','Y',30,5)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:18 AM CET
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,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 (204113,'Tree','Identifies a Tree','The Tree field identifies a unique Tree in the system. Trees define roll ups or summary levels of information. They are used in reports for defining report points and summarization levels.',200209,6212,'Y',22,40,'N','N','N','N',0,0,'Y',TO_DATE('2016-01-12 10:29:18','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-12 10:29:18','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','62d8ad00-5561-4acb-9cca-4da54c032efc','Y',40,2)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:19 AM CET
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,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 (204114,'Node',200209,6213,'Y',22,50,'N','N','N','N',0,0,'Y',TO_DATE('2016-01-12 10:29:18','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-12 10:29:18','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','b4e6196a-f267-436f-b0a3-fdbd7e1dcba5','Y',50,2)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:19 AM CET
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,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 (204115,'User/Contact','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',200209,6214,'Y',22,60,'N','N','N','N',0,0,'Y',TO_DATE('2016-01-12 10:29:19','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-12 10:29:19','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','ba68215d-7892-4dc8-99e6-be917d88e551','Y',60,2)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:20 AM CET
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,ColumnSpan) VALUES (204116,'AD_TreeBar_UU',200209,60515,'N',36,'N','N','N','N',0,0,'Y',TO_DATE('2016-01-12 10:29:19','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-12 10:29:19','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','faf67edd-1c7f-4f41-a90a-7d5aad242f95','N',2)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:20 AM CET
|
||||
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,XPosition,ColumnSpan) VALUES (204117,'Favourite','This record is a favourite',200209,212587,'Y',1,70,'N','N','N','N',0,0,'Y',TO_DATE('2016-01-12 10:29:20','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-12 10:29:20','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','87f06de6-7c31-4342-9c9a-8f7884362608','Y',70,2,2)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:20 AM CET
|
||||
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 (204118,'Login automatic open sequence','Determine the order items will be automatically opened when user logs in',200209,212588,'Y',10,80,'N','N','N','N',0,0,'Y',TO_DATE('2016-01-12 10:29:20','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-12 10:29:20','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','1b3476cb-954d-4cc4-8eaf-b7c8cb2d084b','Y',80,2)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:21 AM CET
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,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,XPosition,ColumnSpan) VALUES (204119,'Active','The record is active in the system','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.',200209,6207,'Y',1,90,'N','N','N','N',0,0,'Y',TO_DATE('2016-01-12 10:29:20','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-12 10:29:20','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','741ce933-585b-4ff0-aac0-a8090f9bf61d','Y',90,2,2)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:44 AM CET
|
||||
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=204113
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:44 AM CET
|
||||
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=204115
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:44 AM CET
|
||||
UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=204112
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:35:49 AM CET
|
||||
INSERT INTO AD_Menu (AD_Menu_ID,Name,Action,AD_Window_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSummary,IsSOTrx,IsReadOnly,EntityType,IsCentrallyMaintained,AD_Menu_UU) VALUES (200137,'Menu favourites','W',200083,0,0,'Y',TO_DATE('2016-01-12 10:35:48','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-01-12 10:35:48','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N','D','Y','4c077852-7b04-4107-a383-f3273363dbf5')
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:35:49 AM CET
|
||||
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, 100, SysDate, 100,t.AD_Tree_ID, 200137, 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=200137)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=334
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=498
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=224
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=145
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=336
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=341
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=144
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=170
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=8, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=465
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=9, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200137
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=10, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=101
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=11, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=294
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=12, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=395
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=13, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=296
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=14, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=221
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=15, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=233
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=16, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=290
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=17, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=109
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=18, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200093
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=19, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=50008
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201609091030_IDEMPIERE-3000.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,232 @@
|
|||
-- IDEMPIERE-3000
|
||||
-- Jan 12, 2016 10:23:45 AM CET
|
||||
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 (202958,0,0,'Y',TO_TIMESTAMP('2016-01-12 10:23:44','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-12 10:23:44','YYYY-MM-DD HH24:MI:SS'),100,'IsFavourite','Favourite','This record is a favourite','Favourite','U','0a31aa8d-9aad-48b2-855c-746f80b9f261')
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:23:50 AM CET
|
||||
UPDATE AD_Element SET EntityType='D',Updated=TO_TIMESTAMP('2016-01-12 10:23:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=202958
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:24:57 AM CET
|
||||
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 (202959,0,0,'Y',TO_TIMESTAMP('2016-01-12 10:24:57','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-12 10:24:57','YYYY-MM-DD HH24:MI:SS'),100,'LoginOpenSeqNo','Login automatic open sequence','Determine the order items will be automatically opened when user logs in','Login automatic open sequence','D','4f45e332-f582-45ef-be7e-35f970fb3f74')
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:25:30 AM CET
|
||||
UPDATE AD_Column SET AD_Val_Rule_ID=150, IsUpdateable='N',Updated=TO_TIMESTAMP('2016-01-12 10:25:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6212
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:26:05 AM CET
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (212587,0,'Favourite','This record is a favourite',456,'IsFavourite','Y',1,'N','N','Y','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2016-01-12 10:26:04','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-12 10:26:04','YYYY-MM-DD HH24:MI:SS'),100,202958,'Y','N','U','N','N','N','Y','05a76d6a-3357-4ad7-b594-43652f111d49','Y',0,'N','N')
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:26:06 AM CET
|
||||
ALTER TABLE AD_TreeBar ADD COLUMN IsFavourite CHAR(1) DEFAULT 'Y' CHECK (IsFavourite IN ('Y','N')) NOT NULL
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:26:09 AM CET
|
||||
INSERT INTO t_alter_column values('ad_treebar','IsFavourite','CHAR(1)',null,'Y')
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:26:09 AM CET
|
||||
UPDATE AD_TreeBar SET IsFavourite='Y' WHERE IsFavourite IS NULL
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:26:25 AM CET
|
||||
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_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 (212588,0,'Login automatic open sequence','Determine the order items will be automatically opened when user logs in',456,'LoginOpenSeqNo',10,'N','N','N','N','N',0,'N',11,0,0,'Y',TO_TIMESTAMP('2016-01-12 10:26:25','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-12 10:26:25','YYYY-MM-DD HH24:MI:SS'),100,202959,'Y','N','U','N','N','N','Y','c0e29ca1-f92d-48aa-bd6b-b4d6ffb56ad5','Y',0,'N','N')
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:26:25 AM CET
|
||||
ALTER TABLE AD_TreeBar ADD COLUMN LoginOpenSeqNo NUMERIC(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:26:38 AM CET
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,ColumnSQL,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (212589,0,'Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',456,'Name',60,'N','N','N','N','Y',0,'N',10,0,0,'Y',TO_TIMESTAMP('2016-01-12 10:26:38','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-12 10:26:38','YYYY-MM-DD HH24:MI:SS'),100,469,'N','Y','U','N','N','(SELECT Name FROM AD_Menu WHERE AD_Menu_ID = AD_TreeBar.Node_ID)','N','Y','b9dd089d-3bdf-4140-a9bf-9801221cbb58','N',0,'N','N')
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:26:54 AM CET
|
||||
UPDATE AD_Column SET IsUpdateable='N', IsSelectionColumn='Y', SeqNoSelection=1,Updated=TO_TIMESTAMP('2016-01-12 10:26:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6212
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:26:58 AM CET
|
||||
UPDATE AD_Column SET IsUpdateable='N', IsSelectionColumn='Y', SeqNoSelection=2,Updated=TO_TIMESTAMP('2016-01-12 10:26:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6214
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:27:03 AM CET
|
||||
UPDATE AD_Column SET SeqNoSelection=3,Updated=TO_TIMESTAMP('2016-01-12 10:27:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212589
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:27:19 AM CET
|
||||
INSERT INTO AD_Window (AD_Window_ID,Name,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,WindowType,Processing,EntityType,IsSOTrx,IsDefault,WinHeight,WinWidth,IsBetaFunctionality,AD_Window_UU) VALUES (200083,'Menu favourites',0,0,'Y',TO_TIMESTAMP('2016-01-12 10:27:18','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-12 10:27:18','YYYY-MM-DD HH24:MI:SS'),100,'M','N','D','Y','N',0,0,'N','6cc7d70f-6937-4dd0-bb29-1ae097e0e0c1')
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:27:27 AM CET
|
||||
UPDATE AD_Table SET AD_Window_ID=200083,Updated=TO_TIMESTAMP('2016-01-12 10:27:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=456
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:27:51 AM CET
|
||||
UPDATE AD_Column SET EntityType='D',Updated=TO_TIMESTAMP('2016-01-12 10:27:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212587
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:27:58 AM CET
|
||||
UPDATE AD_Column SET EntityType='D',Updated=TO_TIMESTAMP('2016-01-12 10:27:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212588
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:28:03 AM CET
|
||||
UPDATE AD_Table SET IsHighVolume='Y',Updated=TO_TIMESTAMP('2016-01-12 10:28:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=456
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:03 AM CET
|
||||
INSERT INTO AD_Tab (AD_Tab_ID,Name,Description,AD_Window_ID,SeqNo,IsSingleRow,AD_Table_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,HasTree,IsInfoTab,IsTranslationTab,IsReadOnly,Processing,ImportFields,TabLevel,IsSortTab,EntityType,IsInsertRecord,IsAdvancedTab,AD_Tab_UU,TreeDisplayedOn) VALUES (200209,'Menu entries','In this tab, you''ll be able to manage favourites and entries which will open automatically on login',200083,10,'N',456,0,0,'Y',TO_TIMESTAMP('2016-01-12 10:29:03','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-12 10:29:03','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N','N','N','N',0,'N','U','Y','N','aca32c5d-0142-42f5-809a-770e152efa85','B')
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:13 AM CET
|
||||
UPDATE AD_Tab SET EntityType='D',Updated=TO_TIMESTAMP('2016-01-12 10:29:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200209
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:17 AM CET
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,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 (204110,'Client','Client/Tenant for this installation.','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',200209,6205,'Y',22,10,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2016-01-12 10:29:16','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-12 10:29:16','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','0740e23c-ec14-40b7-a389-56cee8660550','Y',10,2)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:17 AM CET
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,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,IsAllowCopy,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (204111,'Organization','Organizational entity within client','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.',200209,6206,'Y',22,20,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2016-01-12 10:29:17','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-12 10:29:17','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','5c0062ec-c924-4ef1-871f-f6e184696c2a','Y','Y',20,4,2)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:18 AM CET
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,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 (204112,'Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',200209,212589,'Y',60,30,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2016-01-12 10:29:17','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-12 10:29:17','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','U','9eae7aa7-cf87-4dc7-b00c-b00ec8a6c18b','Y',30,5)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:18 AM CET
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,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 (204113,'Tree','Identifies a Tree','The Tree field identifies a unique Tree in the system. Trees define roll ups or summary levels of information. They are used in reports for defining report points and summarization levels.',200209,6212,'Y',22,40,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2016-01-12 10:29:18','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-12 10:29:18','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','62d8ad00-5561-4acb-9cca-4da54c032efc','Y',40,2)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:19 AM CET
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,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 (204114,'Node',200209,6213,'Y',22,50,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2016-01-12 10:29:18','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-12 10:29:18','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','b4e6196a-f267-436f-b0a3-fdbd7e1dcba5','Y',50,2)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:19 AM CET
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,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 (204115,'User/Contact','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',200209,6214,'Y',22,60,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2016-01-12 10:29:19','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-12 10:29:19','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','ba68215d-7892-4dc8-99e6-be917d88e551','Y',60,2)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:20 AM CET
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,ColumnSpan) VALUES (204116,'AD_TreeBar_UU',200209,60515,'N',36,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2016-01-12 10:29:19','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-12 10:29:19','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','faf67edd-1c7f-4f41-a90a-7d5aad242f95','N',2)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:20 AM CET
|
||||
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,XPosition,ColumnSpan) VALUES (204117,'Favourite','This record is a favourite',200209,212587,'Y',1,70,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2016-01-12 10:29:20','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-12 10:29:20','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','87f06de6-7c31-4342-9c9a-8f7884362608','Y',70,2,2)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:20 AM CET
|
||||
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 (204118,'Login automatic open sequence','Determine the order items will be automatically opened when user logs in',200209,212588,'Y',10,80,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2016-01-12 10:29:20','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-12 10:29:20','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','1b3476cb-954d-4cc4-8eaf-b7c8cb2d084b','Y',80,2)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:21 AM CET
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,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,XPosition,ColumnSpan) VALUES (204119,'Active','The record is active in the system','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.',200209,6207,'Y',1,90,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2016-01-12 10:29:20','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-12 10:29:20','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','741ce933-585b-4ff0-aac0-a8090f9bf61d','Y',90,2,2)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:44 AM CET
|
||||
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=204113
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:44 AM CET
|
||||
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=204115
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:29:44 AM CET
|
||||
UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=204112
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:35:49 AM CET
|
||||
INSERT INTO AD_Menu (AD_Menu_ID,Name,"action",AD_Window_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSummary,IsSOTrx,IsReadOnly,EntityType,IsCentrallyMaintained,AD_Menu_UU) VALUES (200137,'Menu favourites','W',200083,0,0,'Y',TO_TIMESTAMP('2016-01-12 10:35:48','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-01-12 10:35:48','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N','D','Y','4c077852-7b04-4107-a383-f3273363dbf5')
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:35:49 AM CET
|
||||
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', statement_timestamp(), 100, statement_timestamp(), 100,t.AD_Tree_ID, 200137, 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=200137)
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=0, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=334
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=1, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=498
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=2, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=224
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=3, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=145
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=4, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=336
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=5, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=341
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=6, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=144
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=7, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=170
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=8, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=465
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=9, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200137
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=10, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=101
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=11, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=294
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=12, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=395
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=13, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=296
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=14, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=221
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=15, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=233
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=16, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=290
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=17, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=109
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=18, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200093
|
||||
;
|
||||
|
||||
-- Jan 12, 2016 10:36:19 AM CET
|
||||
UPDATE AD_TreeNodeMM SET Parent_ID=161, SeqNo=19, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=50008
|
||||
;
|
||||
|
||||
|
||||
|
||||
SELECT register_migration_script('201609091030_IDEMPIERE-3000.sql') FROM dual
|
||||
;
|
|
@ -130,6 +130,45 @@ public interface I_AD_TreeBar
|
|||
*/
|
||||
public boolean isActive();
|
||||
|
||||
/** Column name IsFavourite */
|
||||
public static final String COLUMNNAME_IsFavourite = "IsFavourite";
|
||||
|
||||
/** Set Favourite.
|
||||
* This record is a favourite
|
||||
*/
|
||||
public void setIsFavourite (boolean IsFavourite);
|
||||
|
||||
/** Get Favourite.
|
||||
* This record is a favourite
|
||||
*/
|
||||
public boolean isFavourite();
|
||||
|
||||
/** Column name LoginOpenSeqNo */
|
||||
public static final String COLUMNNAME_LoginOpenSeqNo = "LoginOpenSeqNo";
|
||||
|
||||
/** Set Login automatic open sequence.
|
||||
* Determine the order items will be automatically opened when user logs in
|
||||
*/
|
||||
public void setLoginOpenSeqNo (int LoginOpenSeqNo);
|
||||
|
||||
/** Get Login automatic open sequence.
|
||||
* Determine the order items will be automatically opened when user logs in
|
||||
*/
|
||||
public int getLoginOpenSeqNo();
|
||||
|
||||
/** Column name Name */
|
||||
public static final String COLUMNNAME_Name = "Name";
|
||||
|
||||
/** Set Name.
|
||||
* Alphanumeric identifier of the entity
|
||||
*/
|
||||
public void setName (String Name);
|
||||
|
||||
/** Get Name.
|
||||
* Alphanumeric identifier of the entity
|
||||
*/
|
||||
public String getName();
|
||||
|
||||
/** Column name Node_ID */
|
||||
public static final String COLUMNNAME_Node_ID = "Node_ID";
|
||||
|
||||
|
|
|
@ -44,12 +44,12 @@ import org.compiere.util.Env;
|
|||
*/
|
||||
public class MTree extends MTree_Base
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -6412057411585787707L;
|
||||
|
||||
|
||||
/**
|
||||
* Default Constructor.
|
||||
* Need to call loadNodes explicitly
|
||||
|
@ -229,7 +229,7 @@ public class MTree extends MTree_Base
|
|||
+ "tn.Node_ID,tn.Parent_ID,tn.SeqNo,tb.IsActive "
|
||||
+ "FROM ").append(getNodeTableName()).append(" tn"
|
||||
+ " LEFT OUTER JOIN AD_TreeBar tb ON (tn.AD_Tree_ID=tb.AD_Tree_ID"
|
||||
+ " AND tn.Node_ID=tb.Node_ID "
|
||||
+ " AND tn.Node_ID=tb.Node_ID AND tb.IsFavourite = 'Y'"
|
||||
+ (AD_User_ID != -1 ? " AND tb.AD_User_ID=? ": "") // #1 (conditional)
|
||||
+ ") "
|
||||
+ "WHERE tn.AD_Tree_ID=?"); // #2
|
||||
|
|
|
@ -30,7 +30,7 @@ public class X_AD_TreeBar extends PO implements I_AD_TreeBar, I_Persistent
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20151030L;
|
||||
private static final long serialVersionUID = 20160112L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_AD_TreeBar (Properties ctx, int AD_TreeBar_ID, String trxName)
|
||||
|
@ -40,6 +40,8 @@ public class X_AD_TreeBar extends PO implements I_AD_TreeBar, I_Persistent
|
|||
{
|
||||
setAD_Tree_ID (0);
|
||||
setAD_User_ID (0);
|
||||
setIsFavourite (true);
|
||||
// Y
|
||||
setNode_ID (0);
|
||||
} */
|
||||
}
|
||||
|
@ -142,6 +144,66 @@ public class X_AD_TreeBar extends PO implements I_AD_TreeBar, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Favourite.
|
||||
@param IsFavourite
|
||||
This record is a favourite
|
||||
*/
|
||||
public void setIsFavourite (boolean IsFavourite)
|
||||
{
|
||||
set_Value (COLUMNNAME_IsFavourite, Boolean.valueOf(IsFavourite));
|
||||
}
|
||||
|
||||
/** Get Favourite.
|
||||
@return This record is a favourite
|
||||
*/
|
||||
public boolean isFavourite ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_IsFavourite);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Set Login automatic open sequence.
|
||||
@param LoginOpenSeqNo
|
||||
Determine the order items will be automatically opened when user logs in
|
||||
*/
|
||||
public void setLoginOpenSeqNo (int LoginOpenSeqNo)
|
||||
{
|
||||
set_Value (COLUMNNAME_LoginOpenSeqNo, Integer.valueOf(LoginOpenSeqNo));
|
||||
}
|
||||
|
||||
/** Get Login automatic open sequence.
|
||||
@return Determine the order items will be automatically opened when user logs in
|
||||
*/
|
||||
public int getLoginOpenSeqNo ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_LoginOpenSeqNo);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Name.
|
||||
@param Name
|
||||
Alphanumeric identifier of the entity
|
||||
*/
|
||||
public void setName (String Name)
|
||||
{
|
||||
throw new IllegalArgumentException ("Name is virtual column"); }
|
||||
|
||||
/** Get Name.
|
||||
@return Alphanumeric identifier of the entity
|
||||
*/
|
||||
public String getName ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_Name);
|
||||
}
|
||||
|
||||
/** Set Node.
|
||||
@param Node_ID Node */
|
||||
public void setNode_ID (int Node_ID)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -arch ${target.arch} -nl ${target.nl} -consoleLog -console"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.noShutdown=true -Dosgi.framework.activeThreadType=normal -Dosgi.compatibility.bootdelegation=true -Dosgi.console.enable.builtin=false -XX:MaxPermSize=128M -Djetty.home=${workspace_loc}/jettyhome -Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-selector.xml,etc/jetty-ssl.xml,etc/jetty-https.xml,etc/jetty-deployer.xml -Dmail.mime.encodefilename=true -Dmail.mime.decodefilename=true -Dmail.mime.encodeparameters=true -Dmail.mime.decodeparameters=true -Dhazelcast.config=${workspace_loc}/org.adempiere.server-feature/hazelcast-template.xml"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.noShutdown=true -Dosgi.framework.activeThreadType=normal -Dosgi.compatibility.bootdelegation=true -Dosgi.console.enable.builtin=false -XX:MaxPermSize=128M -Djetty.home=${workspace_loc}/jettyhome -Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-selector.xml,etc/jetty-ssl.xml,etc/jetty-https.xml,etc/jetty-deployer.xml -Dmail.mime.encodefilename=true -Dmail.mime.decodefilename=true -Dmail.mime.encodeparameters=true -Dmail.mime.decodeparameters=true -Dhazelcast.config=${workspace_loc}/org.adempiere.server-feature/hazelcast-template.xml -Dorg.idempiere.db.postgresql.debug=true"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc}"/>
|
||||
<stringAttribute key="pde.version" value="3.3"/>
|
||||
<stringAttribute key="product" value="org.adempiere.server.server_product"/>
|
||||
|
|
|
@ -17,8 +17,12 @@
|
|||
|
||||
package org.adempiere.webui;
|
||||
|
||||
import static org.compiere.model.SystemIDs.TREE_MENUPRIMARY;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
@ -41,6 +45,7 @@ import org.adempiere.webui.session.SessionManager;
|
|||
import org.adempiere.webui.theme.ThemeManager;
|
||||
import org.adempiere.webui.util.BrowserToken;
|
||||
import org.adempiere.webui.util.UserPreference;
|
||||
import org.compiere.model.MMenu;
|
||||
import org.compiere.model.MRole;
|
||||
import org.compiere.model.MSession;
|
||||
import org.compiere.model.MSysConfig;
|
||||
|
@ -49,6 +54,7 @@ import org.compiere.model.MTable;
|
|||
import org.compiere.model.MUser;
|
||||
import org.compiere.model.MUserPreference;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Language;
|
||||
import org.compiere.util.Msg;
|
||||
|
@ -79,10 +85,11 @@ import org.zkoss.zul.Window;
|
|||
*/
|
||||
public class AdempiereWebUI extends Window implements EventListener<Event>, IWebClient
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 2030098494203345181L;
|
||||
private static final long serialVersionUID = -3320656546509525766L;
|
||||
|
||||
private static final String SAVED_CONTEXT = "saved.context";
|
||||
|
||||
|
@ -283,6 +290,7 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
|
|||
Env.setContext(ctx, "#LocalHttpAddr", localHttpAddr.toString());
|
||||
Clients.response(new AuScript("zAu.cmd0.clearBusy()"));
|
||||
|
||||
automaticOpen();
|
||||
processParameters();
|
||||
}
|
||||
|
||||
|
@ -542,4 +550,69 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
|
|||
}
|
||||
return uploadSetting.toString();
|
||||
}
|
||||
|
||||
int getMenuID()
|
||||
{
|
||||
int AD_Role_ID = Env.getAD_Role_ID(Env.getCtx());
|
||||
int AD_Tree_ID = DB.getSQLValue(null,
|
||||
"SELECT COALESCE(r.AD_Tree_Menu_ID, ci.AD_Tree_Menu_ID)"
|
||||
+ "FROM AD_ClientInfo ci"
|
||||
+ " INNER JOIN AD_Role r ON (ci.AD_Client_ID=r.AD_Client_ID) "
|
||||
+ "WHERE AD_Role_ID=?", AD_Role_ID);
|
||||
if (AD_Tree_ID <= 0)
|
||||
AD_Tree_ID = TREE_MENUPRIMARY; // Menu
|
||||
|
||||
return AD_Tree_ID;
|
||||
}
|
||||
|
||||
private void automaticOpen() {
|
||||
|
||||
StringBuilder sql = new StringBuilder("SELECT m.Action, COALESCE(m.AD_Window_ID, m.AD_Process_ID, m.AD_Form_ID, m.AD_Workflow_ID, m.AD_Task_ID, AD_InfoWindow_ID) ")
|
||||
.append(" FROM AD_TreeBar tb")
|
||||
.append(" INNER JOIN AD_Menu m ON (tb.Node_ID = m.AD_Menu_ID)")
|
||||
.append(" WHERE tb.AD_Tree_ID = ").append(getMenuID())
|
||||
.append(" AND tb.AD_User_ID = ").append(Env.getAD_User_ID(Env.getCtx()))
|
||||
.append(" AND tb.IsActive = 'Y' AND tb.LoginOpenSeqNo > 0")
|
||||
.append(" ORDER BY tb.LoginOpenSeqNo");
|
||||
|
||||
List<List<Object>> rows = DB.getSQLArrayObjectsEx(null, sql.toString());
|
||||
if (rows != null && rows.size() > 0) {
|
||||
for (List<Object> row : rows) {
|
||||
|
||||
String action = (String) row.get(0);
|
||||
int recordID = ((BigDecimal) row.get(1)).intValue();
|
||||
|
||||
if (action.equals(MMenu.ACTION_Form)) {
|
||||
Boolean access = MRole.getDefault().getFormAccess(recordID);
|
||||
if (access != null && access)
|
||||
SessionManager.getAppDesktop().openForm(recordID);
|
||||
}
|
||||
else if (action.equals(MMenu.ACTION_Info)) {
|
||||
Boolean access = MRole.getDefault().getInfoAccess(recordID);
|
||||
if (access != null && access)
|
||||
SessionManager.getAppDesktop().openInfo(recordID);
|
||||
}
|
||||
else if (action.equals(MMenu.ACTION_Process) || action.equals(MMenu.ACTION_Report)) {
|
||||
Boolean access = MRole.getDefault().getProcessAccess(recordID);
|
||||
if (access != null && access)
|
||||
SessionManager.getAppDesktop().openProcessDialog(recordID, DB.getSQLValueStringEx(null, "SELECT IsSOTrx FROM AD_Menu WHERE AD_Menu_ID = ?", recordID).equals("Y"));
|
||||
}
|
||||
else if (action.equals(MMenu.ACTION_Task)) {
|
||||
Boolean access = MRole.getDefault().getTaskAccess(recordID);
|
||||
if (access != null && access)
|
||||
SessionManager.getAppDesktop().openTask(recordID);
|
||||
}
|
||||
else if (action.equals(MMenu.ACTION_Window)) {
|
||||
Boolean access = MRole.getDefault().getWindowAccess(recordID);
|
||||
if (access != null && access)
|
||||
SessionManager.getAppDesktop().openWindow(recordID, null);
|
||||
}
|
||||
else if (action.equals(MMenu.ACTION_WorkFlow)) {
|
||||
Boolean access = MRole.getDefault().getWorkflowAccess(recordID);
|
||||
if (access != null && access)
|
||||
SessionManager.getAppDesktop().openWorkflow(recordID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,12 +58,13 @@ import org.zkoss.zul.Vbox;
|
|||
*/
|
||||
public class DPFavourites extends DashboardPanel implements EventListener<Event> {
|
||||
|
||||
private static final String NODE_ID_ATTR = "Node_ID";
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -481859785800845108L;
|
||||
private static final long serialVersionUID = 8398216266900311289L;
|
||||
|
||||
private static final String NODE_ID_ATTR = "Node_ID";
|
||||
|
||||
|
||||
public static final String FAVOURITE_DROPPABLE = "favourite";
|
||||
|
||||
|
@ -180,19 +181,36 @@ public class DPFavourites extends DashboardPanel implements EventListener<Event>
|
|||
int AD_Org_ID = Env.getContextAsInt(Env.getCtx(), "#AD_Org_ID");
|
||||
int AD_User_ID = Env.getContextAsInt(Env.getCtx(), "#AD_User_ID");
|
||||
StringBuilder sql = new StringBuilder();
|
||||
if (add)
|
||||
sql.append("INSERT INTO AD_TreeBar "
|
||||
+ "(AD_Tree_ID,AD_User_ID,Node_ID, "
|
||||
+ "AD_Client_ID,AD_Org_ID, "
|
||||
+ "IsActive,Created,CreatedBy,Updated,UpdatedBy)VALUES (")
|
||||
.append(m_AD_Tree_ID).append(",").append(AD_User_ID).append(",").append(Node_ID).append(",")
|
||||
.append(AD_Client_ID).append(",").append(AD_Org_ID).append(",")
|
||||
.append("'Y',SysDate,").append(AD_User_ID).append(",SysDate,").append(AD_User_ID).append(")");
|
||||
// if already exist, will result in ORA-00001: unique constraint (ADEMPIERE.AD_TREEBAR_KEY)
|
||||
else
|
||||
sql.append("DELETE AD_TreeBar WHERE AD_Tree_ID=").append(m_AD_Tree_ID)
|
||||
if (add) {
|
||||
// If record already exist, we will only make an update
|
||||
if (DB.getSQLValueEx(null, "SELECT 1 FROM AD_TreeBar WHERE AD_Tree_ID = ? AND AD_User_ID = ? AND Node_ID = ?", m_AD_Tree_ID, AD_User_ID, Node_ID) == 1) {
|
||||
sql.append("UPDATE AD_TreeBar SET IsFavourite = 'Y', Updated = Sysdate, UpdatedBy = ").append(AD_User_ID).append(" WHERE AD_Tree_ID = ").append(m_AD_Tree_ID)
|
||||
.append(" AND AD_User_ID=").append(AD_User_ID)
|
||||
.append(" AND Node_ID=").append(Node_ID);
|
||||
}
|
||||
else // we will create the record
|
||||
sql.append("INSERT INTO AD_TreeBar "
|
||||
+ "(AD_Tree_ID,AD_User_ID,Node_ID, "
|
||||
+ "AD_Client_ID,AD_Org_ID, "
|
||||
+ "IsActive,Created,CreatedBy,Updated,UpdatedBy)VALUES (")
|
||||
.append(m_AD_Tree_ID).append(",").append(AD_User_ID).append(",").append(Node_ID).append(",")
|
||||
.append(AD_Client_ID).append(",").append(AD_Org_ID).append(",")
|
||||
.append("'Y',SysDate,").append(AD_User_ID).append(",SysDate,").append(AD_User_ID).append(")");
|
||||
// if already exist, will result in ORA-00001: unique constraint (ADEMPIERE.AD_TREEBAR_KEY)
|
||||
}
|
||||
else {
|
||||
// if the menu entry is opened at login, we will only remove it from favourites
|
||||
if (DB.getSQLValueEx(null, "SELECT LoginOpenSeqNo FROM AD_TreeBar WHERE AD_Tree_ID = ? AND AD_User_ID = ? AND Node_ID = ?", m_AD_Tree_ID, AD_User_ID, Node_ID) > 0) {
|
||||
|
||||
sql.append("UPDATE AD_TreeBar SET IsFavourite = 'N', Updated = Sysdate, UpdatedBy = ").append(AD_User_ID).append(" WHERE AD_Tree_ID = ").append(m_AD_Tree_ID)
|
||||
.append(" AND AD_User_ID=").append(AD_User_ID)
|
||||
.append(" AND Node_ID=").append(Node_ID);
|
||||
}
|
||||
else // otherwise, we remove the record
|
||||
sql.append("DELETE AD_TreeBar WHERE AD_Tree_ID=").append(m_AD_Tree_ID)
|
||||
.append(" AND AD_User_ID=").append(AD_User_ID)
|
||||
.append(" AND Node_ID=").append(Node_ID);
|
||||
}
|
||||
int no = DB.executeUpdate(sql.toString(), false, null);
|
||||
return no == 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue