hg merge release-3.1 (merge release3.1 into development)

This commit is contained in:
Carlos Ruiz 2016-09-27 15:25:10 +02:00
commit ad995ae3b9
22 changed files with 840 additions and 86 deletions

View File

@ -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
;

View File

@ -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
;

View File

@ -58,39 +58,12 @@ public class CalloutInventory extends CalloutEngine
docSubTypeInv = dt.getDocSubTypeInv();
}
Integer InventoryLine = (Integer)mTab.getValue("M_InventoryLine_ID");
BigDecimal bd = null;
if (InventoryLine != null && InventoryLine.intValue() != 0) {
MInventoryLine _ILine = new MInventoryLine(ctx, InventoryLine, null);
Integer M_Product_ID = (Integer)mTab.getValue("M_Product_ID");
Integer M_Locator_ID = (Integer)mTab.getValue("M_Locator_ID");
Integer M_AttributeSetInstance_ID = 0;
// if product or locator has changed recalculate Book Qty
if ((M_Product_ID != null && M_Product_ID != _ILine.getM_Product_ID()) ||
(M_Locator_ID !=null && M_Locator_ID != _ILine.getM_Locator_ID())) {
// Check ASI - if product has been changed remove old ASI
if (M_Product_ID == _ILine.getM_Product_ID()) {
M_AttributeSetInstance_ID = (Integer)mTab.getValue("M_AttributeSetInstance_ID");
if( M_AttributeSetInstance_ID == null )
M_AttributeSetInstance_ID = 0;
} else {
mTab.setValue("M_AttributeSetInstance_ID", null);
}
if (MDocType.DOCSUBTYPEINV_PhysicalInventory.equals(docSubTypeInv)) {
try {
bd = setQtyBook(M_AttributeSetInstance_ID, M_Product_ID, M_Locator_ID);
mTab.setValue("QtyBook", bd);
} catch (Exception e) {
return e.getLocalizedMessage();
}
}
}
return "";
if ("M_Product_ID".equals(mField.getColumnName())) {
// product changed - remove old ASI
mTab.setValue("M_AttributeSetInstance_ID", null);
}
// New Line - Get Book Value
// Get Book Value
int M_Product_ID = 0;
Integer Product = (Integer)mTab.getValue("M_Product_ID");
if (Product != null)
@ -128,6 +101,7 @@ public class CalloutInventory extends CalloutEngine
// Set QtyBook from first storage location
// kviiksaar: Call's now the extracted function
BigDecimal bd = null;
if (MDocType.DOCSUBTYPEINV_PhysicalInventory.equals(docSubTypeInv)) {
try {
bd = setQtyBook(M_AttributeSetInstance_ID, M_Product_ID, M_Locator_ID);

View File

@ -24,6 +24,7 @@ import java.util.logging.Level;
import org.compiere.model.I_M_InOutLine;
import org.compiere.model.I_M_RMALine;
import org.compiere.model.MConversionRate;
import org.compiere.model.MOrderLandedCostAllocation;
import org.compiere.model.MTax;
import org.compiere.model.MCurrency;
@ -624,6 +625,15 @@ public class Doc_InOut extends Doc
costs = costs.subtract(costTax);
}
} // correct included Tax
// different currency
if (C_Currency_ID != originalOrderLine.getC_Currency_ID())
{
costs = MConversionRate.convert (getCtx(),
costs, originalOrderLine.getC_Currency_ID(), C_Currency_ID,
getDateAcct(), 0, getAD_Client_ID(), getAD_Org_ID(), true);
}
costs = costs.multiply(line.getQty());
costs = costs.negate();
}

View File

@ -191,9 +191,12 @@ public class Doc_MatchInv extends Doc
}
else
{
BigDecimal effMultiplier = multiplier;
if (getQty().signum() < 0)
effMultiplier = effMultiplier.negate();
if (!dr.updateReverseLine (MInOut.Table_ID, // Amt updated
m_receiptLine.getM_InOut_ID(), m_receiptLine.getM_InOutLine_ID(),
multiplier))
effMultiplier))
{
p_Error = "Mat.Receipt not posted yet";
return null;
@ -241,10 +244,14 @@ public class Doc_MatchInv extends Doc
}
else
{
cr.setQty(getQty().negate());
cr.setQty(getQty().negate());
BigDecimal effMultiplier = multiplier;
if (getQty().signum() < 0)
effMultiplier = effMultiplier.negate();
// Set AmtAcctCr/Dr from Invoice (sets also Project)
if (!cr.updateReverseLine (MInvoice.Table_ID, // Amt updated
m_invoiceLine.getC_Invoice_ID(), m_invoiceLine.getC_InvoiceLine_ID(), multiplier))
m_invoiceLine.getC_Invoice_ID(), m_invoiceLine.getC_InvoiceLine_ID(), effMultiplier))
{
p_Error = "Invoice not posted yet";
return null;

View File

@ -301,6 +301,25 @@ public final class FactLine extends X_Fact_Acct
*/
public void setAmtAcct(int C_Currency_ID, BigDecimal AmtAcctDr, BigDecimal AmtAcctCr)
{
if (! m_acctSchema.isAllowNegativePosting()) {
// fix Debit & Credit
if (AmtAcctDr != null)
{
if (AmtAcctDr.compareTo(Env.ZERO) == -1)
{
AmtAcctCr = AmtAcctDr.abs();
AmtAcctDr = Env.ZERO;
}
}
if (AmtAcctCr != null)
{
if (AmtAcctCr.compareTo(Env.ZERO) == -1)
{
AmtAcctDr = AmtAcctCr.abs();
AmtAcctCr = Env.ZERO;
}
}
}
setAmtAcctDr (AmtAcctDr);
setAmtAcctCr (AmtAcctCr);
// Currency Precision

View File

@ -233,6 +233,10 @@ public class AccessSqlParser
from = from.replaceAll("[\r\n\t ]+LEFT[\r\n\t ]+OUTER[\r\n\t ]+JOIN[\r\n\t ]+", ", ");
from = from.replaceAll("[\r\n\t ]+RIGHT[\r\n\t ]+OUTER[\r\n\t ]+JOIN[\r\n\t ]+", ", ");
from = from.replaceAll("[\r\n\t ]+FULL[\r\n\t ]+JOIN[\r\n\t ]+", ", ");
from = from.replaceAll("[\r\n\t ]+LEFT[\r\n\t ]+JOIN[\r\n\t ]+", ", ");
from = from.replaceAll("[\r\n\t ]+RIGHT[\r\n\t ]+JOIN[\r\n\t ]+", ", ");
from = from.replaceAll("[\r\n\t ]+JOIN[\r\n\t ]+", ", ");
from = from.replaceAll("[\r\n\t ]+[Oo][Nn][\r\n\t ]+", ON); // teo_sarca, BF [ 2840157 ]
// Remove ON clause - assumes that there is no IN () in the clause
index = from.indexOf(ON);

View File

@ -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";

View File

@ -60,10 +60,26 @@ public class MDashboardContentAccess extends X_PA_DashboardContent_Access {
.append(" WHERE PA_DashboardContent_ID NOT IN (")
.append(" SELECT PA_DashboardContent_ID ")
.append(" FROM PA_DashboardContent_Access" )
.append(" WHERE AD_Client_ID IN (0, ?))")
.append(" WHERE IsActive='Y' AND AD_Client_ID IN (0, ?))")
.append(" AND IsShowInLogin='Y'")
.append(" AND IsActive='Y' AND AD_Client_ID IN (0, ?)")
.append(" UNION ALL")
.append(" AND IsActive='Y' AND AD_Client_ID IN (0, ?)");
// New part : remove dashboard if inactive records
sql.append(" AND PA_DashboardContent_ID NOT IN (SELECT PA_DashboardContent_ID FROM PA_DashboardContent_Access ct2 WHERE ct2.IsActive='N' AND ct2.AD_Client_ID in (0,?)");
parameters.add(AD_Client_ID);
if (AD_Role >= 0) {
sql.append(" AND COALESCE(ct2.AD_Role_ID, ?) = ?");
parameters.add(AD_Role);
parameters.add(AD_Role);
}
if (AD_User >= 0) {
sql.append(" AND COALESCE(ct2.AD_User_ID, ?) = ?");
parameters.add(AD_User);
parameters.add(AD_User);
}
sql.append(")");
sql.append(" UNION ALL")
// Second part : second part is to process the dashboards configured in content access
.append(" SELECT ct.PA_DashboardContent_ID,ct.ColumnNo")
.append(" FROM PA_DashboardContent ct")
@ -85,20 +101,6 @@ public class MDashboardContentAccess extends X_PA_DashboardContent_Access {
sql.append(" AND cta.AD_Client_ID in (0,?)");
parameters.add(AD_Client_ID);
// New part : remove dashboard if inactive records
sql.append(" AND ct.PA_DashboardContent_ID NOT IN (SELECT PA_DashboardContent_ID FROM PA_DashboardContent_Access WHERE IsActive='N' AND ct.AD_Client_ID in (0,?)");
parameters.add(AD_Client_ID);
if (AD_Role >= 0) {
sql.append(" AND COALESCE(ct.AD_Role_ID, ?) = ?");
parameters.add(AD_Role);
parameters.add(AD_Role);
}
if (AD_User >= 0) {
sql.append(" AND COALESCE(ct.AD_User_ID, ?) = ?");
parameters.add(AD_User);
parameters.add(AD_User);
}
sql.append(")");
sql.append(" ORDER BY ColumnNo");

View File

@ -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

View File

@ -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)

View File

@ -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);
}
}
}
}
}

View File

@ -3262,7 +3262,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
Env.setContext(ctx, curWindowNo, "Value", "");
Env.setContext(ctx, curWindowNo, "Name", "");
}
prevdbInfo = "";
}
}

View File

@ -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;
}

View File

@ -180,6 +180,16 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
this.strLabel = gridField.getHeader();
init();
}
/**
* Normal zk component just fire onChange event when user loss focus
* call this method with true value let component fire event when user type first character
* @param isChangeEventWhenEditing
*/
public void setChangeEventWhenEditing (boolean isChangeEventWhenEditing){
this.component.setWidgetOverride("isChangeEventWhenEditing", String.valueOf(isChangeEventWhenEditing));
}
/**
* Method is used to distinguish between 2 similar WSearchEditors

View File

@ -120,6 +120,7 @@ public class WNumberEditor extends WEditor implements ContextMenuListener
private void init()
{
setChangeEventWhenEditing (true);
if (gridField != null)
{
getComponent().setTooltiptext(gridField.getDescription());

View File

@ -32,11 +32,13 @@ public class WPasswordEditor extends WStringEditor
{
super(gridField);
super.setTypePassword(true);
setChangeEventWhenEditing (true);
}
public WPasswordEditor(GridField gridField, boolean tableEditor)
{
super(gridField, tableEditor);
super.setTypePassword(true);
setChangeEventWhenEditing (false);
}
}

View File

@ -118,6 +118,7 @@ public class WStringEditor extends WEditor implements ContextMenuListener
private void init(String obscureType)
{
setChangeEventWhenEditing (true);
if (gridField != null)
{
getComponent().setMaxlength(gridField.getFieldLength());

View File

@ -175,8 +175,6 @@ public class LoginPanel extends Window implements EventListener<Event>
}
}
onUserIdChange(AD_User_ID);
if (txtUserId.getValue().length() > 0)
txtPassword.focus();
chkRememberMe.setChecked(true);
}
if (MSystem.isZKRememberPasswordAllowed()) {

View File

@ -96,7 +96,8 @@ zkforge.KeyListener = zk.$extends(zul.Widget, {
}
evt.preventDefault();
// _autoBlur = true will let current focus control blur but this event is sent after key event, so haven't valuable
id.zk.Extend.fakeOnchange (zk.currentFocus);
zAu.send(new zk.Event(zk.Widget.$(this), 'onCtrlKey', {keyCode: keycode, ctrlKey: evt.ctrlKey, shiftKey: evt.shiftKey, altKey: evt.altKey}, {toServer: true}));
return false;

View File

@ -15,7 +15,17 @@ Copyright (C) 2007 Ashley G Ramdass.
zk.afterLoad(function() {
zk._Erbx.push = function(msg) {
if (console) console.log(msg);
}
};
zk.$package('id.zk');
id.zk.Extend = zk.$extends(zk.Object, {}, {
fakeOnchange: function (wgt) {
// just sent fake event when control is textfield and value is not yet sync to server
if (wgt.$instanceof(zul.inp.Textbox) && wgt.$n().value != wgt.getText())
zAu.send(new zk.Event(zk.Widget.$(wgt), 'onChange',{"value":wgt.$n().value}));
}
});
});
zk.afterLoad(function() {
@ -41,27 +51,67 @@ Copyright (C) 2007 Ashley G Ramdass.
});
zk.afterLoad('zul.wgt', function () {
// should filter out for only component inside standard window or component wish fire this event,
// or ever rise other event like start editting to distinguish with true onChange event
zk.override(zul.inp.InputWidget.prototype, "doInput_", function (evt) {
this.$doInput_(evt);
var domElemOfLayout = jq('#' + this.$n().id).closest(".adwindow-layout");
if (domElemOfLayout == null){
;// do nothing
if (this.get ("isOnStardardWindow") == 'false' || this.get ("isChangeEventWhenEditing") != true){
return; // don't waste time to check component don't lay on standard window
}
var domElemOfLayout = jq('#' + this.$n().id).closest(".adwindow-layout"); // return a array
if (domElemOfLayout.length == 0){
this.set ("isOnStardardWindow", "false");// next time don't waste time to check this component
// in case, you move this component to a standard window, please update this properties at client by javascript Widget.set ()
// or at server by java function component.setWidgetOverride
}else{
var winLayoutWg = zk.Widget.$(domElemOfLayout);
if (winLayoutWg == null){
;// do nothing
;// do nothing, this case rare happen because ".adwindow-layout" always is a component
}else{
var isEditting = winLayoutWg.get ("isEditting");
// winLayoutWg should cache to improve perfomance
if (isEditting == "false"){
zAu.send(new zk.Event(zk.Widget.$(this), 'onChange',{"value":this.$n().value}));//fire change event to move to edit
id.zk.Extend.fakeOnchange (this);//fire change event to move to edit
}
}
}
});
zk.override(zk.Widget.prototype, "onAutofill", function (evt) {
id.zk.Extend.fakeOnchange (this);//fire change event to move to edit
});
zk.override(zul.inp.Textbox.prototype, "bind_", function (dt, skipper, after) {
if (!this.$bind_)
return;
this.$bind_(dt, skipper, after);
if (this.getType () != "password"){
return;
}
this.domListen_(this.$n(), "onChange", "onAutofill");
});
zk.override(zul.inp.Textbox.prototype, "unbind_", function (dt, skipper) {
if (!this.$unbind_)
return;
this.$unbind_(dt, skipper);
if (this.getType () != "password"){
return;
}
this.domUnlisten_(this.$n(), "onChange", "onAutofill"); //unlisten
});
});
zk.afterLoad('zul.mesh', function () {

View File

@ -113,7 +113,7 @@ public class Match
else if (matchToString.equals(m_matchOptions[MATCH_ORDER]))
matchToType = MATCH_ORDER;
//
tableInit(display, matchToType, matched); // sets m_sql
tableInit(display, matchToType, matched,null); // sets m_sql
// ** Add Where Clause **
// Product
@ -241,8 +241,11 @@ public class Match
display = MATCH_SHIPMENT;
else if (displayString.equals(m_matchOptions[MATCH_ORDER]))
display = MATCH_ORDER;
KeyNamePair lineMatched = (KeyNamePair)xMatchedTable.getValueAt(row, I_Line);
//int matchToType = matchFrom.getSelectedIndex();
tableInit (display, matchToType, matched); // sets m_sql
tableInit (display, matchToType, matched, lineMatched); // sets m_sql
// ** Add Where Clause **
KeyNamePair BPartner = (KeyNamePair)xMatchedTable.getValueAt(row, I_BPartner);
//KeyNamePair Org = (KeyNamePair)xMatchedTable.getValueAt(row, I_Org); //JAVIER
@ -277,7 +280,7 @@ public class Match
* @param display (Invoice, Shipment, Order) see MATCH_*
* @param matchToType (Invoice, Shipment, Order) see MATCH_*
*/
protected void tableInit (int display, int matchToType, boolean matched)
protected void tableInit (int display, int matchToType, boolean matched, KeyNamePair lineMatched)
{
//boolean matched = matchMode.getSelectedIndex() == MODE_MATCHED;
if (log.isLoggable(Level.CONFIG)) log.config("Display=" + m_matchOptions[display]
@ -285,6 +288,11 @@ public class Match
+ ", Matched=" + matched);
m_sql = new StringBuffer ();
int Line_ID = 0;
if (matched && lineMatched != null )
{
Line_ID = lineMatched.getKey();
}
if (display == MATCH_INVOICE)
{
m_dateColumn = "hdr.DateInvoiced";
@ -300,6 +308,9 @@ public class Match
+ " INNER JOIN C_DocType dt ON (hdr.C_DocType_ID=dt.C_DocType_ID AND dt.DocBaseType IN ('API','APC'))"
+ " FULL JOIN M_MatchInv mi ON (lin.C_InvoiceLine_ID=mi.C_InvoiceLine_ID) "
+ "WHERE hdr.DocStatus IN ('CO','CL')");
if (lineMatched!= null && Line_ID > 0 )
m_sql.append(" AND mi.M_InOutLine_ID = ").append(Line_ID);
m_groupBy = " GROUP BY hdr.C_Invoice_ID,hdr.DocumentNo,hdr.DateInvoiced,bp.Name,hdr.C_BPartner_ID,"
+ " lin.Line,lin.C_InvoiceLine_ID,p.Name,lin.M_Product_ID,lin.QtyInvoiced, org.Name, hdr.AD_Org_ID " //JAVIER
+ "HAVING "
@ -324,7 +335,9 @@ public class Match
m_linetype = new StringBuffer();
m_linetype.append( matchToType == MATCH_SHIPMENT ? "M_InOutLine_ID" : "C_InvoiceLine_ID") ;
if ( matched ) {
m_sql.append( " mo." + m_linetype + " IS NOT NULL " ) ;
m_sql.append( " mo." + m_linetype + " IS NOT NULL " ) ;
if (lineMatched!= null && Line_ID > 0 )
m_sql.append( " AND mo.M_InOutLine_ID = " + Line_ID) ;
} else {
m_sql.append( " ( mo." + m_linetype + " IS NULL OR "
+ " (lin.QtyOrdered <> (SELECT sum(mo1.Qty) AS Qty"
@ -353,11 +366,16 @@ public class Match
+ " INNER JOIN C_BPartner bp ON (hdr.C_BPartner_ID=bp.C_BPartner_ID)"
+ " INNER JOIN M_InOutLine lin ON (hdr.M_InOut_ID=lin.M_InOut_ID)"
+ " INNER JOIN M_Product p ON (lin.M_Product_ID=p.M_Product_ID)"
+ " INNER JOIN C_DocType dt ON (hdr.C_DocType_ID = dt.C_DocType_ID AND dt.DocBaseType='MMR')"
+ " INNER JOIN C_DocType dt ON (hdr.C_DocType_ID = dt.C_DocType_ID AND (dt.DocBaseType='MMR' OR (dt.DocBaseType='MMS' AND hdr.isSOTrx ='N')))"
+ " FULL JOIN ")
.append(matchToType == MATCH_ORDER ? "M_MatchPO" : "M_MatchInv")
.append(" m ON (lin.M_InOutLine_ID=m.M_InOutLine_ID) "
+ "WHERE hdr.DocStatus IN ('CO','CL')");
+ "WHERE hdr.DocStatus IN ('CO','CL')");
if ( matchToType == MATCH_INVOICE && lineMatched!= null && Line_ID > 0 )
m_sql.append(" AND m.C_InvoiceLine_ID = ").append(Line_ID);
if ( matchToType == MATCH_ORDER && lineMatched!= null && Line_ID > 0 )
m_sql.append(" AND m.C_OrderLine_ID = ").append(Line_ID);
m_groupBy = " GROUP BY hdr.M_InOut_ID,hdr.DocumentNo,hdr.MovementDate,bp.Name,hdr.C_BPartner_ID,"
+ " lin.Line,lin.M_InOutLine_ID,p.Name,lin.M_Product_ID,lin.MovementQty, org.Name, hdr.AD_Org_ID " //JAVIER
+ "HAVING "