hg merge release-2.1 (merge release2.1 into development)
This commit is contained in:
commit
a733237fc2
|
@ -0,0 +1,79 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-2757 Key for M_Storage wrongly defined on dictionary
|
||||
-- Aug 13, 2015 5:54:15 PM COT
|
||||
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 (203834,'M_Warehouse_UU',177,60958,'N',36,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 17:54:15','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 17:54:15','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','f8ba8ff7-14a1-4eb4-a68d-708095cfc0e9','N',2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:55:21 PM COT
|
||||
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 (203835,'M_Storage_UU',179,60954,'N',36,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 17:55:20','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 17:55:20','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','89dd5676-731e-4d60-868a-8c710e9e280d','N',2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:55:21 PM COT
|
||||
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 (203836,'Date Material Policy','Time used for LIFO and FIFO Material Policy','This field is used to record time used for LIFO and FIFO material policy',179,210887,'Y',7,110,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 17:55:21','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 17:55:21','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','b93cc4d5-e6a6-4a15-acc4-393d54520736','Y',110,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:58:03 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=40, XPosition=4,Updated=TO_DATE('2015-08-13 17:58:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203836
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:58:03 PM COT
|
||||
UPDATE AD_Field SET SeqNo=50,Updated=TO_DATE('2015-08-13 17:58:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1011
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:58:03 PM COT
|
||||
UPDATE AD_Field SET SeqNo=60,Updated=TO_DATE('2015-08-13 17:58:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6529
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:58:03 PM COT
|
||||
UPDATE AD_Field SET SeqNo=70,Updated=TO_DATE('2015-08-13 17:58:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1009
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:58:03 PM COT
|
||||
UPDATE AD_Field SET SeqNo=80,Updated=TO_DATE('2015-08-13 17:58:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1013
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:58:03 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=90, XPosition=4,Updated=TO_DATE('2015-08-13 17:58:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3078
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:58:03 PM COT
|
||||
UPDATE AD_Field SET SeqNo=100,Updated=TO_DATE('2015-08-13 17:58:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1014
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:58:03 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=110, XPosition=4,Updated=TO_DATE('2015-08-13 17:58:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3282
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:58:03 PM COT
|
||||
UPDATE AD_Field SET SeqNo=0,Updated=TO_DATE('2015-08-13 17:58:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203835
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:59:19 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=40, XPosition=4,Updated=TO_DATE('2015-08-13 17:59:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202534
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:59:19 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=50, XPosition=1,Updated=TO_DATE('2015-08-13 17:59:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=57394
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:59:19 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=60, XPosition=4,Updated=TO_DATE('2015-08-13 17:59:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=57391
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:59:19 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=70, XPosition=2,Updated=TO_DATE('2015-08-13 17:59:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=57390
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:59:19 PM COT
|
||||
UPDATE AD_Field SET SeqNo=80,Updated=TO_DATE('2015-08-13 17:59:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=57395
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:59:19 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=90, XPosition=4,Updated=TO_DATE('2015-08-13 17:59:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=57393
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201508131800_IDEMPIERE-2757.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-1132 Improve AD_Index; AD_View; foreign keys management
|
||||
-- Aug 17, 2015 7:18:22 PM COT
|
||||
UPDATE AD_Process_Para SET IsMandatory='N',Updated=TO_DATE('2015-08-17 19:18:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200069
|
||||
;
|
||||
|
||||
-- IDEMPIERE-2745 2Pack is not creating foreign keys
|
||||
update ad_column set fkconstrainttype='D' where fkconstrainttype is null and columnname in ('AD_Client_ID','AD_Org_ID','CreatedBy','UpdatedBy') and ad_reference_id in (18,19,30)
|
||||
;
|
||||
|
||||
|
||||
SELECT register_migration_script('201508171408_IDEMPIERE-2745.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,545 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-2771 Improve 2pack tracing for errors
|
||||
-- Aug 13, 2015 7:42:06 PM COT
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (212222,0,'Package Imp. Proc.',50003,'AD_Package_Imp_Proc_ID',10,'N','N','N','N','N',0,'N',19,0,0,'Y',TO_DATE('2015-08-13 19:42:05','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:42:05','YYYY-MM-DD HH24:MI:SS'),100,50034,'Y','N','D','N','N','N','Y','1b15ffd2-2148-4337-9e59-652b0e91b73f','Y',0,'N','N')
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:42:13 PM COT
|
||||
UPDATE AD_Column SET FKConstraintName='ADPackageImpProc_ADPackageImp', FKConstraintType='N',Updated=TO_DATE('2015-08-13 19:42:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212222
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:42:13 PM COT
|
||||
ALTER TABLE AD_Package_Imp ADD AD_Package_Imp_Proc_ID NUMBER(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:42:13 PM COT
|
||||
ALTER TABLE AD_Package_Imp ADD CONSTRAINT ADPackageImpProc_ADPackageImp FOREIGN KEY (AD_Package_Imp_Proc_ID) REFERENCES ad_package_imp_proc(ad_package_imp_proc_id) DEFERRABLE INITIALLY DEFERRED
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:44 PM COT
|
||||
INSERT INTO AD_Tab (AD_Tab_ID,Name,AD_Window_ID,SeqNo,IsSingleRow,AD_Table_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,HasTree,IsInfoTab,IsTranslationTab,IsReadOnly,AD_Column_ID,OrderByClause,Processing,ImportFields,TabLevel,IsSortTab,EntityType,IsInsertRecord,IsAdvancedTab,AD_Tab_UU,TreeDisplayedOn) VALUES (200191,'Package Installation',50005,20,'Y',50003,0,0,'Y',TO_DATE('2015-08-13 19:45:44','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:45:44','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N','Y',212222,'AD_Package_Imp_Proc.Created DESC','N','N',0,'N','D','N','N','9290ca4f-1650-4c88-9507-7a843f45384d','B')
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:53 PM COT
|
||||
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 (203837,'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.',200191,50041,'Y',22,10,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','d8078cb4-d8cb-4fa3-a97b-d8e8fba93fc9','Y',10,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:53 PM COT
|
||||
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,XPosition,ColumnSpan) VALUES (203838,'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.',200191,50061,'Y',22,20,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','f4c81ec0-cbf4-4119-b8f7-89999cc8998f','Y','N',4,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:53 PM COT
|
||||
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 (203839,'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.',200191,50046,'Y',60,30,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','9fd4405f-28a3-4ac8-ae71-8794275c63b5','Y',20,5)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:53 PM COT
|
||||
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,NumLines) VALUES (203840,'Description','Optional short description of the record','A description is limited to 255 characters.',200191,50058,'Y',1000,40,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','ca832890-27e6-48e0-9686-33c6ad75acda','Y',30,5,8)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:54 PM COT
|
||||
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 (203841,'Package Imp.',200191,50040,'N',22,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','bf3180bc-3adf-4b46-8f36-418374f1b8e6','N',2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:54 PM COT
|
||||
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 (203842,'CreatorContact',200191,50044,'Y',255,50,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 19:45:54','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:45:54','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','aebd79e4-0933-4f5b-aed1-726879e31c65','Y',40,5)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:54 PM COT
|
||||
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 (203843,'EMail Address','Electronic Mail Address','The Email Address is the Electronic Mail ID for this User and should be fully qualified (e.g. joe.smith@company.com). The Email Address is used to access the self service application functionality from the web.',200191,50045,'Y',60,60,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 19:45:54','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:45:54','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','5d64032c-a33d-409d-b758-5e95d6a7f19a','Y',50,5)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:54 PM COT
|
||||
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 (203844,'Package Version',200191,50047,'Y',20,70,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 19:45:54','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:45:54','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','2bb66736-4f30-4d79-9a6e-2f0a35d16fe5','Y',60,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:55 PM COT
|
||||
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,XPosition,ColumnSpan) VALUES (203845,'Process Now',200191,50048,'Y',1,80,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 19:45:54','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:45:54','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','0ee8bac8-b589-4f66-b57f-cad79cf4828b','Y',70,2,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:55 PM COT
|
||||
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 (203846,'Version','Version of the table definition','The Version indicates the version of this table definition.',200191,50049,'Y',20,90,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','f70e7a70-cf2e-43b3-a5a4-c3996d872359','Y',80,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:55 PM COT
|
||||
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,XPosition,ColumnSpan) VALUES (203847,'Uninstall',200191,50053,'Y',1,100,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','037e4eaa-fefa-449b-bf9b-b8c1f4ffb1f8','Y',90,2,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:55 PM COT
|
||||
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 (203848,'Release No','Internal Release Number',200191,50054,'Y',20,110,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','f5f66967-57b0-4d39-896f-e06bdab02e80','Y',100,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:55 PM COT
|
||||
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 (203849,'Processed','The document has been processed','The Processed checkbox indicates that a document has been processed.',200191,50055,'Y',1,120,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','8ef4b72f-c9ed-49ab-bccb-2023d48c7913','Y',110,2,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:56 PM COT
|
||||
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 (203850,'Package Status',200191,50056,'Y',22,130,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','c630875b-162c-4058-b9da-cb6f82fa5ca1','Y',120,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:57 PM COT
|
||||
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 (203851,'Creator',200191,50059,'Y',60,140,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 19:45:56','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:45:56','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','e830521e-be76-4627-8a35-c7ac09bfd596','Y',130,5)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:57 PM COT
|
||||
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 (203852,'AD_Package_Imp_UU',200191,60446,'N',36,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 19:45:57','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:45:57','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','32204dd9-2efa-4a55-89df-4f4a505381d6','N',2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:57 PM COT
|
||||
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 (203853,'Package Imp. Proc.',200191,212222,'Y',10,150,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 19:45:57','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:45:57','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','ffd6eb2b-4af3-4954-98dc-848cb85d867f','Y',140,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:58 PM COT
|
||||
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 (203854,'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.',200191,50057,'Y',1,160,'N','N','N','N',0,0,'Y',TO_DATE('2015-08-13 19:45:57','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-08-13 19:45:57','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','82331802-b0f8-47b5-a860-1879b135d071','Y',150,2,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=30, XPosition=1,Updated=TO_DATE('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203853
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET SeqNo=40, ColumnSpan=3,Updated=TO_DATE('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203839
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=50, XPosition=5, ColumnSpan=1,Updated=TO_DATE('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203844
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=60, XPosition=1, ColumnSpan=3,Updated=TO_DATE('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203850
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET SeqNo=70,Updated=TO_DATE('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203840
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=90, XPosition=5, ColumnSpan=1,Updated=TO_DATE('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203849
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=100, XPosition=6, ColumnSpan=1,Updated=TO_DATE('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203854
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET SeqNo=0,Updated=TO_DATE('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203852
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_DATE('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203851
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_DATE('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203842
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_DATE('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203843
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET SeqNo=0,Updated=TO_DATE('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203841
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_DATE('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203848
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_DATE('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203847
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1, ColumnSpan=1,Updated=TO_DATE('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203846
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203853
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203851
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203849
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203845
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203843
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203842
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203848
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203847
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203846
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203837
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=203839
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=203844
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=203850
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=203840
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=203854
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:07 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=203841
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:07 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=203854
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:26 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=40, XPosition=4,Updated=TO_DATE('2015-08-13 19:58:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203841
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:26 PM COT
|
||||
UPDATE AD_Field SET SeqNo=50,Updated=TO_DATE('2015-08-13 19:58:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203839
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:26 PM COT
|
||||
UPDATE AD_Field SET SeqNo=60,Updated=TO_DATE('2015-08-13 19:58:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203844
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:26 PM COT
|
||||
UPDATE AD_Field SET SeqNo=70,Updated=TO_DATE('2015-08-13 19:58:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203850
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:26 PM COT
|
||||
UPDATE AD_Field SET SeqNo=80,Updated=TO_DATE('2015-08-13 19:58:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203840
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:26 PM COT
|
||||
UPDATE AD_Field SET SeqNo=90,Updated=TO_DATE('2015-08-13 19:58:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203845
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:26 PM COT
|
||||
UPDATE AD_Field SET SeqNo=100,Updated=TO_DATE('2015-08-13 19:58:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203849
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:26 PM COT
|
||||
UPDATE AD_Field SET SeqNo=110,Updated=TO_DATE('2015-08-13 19:58:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203854
|
||||
;
|
||||
|
||||
-- Aug 14, 2015 10:42:44 AM COT
|
||||
UPDATE AD_Tab SET TabLevel=1,Updated=TO_DATE('2015-08-14 10:42:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200191
|
||||
;
|
||||
|
||||
-- Aug 14, 2015 10:45:01 AM COT
|
||||
UPDATE AD_Tab SET OrderByClause='AD_Package_Imp.Created DESC',Updated=TO_DATE('2015-08-14 10:45:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200191
|
||||
;
|
||||
|
||||
-- Aug 14, 2015 10:45:18 AM COT
|
||||
UPDATE AD_Tab SET OrderByClause='AD_Package_Imp_Proc.Created DESC',Updated=TO_DATE('2015-08-14 10:45:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=50008
|
||||
;
|
||||
|
||||
-- Aug 14, 2015 10:49:45 AM COT
|
||||
UPDATE AD_Field SET AD_Reference_ID=19,Updated=TO_DATE('2015-08-14 10:49:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203841
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:23:06 AM COT
|
||||
UPDATE AD_Column SET AD_Reference_ID=30, IsUpdateable='N',Updated=TO_DATE('2015-08-18 11:23:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=50066
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:23:13 AM COT
|
||||
UPDATE AD_Column SET AD_Reference_ID=19,Updated=TO_DATE('2015-08-18 11:23:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=50067
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:25:05 AM COT
|
||||
UPDATE AD_Column SET Name='Record ID', Description='Direct internal record ID', Help='The Record ID is the internal unique identifier of a record. Please note that zooming to the record may not be successful for Orders, Invoices and Shipment/Receipts as sometimes the Sales Order type is not known.', ColumnName='Record_ID', AD_Reference_ID=28, AD_Element_ID=538, IsAlwaysUpdateable='Y', IsToolbarButton='B',Updated=TO_DATE('2015-08-18 11:25:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=50064
|
||||
;
|
||||
|
||||
ALTER TABLE AD_PACKAGE_IMP_DETAIL RENAME COLUMN AD_ORIGINAL_ID TO RECORD_ID
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:27:08 AM COT
|
||||
UPDATE AD_Field SET SeqNo=110,Updated=TO_DATE('2015-08-18 11:27:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50045
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:27:08 AM COT
|
||||
UPDATE AD_Field SET SeqNo=120,Updated=TO_DATE('2015-08-18 11:27:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50050
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:27:08 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_DATE('2015-08-18 11:27:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50051
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=20, XPosition=4,Updated=TO_DATE('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50054
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET SeqNo=30, ColumnSpan=2,Updated=TO_DATE('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50055
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=40, XPosition=1,Updated=TO_DATE('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50062
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=50, XPosition=4, ColumnSpan=1,Updated=TO_DATE('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50059
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=60, XPosition=6, ColumnSpan=1,Updated=TO_DATE('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50060
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET SeqNo=70,Updated=TO_DATE('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50058
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=80, XPosition=1, ColumnSpan=2,Updated=TO_DATE('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50064
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=90, XPosition=4,Updated=TO_DATE('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50061
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=100, XPosition=1,Updated=TO_DATE('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50057
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_DATE('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50063
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_DATE('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50056
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_DATE('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50065
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50065
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50063
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50056
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50055
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50054
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50053
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=50062
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=50059
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=50060
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=50064
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=50058
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=50061
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y' WHERE AD_Field_ID=50057
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:42 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=20, XPosition=4,Updated=TO_DATE('2015-08-18 11:45:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50021
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:42 AM COT
|
||||
UPDATE AD_Field SET SeqNo=30,Updated=TO_DATE('2015-08-18 11:45:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50023
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:42 AM COT
|
||||
UPDATE AD_Field SET SeqNo=40,Updated=TO_DATE('2015-08-18 11:45:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50025
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:42 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=50, XPosition=4,Updated=TO_DATE('2015-08-18 11:45:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50026
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:42 AM COT
|
||||
UPDATE AD_Field SET SeqNo=60,Updated=TO_DATE('2015-08-18 11:45:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50027
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:42 AM COT
|
||||
UPDATE AD_Field SET SeqNo=70,Updated=TO_DATE('2015-08-18 11:45:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50028
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:42 AM COT
|
||||
UPDATE AD_Field SET SeqNo=80,Updated=TO_DATE('2015-08-18 11:45:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50030
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:42 AM COT
|
||||
UPDATE AD_Field SET SeqNo=90,Updated=TO_DATE('2015-08-18 11:45:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50031
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:43 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_DATE('2015-08-18 11:45:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50024
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:43 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_DATE('2015-08-18 11:45:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50022
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:43 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_DATE('2015-08-18 11:45:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50029
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50029
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50024
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50023
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50022
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50021
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50020
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=50025
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=50026
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=50027
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=50028
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=50030
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=50031
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:16:24 PM COT
|
||||
UPDATE AD_Tab SET IsReadOnly='N',Updated=TO_DATE('2015-08-18 20:16:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200191
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:16:39 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2015-08-18 20:16:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203837
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:16:41 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2015-08-18 20:16:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203838
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:16:42 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2015-08-18 20:16:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203853
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:16:44 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2015-08-18 20:16:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203841
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:16:51 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2015-08-18 20:16:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203839
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:16:55 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2015-08-18 20:16:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203850
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:16:57 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2015-08-18 20:16:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203840
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:16:59 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2015-08-18 20:16:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203845
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:17:04 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2015-08-18 20:17:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203849
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:17:09 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2015-08-18 20:17:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203854
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:17:45 PM COT
|
||||
UPDATE AD_Field SET IsUpdateable='Y', IsAlwaysUpdateable='Y',Updated=TO_DATE('2015-08-18 20:17:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203844
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201508181021_IDEMPIERE-2771.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
-- IDEMPIERE-2757 Key for M_Storage wrongly defined on dictionary
|
||||
-- Aug 13, 2015 5:54:15 PM COT
|
||||
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 (203834,'M_Warehouse_UU',177,60958,'N',36,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 17:54:15','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 17:54:15','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','f8ba8ff7-14a1-4eb4-a68d-708095cfc0e9','N',2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:55:21 PM COT
|
||||
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 (203835,'M_Storage_UU',179,60954,'N',36,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 17:55:20','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 17:55:20','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','89dd5676-731e-4d60-868a-8c710e9e280d','N',2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:55:21 PM COT
|
||||
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 (203836,'Date Material Policy','Time used for LIFO and FIFO Material Policy','This field is used to record time used for LIFO and FIFO material policy',179,210887,'Y',7,110,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 17:55:21','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 17:55:21','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','b93cc4d5-e6a6-4a15-acc4-393d54520736','Y',110,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:58:03 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=40, XPosition=4,Updated=TO_TIMESTAMP('2015-08-13 17:58:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203836
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:58:03 PM COT
|
||||
UPDATE AD_Field SET SeqNo=50,Updated=TO_TIMESTAMP('2015-08-13 17:58:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1011
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:58:03 PM COT
|
||||
UPDATE AD_Field SET SeqNo=60,Updated=TO_TIMESTAMP('2015-08-13 17:58:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6529
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:58:03 PM COT
|
||||
UPDATE AD_Field SET SeqNo=70,Updated=TO_TIMESTAMP('2015-08-13 17:58:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1009
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:58:03 PM COT
|
||||
UPDATE AD_Field SET SeqNo=80,Updated=TO_TIMESTAMP('2015-08-13 17:58:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1013
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:58:03 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=90, XPosition=4,Updated=TO_TIMESTAMP('2015-08-13 17:58:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3078
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:58:03 PM COT
|
||||
UPDATE AD_Field SET SeqNo=100,Updated=TO_TIMESTAMP('2015-08-13 17:58:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1014
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:58:03 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=110, XPosition=4,Updated=TO_TIMESTAMP('2015-08-13 17:58:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3282
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:58:03 PM COT
|
||||
UPDATE AD_Field SET SeqNo=0,Updated=TO_TIMESTAMP('2015-08-13 17:58:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203835
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:59:19 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=40, XPosition=4,Updated=TO_TIMESTAMP('2015-08-13 17:59:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202534
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:59:19 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=50, XPosition=1,Updated=TO_TIMESTAMP('2015-08-13 17:59:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=57394
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:59:19 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=60, XPosition=4,Updated=TO_TIMESTAMP('2015-08-13 17:59:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=57391
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:59:19 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=70, XPosition=2,Updated=TO_TIMESTAMP('2015-08-13 17:59:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=57390
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:59:19 PM COT
|
||||
UPDATE AD_Field SET SeqNo=80,Updated=TO_TIMESTAMP('2015-08-13 17:59:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=57395
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 5:59:19 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=90, XPosition=4,Updated=TO_TIMESTAMP('2015-08-13 17:59:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=57393
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201508131800_IDEMPIERE-2757.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
-- IDEMPIERE-1132 Improve AD_Index; AD_View; foreign keys management
|
||||
-- Aug 17, 2015 7:18:22 PM COT
|
||||
UPDATE AD_Process_Para SET IsMandatory='N',Updated=TO_TIMESTAMP('2015-08-17 19:18:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200069
|
||||
;
|
||||
|
||||
-- IDEMPIERE-2745 2Pack is not creating foreign keys
|
||||
update ad_column set fkconstrainttype='D' where fkconstrainttype is null and columnname in ('AD_Client_ID','AD_Org_ID','CreatedBy','UpdatedBy') and ad_reference_id in (18,19,30)
|
||||
;
|
||||
|
||||
|
||||
SELECT register_migration_script('201508171408_IDEMPIERE-2745.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,542 @@
|
|||
-- IDEMPIERE-2771 Improve 2pack tracing for errors
|
||||
-- Aug 13, 2015 7:42:06 PM COT
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (212222,0,'Package Imp. Proc.',50003,'AD_Package_Imp_Proc_ID',10,'N','N','N','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2015-08-13 19:42:05','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:42:05','YYYY-MM-DD HH24:MI:SS'),100,50034,'Y','N','D','N','N','N','Y','1b15ffd2-2148-4337-9e59-652b0e91b73f','Y',0,'N','N')
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:42:13 PM COT
|
||||
UPDATE AD_Column SET FKConstraintName='ADPackageImpProc_ADPackageImp', FKConstraintType='N',Updated=TO_TIMESTAMP('2015-08-13 19:42:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212222
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:42:13 PM COT
|
||||
ALTER TABLE AD_Package_Imp ADD COLUMN AD_Package_Imp_Proc_ID NUMERIC(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:42:13 PM COT
|
||||
ALTER TABLE AD_Package_Imp ADD CONSTRAINT ADPackageImpProc_ADPackageImp FOREIGN KEY (AD_Package_Imp_Proc_ID) REFERENCES ad_package_imp_proc(ad_package_imp_proc_id) DEFERRABLE INITIALLY DEFERRED
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:44 PM COT
|
||||
INSERT INTO AD_Tab (AD_Tab_ID,Name,AD_Window_ID,SeqNo,IsSingleRow,AD_Table_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,HasTree,IsInfoTab,IsTranslationTab,IsReadOnly,AD_Column_ID,OrderByClause,Processing,ImportFields,TabLevel,IsSortTab,EntityType,IsInsertRecord,IsAdvancedTab,AD_Tab_UU,TreeDisplayedOn) VALUES (200191,'Package Installation',50005,20,'Y',50003,0,0,'Y',TO_TIMESTAMP('2015-08-13 19:45:44','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:45:44','YYYY-MM-DD HH24:MI:SS'),100,'N','N','N','Y',212222,'AD_Package_Imp_Proc.Created DESC','N','N',0,'N','D','N','N','9290ca4f-1650-4c88-9507-7a843f45384d','B')
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:53 PM COT
|
||||
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 (203837,'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.',200191,50041,'Y',22,10,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','d8078cb4-d8cb-4fa3-a97b-d8e8fba93fc9','Y',10,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:53 PM COT
|
||||
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,XPosition,ColumnSpan) VALUES (203838,'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.',200191,50061,'Y',22,20,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','f4c81ec0-cbf4-4119-b8f7-89999cc8998f','Y','N',4,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:53 PM COT
|
||||
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 (203839,'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.',200191,50046,'Y',60,30,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','9fd4405f-28a3-4ac8-ae71-8794275c63b5','Y',20,5)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:53 PM COT
|
||||
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,NumLines) VALUES (203840,'Description','Optional short description of the record','A description is limited to 255 characters.',200191,50058,'Y',1000,40,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','ca832890-27e6-48e0-9686-33c6ad75acda','Y',30,5,8)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:54 PM COT
|
||||
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 (203841,'Package Imp.',200191,50040,'N',22,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:45:53','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','bf3180bc-3adf-4b46-8f36-418374f1b8e6','N',2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:54 PM COT
|
||||
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 (203842,'CreatorContact',200191,50044,'Y',255,50,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 19:45:54','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:45:54','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','aebd79e4-0933-4f5b-aed1-726879e31c65','Y',40,5)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:54 PM COT
|
||||
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 (203843,'EMail Address','Electronic Mail Address','The Email Address is the Electronic Mail ID for this User and should be fully qualified (e.g. joe.smith@company.com). The Email Address is used to access the self service application functionality from the web.',200191,50045,'Y',60,60,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 19:45:54','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:45:54','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','5d64032c-a33d-409d-b758-5e95d6a7f19a','Y',50,5)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:54 PM COT
|
||||
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 (203844,'Package Version',200191,50047,'Y',20,70,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 19:45:54','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:45:54','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','2bb66736-4f30-4d79-9a6e-2f0a35d16fe5','Y',60,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:55 PM COT
|
||||
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,XPosition,ColumnSpan) VALUES (203845,'Process Now',200191,50048,'Y',1,80,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 19:45:54','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:45:54','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','0ee8bac8-b589-4f66-b57f-cad79cf4828b','Y',70,2,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:55 PM COT
|
||||
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 (203846,'Version','Version of the table definition','The Version indicates the version of this table definition.',200191,50049,'Y',20,90,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','f70e7a70-cf2e-43b3-a5a4-c3996d872359','Y',80,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:55 PM COT
|
||||
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,XPosition,ColumnSpan) VALUES (203847,'Uninstall',200191,50053,'Y',1,100,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','037e4eaa-fefa-449b-bf9b-b8c1f4ffb1f8','Y',90,2,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:55 PM COT
|
||||
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 (203848,'Release No','Internal Release Number',200191,50054,'Y',20,110,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','f5f66967-57b0-4d39-896f-e06bdab02e80','Y',100,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:55 PM COT
|
||||
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 (203849,'Processed','The document has been processed','The Processed checkbox indicates that a document has been processed.',200191,50055,'Y',1,120,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','8ef4b72f-c9ed-49ab-bccb-2023d48c7913','Y',110,2,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:56 PM COT
|
||||
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 (203850,'Package Status',200191,50056,'Y',22,130,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:45:55','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','c630875b-162c-4058-b9da-cb6f82fa5ca1','Y',120,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:57 PM COT
|
||||
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 (203851,'Creator',200191,50059,'Y',60,140,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 19:45:56','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:45:56','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','e830521e-be76-4627-8a35-c7ac09bfd596','Y',130,5)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:57 PM COT
|
||||
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 (203852,'AD_Package_Imp_UU',200191,60446,'N',36,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 19:45:57','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:45:57','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','32204dd9-2efa-4a55-89df-4f4a505381d6','N',2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:57 PM COT
|
||||
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 (203853,'Package Imp. Proc.',200191,212222,'Y',10,150,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 19:45:57','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:45:57','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','ffd6eb2b-4af3-4954-98dc-848cb85d867f','Y',140,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:45:58 PM COT
|
||||
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 (203854,'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.',200191,50057,'Y',1,160,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-08-13 19:45:57','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-08-13 19:45:57','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','82331802-b0f8-47b5-a860-1879b135d071','Y',150,2,2)
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=30, XPosition=1,Updated=TO_TIMESTAMP('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203853
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET SeqNo=40, ColumnSpan=3,Updated=TO_TIMESTAMP('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203839
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=50, XPosition=5, ColumnSpan=1,Updated=TO_TIMESTAMP('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203844
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=60, XPosition=1, ColumnSpan=3,Updated=TO_TIMESTAMP('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203850
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET SeqNo=70,Updated=TO_TIMESTAMP('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203840
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=90, XPosition=5, ColumnSpan=1,Updated=TO_TIMESTAMP('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203849
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=100, XPosition=6, ColumnSpan=1,Updated=TO_TIMESTAMP('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203854
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET SeqNo=0,Updated=TO_TIMESTAMP('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203852
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_TIMESTAMP('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203851
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_TIMESTAMP('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203842
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_TIMESTAMP('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203843
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET SeqNo=0,Updated=TO_TIMESTAMP('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203841
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_TIMESTAMP('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203848
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_TIMESTAMP('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203847
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:54:55 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1, ColumnSpan=1,Updated=TO_TIMESTAMP('2015-08-13 19:54:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203846
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203853
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203851
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203849
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203845
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203843
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203842
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203848
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203847
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203846
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=203837
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=203839
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=203844
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=203850
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=203840
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:57:10 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=203854
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:07 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=203841
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:07 PM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=203854
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:26 PM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=40, XPosition=4,Updated=TO_TIMESTAMP('2015-08-13 19:58:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203841
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:26 PM COT
|
||||
UPDATE AD_Field SET SeqNo=50,Updated=TO_TIMESTAMP('2015-08-13 19:58:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203839
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:26 PM COT
|
||||
UPDATE AD_Field SET SeqNo=60,Updated=TO_TIMESTAMP('2015-08-13 19:58:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203844
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:26 PM COT
|
||||
UPDATE AD_Field SET SeqNo=70,Updated=TO_TIMESTAMP('2015-08-13 19:58:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203850
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:26 PM COT
|
||||
UPDATE AD_Field SET SeqNo=80,Updated=TO_TIMESTAMP('2015-08-13 19:58:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203840
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:26 PM COT
|
||||
UPDATE AD_Field SET SeqNo=90,Updated=TO_TIMESTAMP('2015-08-13 19:58:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203845
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:26 PM COT
|
||||
UPDATE AD_Field SET SeqNo=100,Updated=TO_TIMESTAMP('2015-08-13 19:58:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203849
|
||||
;
|
||||
|
||||
-- Aug 13, 2015 7:58:26 PM COT
|
||||
UPDATE AD_Field SET SeqNo=110,Updated=TO_TIMESTAMP('2015-08-13 19:58:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203854
|
||||
;
|
||||
|
||||
-- Aug 14, 2015 10:42:44 AM COT
|
||||
UPDATE AD_Tab SET TabLevel=1,Updated=TO_TIMESTAMP('2015-08-14 10:42:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200191
|
||||
;
|
||||
|
||||
-- Aug 14, 2015 10:45:01 AM COT
|
||||
UPDATE AD_Tab SET OrderByClause='AD_Package_Imp.Created DESC',Updated=TO_TIMESTAMP('2015-08-14 10:45:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200191
|
||||
;
|
||||
|
||||
-- Aug 14, 2015 10:45:18 AM COT
|
||||
UPDATE AD_Tab SET OrderByClause='AD_Package_Imp_Proc.Created DESC',Updated=TO_TIMESTAMP('2015-08-14 10:45:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=50008
|
||||
;
|
||||
|
||||
-- Aug 14, 2015 10:49:45 AM COT
|
||||
UPDATE AD_Field SET AD_Reference_ID=19,Updated=TO_TIMESTAMP('2015-08-14 10:49:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203841
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:23:06 AM COT
|
||||
UPDATE AD_Column SET AD_Reference_ID=30, IsUpdateable='N',Updated=TO_TIMESTAMP('2015-08-18 11:23:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=50066
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:23:13 AM COT
|
||||
UPDATE AD_Column SET AD_Reference_ID=19,Updated=TO_TIMESTAMP('2015-08-18 11:23:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=50067
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:25:05 AM COT
|
||||
UPDATE AD_Column SET Name='Record ID', Description='Direct internal record ID', Help='The Record ID is the internal unique identifier of a record. Please note that zooming to the record may not be successful for Orders, Invoices and Shipment/Receipts as sometimes the Sales Order type is not known.', ColumnName='Record_ID', AD_Reference_ID=28, AD_Element_ID=538, IsAlwaysUpdateable='Y', IsToolbarButton='B',Updated=TO_TIMESTAMP('2015-08-18 11:25:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=50064
|
||||
;
|
||||
|
||||
ALTER TABLE ad_package_imp_detail RENAME ad_original_id TO record_id
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:27:08 AM COT
|
||||
UPDATE AD_Field SET SeqNo=110,Updated=TO_TIMESTAMP('2015-08-18 11:27:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50045
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:27:08 AM COT
|
||||
UPDATE AD_Field SET SeqNo=120,Updated=TO_TIMESTAMP('2015-08-18 11:27:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50050
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:27:08 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_TIMESTAMP('2015-08-18 11:27:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50051
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=20, XPosition=4,Updated=TO_TIMESTAMP('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50054
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET SeqNo=30, ColumnSpan=2,Updated=TO_TIMESTAMP('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50055
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=40, XPosition=1,Updated=TO_TIMESTAMP('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50062
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=50, XPosition=4, ColumnSpan=1,Updated=TO_TIMESTAMP('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50059
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=60, XPosition=6, ColumnSpan=1,Updated=TO_TIMESTAMP('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50060
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET SeqNo=70,Updated=TO_TIMESTAMP('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50058
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=80, XPosition=1, ColumnSpan=2,Updated=TO_TIMESTAMP('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50064
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=90, XPosition=4,Updated=TO_TIMESTAMP('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50061
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=100, XPosition=1,Updated=TO_TIMESTAMP('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50057
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_TIMESTAMP('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50063
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_TIMESTAMP('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50056
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:04 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_TIMESTAMP('2015-08-18 11:29:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50065
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50065
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50063
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50056
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50055
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50054
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50053
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=50062
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=50059
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=50060
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=50064
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=50058
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=50061
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:29:38 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y' WHERE AD_Field_ID=50057
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:42 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=20, XPosition=4,Updated=TO_TIMESTAMP('2015-08-18 11:45:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50021
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:42 AM COT
|
||||
UPDATE AD_Field SET SeqNo=30,Updated=TO_TIMESTAMP('2015-08-18 11:45:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50023
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:42 AM COT
|
||||
UPDATE AD_Field SET SeqNo=40,Updated=TO_TIMESTAMP('2015-08-18 11:45:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50025
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:42 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=50, XPosition=4,Updated=TO_TIMESTAMP('2015-08-18 11:45:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50026
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:42 AM COT
|
||||
UPDATE AD_Field SET SeqNo=60,Updated=TO_TIMESTAMP('2015-08-18 11:45:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50027
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:42 AM COT
|
||||
UPDATE AD_Field SET SeqNo=70,Updated=TO_TIMESTAMP('2015-08-18 11:45:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50028
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:42 AM COT
|
||||
UPDATE AD_Field SET SeqNo=80,Updated=TO_TIMESTAMP('2015-08-18 11:45:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50030
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:42 AM COT
|
||||
UPDATE AD_Field SET SeqNo=90,Updated=TO_TIMESTAMP('2015-08-18 11:45:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50031
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:43 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_TIMESTAMP('2015-08-18 11:45:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50024
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:43 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_TIMESTAMP('2015-08-18 11:45:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50022
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:45:43 AM COT
|
||||
UPDATE AD_Field SET IsDisplayed='N', SeqNo=0, XPosition=1,Updated=TO_TIMESTAMP('2015-08-18 11:45:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50029
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50029
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50024
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50023
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50022
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50021
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=50020
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=50025
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=50026
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=50027
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=50028
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=50030
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 11:47:17 AM COT
|
||||
UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=50031
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:16:24 PM COT
|
||||
UPDATE AD_Tab SET IsReadOnly='N',Updated=TO_TIMESTAMP('2015-08-18 20:16:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200191
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:16:39 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-08-18 20:16:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203837
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:16:41 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-08-18 20:16:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203838
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:16:42 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-08-18 20:16:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203853
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:16:44 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-08-18 20:16:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203841
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:16:51 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-08-18 20:16:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203839
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:16:55 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-08-18 20:16:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203850
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:16:57 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-08-18 20:16:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203840
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:16:59 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-08-18 20:16:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203845
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:17:04 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-08-18 20:17:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203849
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:17:09 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2015-08-18 20:17:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203854
|
||||
;
|
||||
|
||||
-- Aug 18, 2015 8:17:45 PM COT
|
||||
UPDATE AD_Field SET IsUpdateable='Y', IsAlwaysUpdateable='Y',Updated=TO_TIMESTAMP('2015-08-18 20:17:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203844
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201508181021_IDEMPIERE-2771.sql') FROM dual
|
||||
;
|
||||
|
|
@ -128,14 +128,14 @@ public class ColumnSync extends SvrProcess
|
|||
MColumn[] cols = table.getColumns(false);
|
||||
for (MColumn col : cols)
|
||||
{
|
||||
String fkConstraintSql = MColumn.getForeignKeyConstraintSql(md, catalog, schema, tableName, table, col);
|
||||
String fkConstraintSql = MColumn.getForeignKeyConstraintSql(md, catalog, schema, tableName, table, col, false);
|
||||
if (fkConstraintSql != null && fkConstraintSql.length() > 0)
|
||||
sql += fkConstraintSql;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
String fkConstraintSql = MColumn.getForeignKeyConstraintSql(md, catalog, schema, tableName, table, column);
|
||||
String fkConstraintSql = MColumn.getForeignKeyConstraintSql(md, catalog, schema, tableName, table, column, false);
|
||||
if (fkConstraintSql != null && fkConstraintSql.length() > 0)
|
||||
sql += fkConstraintSql;
|
||||
}
|
||||
|
|
|
@ -212,13 +212,7 @@ public class TableCreateColumns extends SvrProcess
|
|||
*/
|
||||
private void addTableColumn (ResultSet rs, MTable table) throws Exception
|
||||
{
|
||||
String tableName = table.getTableName ();
|
||||
if (DB.isOracle ())
|
||||
tableName = tableName.toUpperCase ();
|
||||
// globalqss 2005-10-24
|
||||
if (DB.isPostgreSQL())
|
||||
tableName = tableName.toLowerCase();
|
||||
// end globalqss 2005-10-24
|
||||
String tableName = table.getTableName();
|
||||
while (rs.next ())
|
||||
{
|
||||
String tn = rs.getString ("TABLE_NAME");
|
||||
|
|
|
@ -102,9 +102,11 @@ public class GridTable extends AbstractTableModel
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -4440415447489133947L;
|
||||
private static final long serialVersionUID = -3993077765244392901L;
|
||||
|
||||
public static final String DATA_REFRESH_MESSAGE = "Refreshed";
|
||||
public static final String DATA_UPDATE_COPIED_MESSAGE = "UpdateCopied";
|
||||
public static final String DATA_INSERTED_MESSAGE = "Inserted";
|
||||
|
||||
/**
|
||||
* JDBC Based Buffered Table
|
||||
|
@ -2621,7 +2623,7 @@ public class GridTable extends AbstractTableModel
|
|||
// inform
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Current=" + currentRow + ", New=" + m_newRow);
|
||||
fireTableRowsInserted(m_newRow, m_newRow);
|
||||
fireDataStatusIEvent(copyCurrent ? "UpdateCopied" : "Inserted", "");
|
||||
fireDataStatusIEvent(copyCurrent ? DATA_UPDATE_COPIED_MESSAGE : DATA_INSERTED_MESSAGE, "");
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Current=" + currentRow + ", New=" + m_newRow + " - complete");
|
||||
return true;
|
||||
} // dataNew
|
||||
|
|
|
@ -71,6 +71,17 @@ public interface I_AD_Package_Imp
|
|||
/** Get Package Imp. */
|
||||
public int getAD_Package_Imp_ID();
|
||||
|
||||
/** Column name AD_Package_Imp_Proc_ID */
|
||||
public static final String COLUMNNAME_AD_Package_Imp_Proc_ID = "AD_Package_Imp_Proc_ID";
|
||||
|
||||
/** Set Package Imp. Proc. */
|
||||
public void setAD_Package_Imp_Proc_ID (int AD_Package_Imp_Proc_ID);
|
||||
|
||||
/** Get Package Imp. Proc. */
|
||||
public int getAD_Package_Imp_Proc_ID();
|
||||
|
||||
public org.compiere.model.I_AD_Package_Imp_Proc getAD_Package_Imp_Proc() throws RuntimeException;
|
||||
|
||||
/** Column name AD_Package_Imp_UU */
|
||||
public static final String COLUMNNAME_AD_Package_Imp_UU = "AD_Package_Imp_UU";
|
||||
|
||||
|
|
|
@ -84,15 +84,6 @@ public interface I_AD_Package_Imp_Detail
|
|||
*/
|
||||
public int getAD_Org_ID();
|
||||
|
||||
/** Column name AD_Original_ID */
|
||||
public static final String COLUMNNAME_AD_Original_ID = "AD_Original_ID";
|
||||
|
||||
/** Set Original */
|
||||
public void setAD_Original_ID (int AD_Original_ID);
|
||||
|
||||
/** Get Original */
|
||||
public int getAD_Original_ID();
|
||||
|
||||
/** Column name AD_Package_Imp_Detail_ID */
|
||||
public static final String COLUMNNAME_AD_Package_Imp_Detail_ID = "AD_Package_Imp_Detail_ID";
|
||||
|
||||
|
@ -120,6 +111,8 @@ public interface I_AD_Package_Imp_Detail
|
|||
/** Get Package Imp. */
|
||||
public int getAD_Package_Imp_ID();
|
||||
|
||||
public org.compiere.model.I_AD_Package_Imp getAD_Package_Imp() throws RuntimeException;
|
||||
|
||||
/** Column name AD_Table_ID */
|
||||
public static final String COLUMNNAME_AD_Table_ID = "AD_Table_ID";
|
||||
|
||||
|
@ -133,6 +126,8 @@ public interface I_AD_Package_Imp_Detail
|
|||
*/
|
||||
public int getAD_Table_ID();
|
||||
|
||||
public org.compiere.model.I_AD_Table getAD_Table() throws RuntimeException;
|
||||
|
||||
/** Column name Created */
|
||||
public static final String COLUMNNAME_Created = "Created";
|
||||
|
||||
|
@ -175,6 +170,19 @@ public interface I_AD_Package_Imp_Detail
|
|||
*/
|
||||
public String getName();
|
||||
|
||||
/** Column name Record_ID */
|
||||
public static final String COLUMNNAME_Record_ID = "Record_ID";
|
||||
|
||||
/** Set Record ID.
|
||||
* Direct internal record ID
|
||||
*/
|
||||
public void setRecord_ID (int Record_ID);
|
||||
|
||||
/** Get Record ID.
|
||||
* Direct internal record ID
|
||||
*/
|
||||
public int getRecord_ID();
|
||||
|
||||
/** Column name Success */
|
||||
public static final String COLUMNNAME_Success = "Success";
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ import java.util.Properties;
|
|||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.exceptions.DBException;
|
||||
import org.compiere.process.CreateForeignKey;
|
||||
import org.compiere.util.CCache;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.DB;
|
||||
|
@ -52,7 +51,7 @@ public class MColumn extends X_AD_Column
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -3735608010271317406L;
|
||||
private static final long serialVersionUID = -7261365443985547106L;
|
||||
|
||||
/**
|
||||
* Get MColumn from Cache
|
||||
|
@ -840,7 +839,7 @@ public class MColumn extends X_AD_Column
|
|||
return table;
|
||||
}
|
||||
|
||||
public static String getForeignKeyConstraintSql(DatabaseMetaData md, String catalog, String schema, String tableName, MTable table, MColumn column) throws Exception
|
||||
public static String getForeignKeyConstraintSql(DatabaseMetaData md, String catalog, String schema, String tableName, MTable table, MColumn column, boolean isNoTable) throws Exception
|
||||
{
|
||||
StringBuilder fkConstraintSql = new StringBuilder();
|
||||
|
||||
|
@ -854,34 +853,43 @@ public class MColumn extends X_AD_Column
|
|||
{
|
||||
Hashtable<String, DatabaseKey> htForeignKeys = new Hashtable<String, DatabaseKey>();
|
||||
|
||||
if (md.storesUpperCaseIdentifiers())
|
||||
if (md.storesUpperCaseIdentifiers()) {
|
||||
referenceTableName = referenceTableName.toUpperCase();
|
||||
else if (md.storesLowerCaseIdentifiers())
|
||||
tableName = tableName.toUpperCase();
|
||||
} else if (md.storesLowerCaseIdentifiers()) {
|
||||
referenceTableName = referenceTableName.toLowerCase();
|
||||
|
||||
ResultSet rs = md.getCrossReference(catalog, schema, referenceTableName, catalog, schema, tableName);
|
||||
while (rs.next())
|
||||
{
|
||||
String dbFKName = rs.getString("FK_NAME");
|
||||
if (dbFKName == null)
|
||||
continue;
|
||||
|
||||
String dbFKTable = rs.getString("FKTABLE_NAME");
|
||||
short deleteRule = rs.getShort("DELETE_RULE");
|
||||
|
||||
String key = dbFKName.toLowerCase();
|
||||
DatabaseKey dbForeignKey = htForeignKeys.get(key);
|
||||
if (dbForeignKey == null)
|
||||
dbForeignKey = new DatabaseKey(dbFKName, dbFKTable, new String[30], deleteRule);
|
||||
|
||||
String columnName = rs.getString("FKCOLUMN_NAME");
|
||||
int pos = (rs.getShort("KEY_SEQ"));
|
||||
if (pos > 0)
|
||||
dbForeignKey.getKeyColumns()[pos-1] = columnName;
|
||||
|
||||
htForeignKeys.put(key, dbForeignKey);
|
||||
tableName = tableName.toLowerCase();
|
||||
}
|
||||
|
||||
if (!isNoTable) {
|
||||
ResultSet rs = null;
|
||||
try {
|
||||
rs = md.getCrossReference(catalog, schema, referenceTableName, catalog, schema, tableName);
|
||||
while (rs.next())
|
||||
{
|
||||
String dbFKName = rs.getString("FK_NAME");
|
||||
if (dbFKName == null)
|
||||
continue;
|
||||
|
||||
String dbFKTable = rs.getString("FKTABLE_NAME");
|
||||
short deleteRule = rs.getShort("DELETE_RULE");
|
||||
|
||||
String key = dbFKName.toLowerCase();
|
||||
DatabaseKey dbForeignKey = htForeignKeys.get(key);
|
||||
if (dbForeignKey == null)
|
||||
dbForeignKey = new DatabaseKey(dbFKName, dbFKTable, new String[30], deleteRule);
|
||||
|
||||
String columnName = rs.getString("FKCOLUMN_NAME");
|
||||
int pos = (rs.getShort("KEY_SEQ"));
|
||||
if (pos > 0)
|
||||
dbForeignKey.getKeyColumns()[pos-1] = columnName;
|
||||
|
||||
htForeignKeys.put(key, dbForeignKey);
|
||||
}
|
||||
} finally {
|
||||
DB.close(rs); rs = null;
|
||||
}
|
||||
}
|
||||
rs.close();
|
||||
|
||||
Enumeration<String> en = htForeignKeys.keys();
|
||||
while (en.hasMoreElements())
|
||||
|
@ -900,24 +908,34 @@ public class MColumn extends X_AD_Column
|
|||
DatabaseKey dbForeignKey = htForeignKeys.get(key);
|
||||
if (dbForeignKey.getKeyColumns()[0].equalsIgnoreCase(column.getColumnName()))
|
||||
{
|
||||
DatabaseKey primaryKey = CreateForeignKey.getPrimaryKey(md, referenceTableName);
|
||||
DatabaseKey primaryKey = getPrimaryKey(md, referenceTableName);
|
||||
if (primaryKey != null)
|
||||
{
|
||||
fkConstraintSql.append(DB.SQLSTATEMENT_SEPARATOR);
|
||||
fkConstraintSql.append("ALTER TABLE ").append(table.getTableName());
|
||||
fkConstraintSql.append(" DROP CONSTRAINT ").append(dbForeignKey.getKeyName());
|
||||
|
||||
String dbDeleteRule = MColumn.FKCONSTRAINTTYPE_NoAction;
|
||||
String dbDeleteRule = null;
|
||||
if (dbForeignKey.getDeleteRule() == DatabaseMetaData.importedKeyCascade)
|
||||
dbDeleteRule = MColumn.FKCONSTRAINTTYPE_Cascade;
|
||||
else if (dbForeignKey.getDeleteRule() == DatabaseMetaData.importedKeySetNull)
|
||||
dbDeleteRule = MColumn.FKCONSTRAINTTYPE_SetNull;
|
||||
|
||||
else if (dbForeignKey.getDeleteRule() == DatabaseMetaData.importedKeyNoAction || dbForeignKey.getDeleteRule() == DatabaseMetaData.importedKeyRestrict)
|
||||
dbDeleteRule = MColumn.FKCONSTRAINTTYPE_NoAction;
|
||||
String fkConstraintType = column.getFKConstraintType();
|
||||
if (fkConstraintType == null)
|
||||
if (fkConstraintType == null) {
|
||||
fkConstraintType = dbDeleteRule;
|
||||
if (fkConstraintType == null)
|
||||
fkConstraintType = MColumn.FKCONSTRAINTTYPE_NoAction;
|
||||
if (fkConstraintType == null) {
|
||||
if ( "AD_Client_ID".equals(column.getColumnName())
|
||||
|| "AD_Org_ID".equals(column.getColumnName())
|
||||
|| "CreatedBy".equals(column.getColumnName())
|
||||
|| "UpdatedBy".equals(column.getColumnName())
|
||||
)
|
||||
fkConstraintType = MColumn.FKCONSTRAINTTYPE_DoNotCreate;
|
||||
else
|
||||
fkConstraintType = MColumn.FKCONSTRAINTTYPE_NoAction;
|
||||
}
|
||||
}
|
||||
if (!fkConstraintType.equals(MColumn.FKCONSTRAINTTYPE_DoNotCreate))
|
||||
{
|
||||
String fkConstraintName = column.getFKConstraintName();
|
||||
|
@ -953,6 +971,18 @@ public class MColumn extends X_AD_Column
|
|||
column.setFKConstraintName(fkConstraintName);
|
||||
column.setFKConstraintType(fkConstraintType);
|
||||
column.saveEx();
|
||||
|
||||
// if the current db FK is same as what we need to create
|
||||
if ( dbForeignKey.getKeyName().equalsIgnoreCase(column.getFKConstraintName())
|
||||
&& ( (dbForeignKey.getDeleteRule() == DatabaseMetaData.importedKeyCascade && MColumn.FKCONSTRAINTTYPE_Cascade.equals(column.getFKConstraintType()))
|
||||
|| (dbForeignKey.getDeleteRule() == DatabaseMetaData.importedKeySetNull && MColumn.FKCONSTRAINTTYPE_SetNull.equals(column.getFKConstraintType()))
|
||||
|| (dbForeignKey.getDeleteRule() == DatabaseMetaData.importedKeyNoAction && MColumn.FKCONSTRAINTTYPE_NoAction.equals(column.getFKConstraintType()))
|
||||
|| (dbForeignKey.getDeleteRule() == DatabaseMetaData.importedKeyRestrict && MColumn.FKCONSTRAINTTYPE_NoAction.equals(column.getFKConstraintType()))
|
||||
)
|
||||
) {
|
||||
// nothing changed
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
modified = true;
|
||||
|
@ -962,7 +992,7 @@ public class MColumn extends X_AD_Column
|
|||
|
||||
if (!modified)
|
||||
{
|
||||
String fkConstraint = CreateForeignKey.getForeignKeyConstraint(md, table, column);
|
||||
String fkConstraint = getForeignKeyConstraint(md, table, column);
|
||||
if (fkConstraint != null && fkConstraint.length() > 0)
|
||||
{
|
||||
fkConstraintSql.append(DB.SQLSTATEMENT_SEPARATOR);
|
||||
|
@ -977,4 +1007,114 @@ public class MColumn extends X_AD_Column
|
|||
return fkConstraintSql.toString();
|
||||
}
|
||||
|
||||
public static DatabaseKey getPrimaryKey(DatabaseMetaData md, String primaryTableName) throws Exception
|
||||
{
|
||||
DatabaseKey primaryKey = null;
|
||||
|
||||
String catalog = DB.getDatabase().getCatalog();
|
||||
String schema = DB.getDatabase().getSchema();
|
||||
|
||||
String tableName = primaryTableName;
|
||||
if (md.storesUpperCaseIdentifiers())
|
||||
tableName = tableName.toUpperCase();
|
||||
else if (md.storesLowerCaseIdentifiers())
|
||||
tableName = tableName.toLowerCase();
|
||||
|
||||
ResultSet rs = null;
|
||||
try {
|
||||
rs = md.getPrimaryKeys(catalog, schema, tableName);
|
||||
while (rs.next())
|
||||
{
|
||||
String primaryKeyName = rs.getString("PK_NAME");
|
||||
if (primaryKeyName == null)
|
||||
continue;
|
||||
|
||||
String primaryKeyTableName = rs.getString("TABLE_NAME");
|
||||
short deleteRule = -1;
|
||||
|
||||
if (primaryKey == null)
|
||||
primaryKey = new DatabaseKey(primaryKeyName, primaryKeyTableName, new String[30], deleteRule);
|
||||
|
||||
String primaryKeyColumn = rs.getString("COLUMN_NAME");
|
||||
int pos = (rs.getShort("KEY_SEQ"));
|
||||
if (pos > 0)
|
||||
primaryKey.getKeyColumns()[pos-1] = primaryKeyColumn;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
DB.close(rs); rs = null;
|
||||
}
|
||||
return primaryKey;
|
||||
}
|
||||
|
||||
public static String getForeignKeyConstraint(DatabaseMetaData md, MTable table, MColumn column) throws Exception
|
||||
{
|
||||
if (!column.isKey() && !column.getColumnName().equals(PO.getUUIDColumnName(table.getTableName())))
|
||||
{
|
||||
String fkConstraintType = column.getFKConstraintType();
|
||||
if (fkConstraintType == null)
|
||||
fkConstraintType = MColumn.FKCONSTRAINTTYPE_NoAction;
|
||||
|
||||
if (fkConstraintType.equals(MColumn.FKCONSTRAINTTYPE_DoNotCreate))
|
||||
return "";
|
||||
|
||||
int refid = column.getAD_Reference_ID();
|
||||
if (refid != DisplayType.List && refid != DisplayType.Payment)
|
||||
{
|
||||
String referenceTableName = column.getReferenceTableName();
|
||||
if (referenceTableName != null)
|
||||
{
|
||||
DatabaseKey primaryKey = MColumn.getPrimaryKey(md, referenceTableName);
|
||||
|
||||
if (primaryKey != null)
|
||||
{
|
||||
String fkConstraintName = column.getFKConstraintName();
|
||||
if (fkConstraintName == null || fkConstraintName.trim().length() == 0)
|
||||
{
|
||||
String columnName = column.getColumnName();
|
||||
if (columnName.toUpperCase().endsWith("_ID"))
|
||||
columnName = columnName.substring(0, columnName.length() - 3);
|
||||
|
||||
StringBuilder constraintName = new StringBuilder();
|
||||
constraintName.append(columnName.replace("_", ""));
|
||||
constraintName.append("_");
|
||||
constraintName.append(table.getTableName().replace("_", ""));
|
||||
if (constraintName.length() > 30)
|
||||
constraintName = new StringBuilder(constraintName.substring(0, 30));
|
||||
fkConstraintName = constraintName.toString();
|
||||
}
|
||||
|
||||
StringBuilder fkConstraint = new StringBuilder();
|
||||
fkConstraint.append("CONSTRAINT ").append(fkConstraintName);
|
||||
fkConstraint.append(" FOREIGN KEY (").append(column.getColumnName()).append(") REFERENCES ");
|
||||
fkConstraint.append(primaryKey.getKeyTable()).append("(").append(primaryKey.getKeyColumns()[0]);
|
||||
for (int i = 1; i < primaryKey.getKeyColumns().length; i++)
|
||||
{
|
||||
if (primaryKey.getKeyColumns()[i] == null)
|
||||
break;
|
||||
fkConstraint.append(", ").append(primaryKey.getKeyColumns()[i]);
|
||||
}
|
||||
fkConstraint.append(")");
|
||||
|
||||
if (fkConstraintType.equals(MColumn.FKCONSTRAINTTYPE_NoAction))
|
||||
;
|
||||
else if (fkConstraintType.equals(MColumn.FKCONSTRAINTTYPE_Cascade))
|
||||
fkConstraint.append(" ON DELETE CASCADE");
|
||||
else if (fkConstraintType.equals(MColumn.FKCONSTRAINTTYPE_SetNull))
|
||||
fkConstraint.append(" ON DELETE SET NULL");
|
||||
|
||||
fkConstraint.append(" DEFERRABLE INITIALLY DEFERRED");
|
||||
|
||||
column.setFKConstraintName(fkConstraintName);
|
||||
column.setFKConstraintType(fkConstraintType);
|
||||
column.saveEx();
|
||||
|
||||
return fkConstraint.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
} // MColumn
|
||||
|
|
|
@ -2358,23 +2358,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
|||
|
||||
MPeriod.testPeriodOpen(getCtx(), reversalDate, getC_DocType_ID(), getAD_Org_ID());
|
||||
//
|
||||
MAllocationHdr[] allocations = MAllocationHdr.getOfInvoice(getCtx(),
|
||||
getC_Invoice_ID(), get_TrxName());
|
||||
for (int i = 0; i < allocations.length; i++)
|
||||
{
|
||||
if (accrual)
|
||||
{
|
||||
allocations[i].setDocAction(DocAction.ACTION_Reverse_Accrual);
|
||||
allocations[i].reverseAccrualIt();
|
||||
allocations[i].saveEx(get_TrxName());
|
||||
}
|
||||
else
|
||||
{
|
||||
allocations[i].setDocAction(DocAction.ACTION_Reverse_Correct);
|
||||
allocations[i].reverseCorrectIt();
|
||||
allocations[i].saveEx(get_TrxName());
|
||||
}
|
||||
}
|
||||
reverseAllocations(accrual, getC_Invoice_ID());
|
||||
// Reverse/Delete Matching
|
||||
if (!isSOTrx())
|
||||
{
|
||||
|
@ -2462,6 +2446,9 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
|||
m_processMsg = "Reversal ERROR: " + reversal.getProcessMsg();
|
||||
return null;
|
||||
}
|
||||
//
|
||||
reverseAllocations(accrual, reversal.getC_Invoice_ID());
|
||||
|
||||
reversal.setC_Payment_ID(0);
|
||||
reversal.setIsPaid(true);
|
||||
reversal.closeIt();
|
||||
|
@ -2529,6 +2516,19 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
|||
return reversal;
|
||||
}
|
||||
|
||||
private void reverseAllocations(boolean accrual, int invoiceID) {
|
||||
for (MAllocationHdr allocation : MAllocationHdr.getOfInvoice(getCtx(), invoiceID, get_TrxName())) {
|
||||
if (accrual) {
|
||||
allocation.setDocAction(DocAction.ACTION_Reverse_Accrual);
|
||||
allocation.reverseAccrualIt();
|
||||
} else {
|
||||
allocation.setDocAction(DocAction.ACTION_Reverse_Correct);
|
||||
allocation.reverseCorrectIt();
|
||||
}
|
||||
allocation.saveEx(get_TrxName());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse Accrual - none
|
||||
* @return false
|
||||
|
|
|
@ -224,8 +224,8 @@ public class MIssue extends X_AD_Issue
|
|||
setLocal_Host(InetAddress.getLocalHost().toString());
|
||||
if (system.isAllowStatistics())
|
||||
{
|
||||
setStatisticsInfo(system.getStatisticsInfo(true));
|
||||
setProfileInfo(system.getProfileInfo(true));
|
||||
setStatisticsInfo(system.getStatisticsInfo(false));
|
||||
setProfileInfo(system.getProfileInfo(false));
|
||||
}
|
||||
} // init
|
||||
|
||||
|
|
|
@ -491,10 +491,11 @@ public class MJournal extends X_GL_Journal implements DocAction
|
|||
|
||||
// Michael Judd (mjudd) BUG: [ 2678088 ] Allow posting to system accounts for non-actual postings
|
||||
if (line.isDocControlled() &&
|
||||
( getPostingType().equals(POSTINGTYPE_Actual)) ||
|
||||
( getPostingType().equals(POSTINGTYPE_Actual) ||
|
||||
getPostingType().equals(POSTINGTYPE_Commitment) ||
|
||||
getPostingType().equals(POSTINGTYPE_Reservation)
|
||||
)
|
||||
)
|
||||
{
|
||||
m_processMsg = "@DocControlledError@ - @Line@=" + line.getLine()
|
||||
+ " - " + line.getAccountElementValue();
|
||||
|
|
|
@ -42,7 +42,7 @@ public class MSysConfig extends X_AD_SysConfig
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 4290286149969983294L;
|
||||
private static final long serialVersionUID = -2870394087507976203L;
|
||||
|
||||
public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION";
|
||||
public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS";
|
||||
|
@ -59,6 +59,7 @@ public class MSysConfig extends X_AD_SysConfig
|
|||
public static final String APPLICATION_MAIN_VERSION = "APPLICATION_MAIN_VERSION";
|
||||
public static final String APPLICATION_MAIN_VERSION_SHOWN = "APPLICATION_MAIN_VERSION_SHOWN";
|
||||
public static final String APPLICATION_OS_INFO_SHOWN = "APPLICATION_OS_INFO_SHOWN";
|
||||
public static final String ATTACH_EMBEDDED_2PACK = "ATTACH_EMBEDDED_2PACK";
|
||||
public static final String BACKGROUND_JOB_ALLOWED = "BACKGROUND_JOB_ALLOWED";
|
||||
public static final String BACKGROUND_JOB_BY_DEFAULT = "BACKGROUND_JOB_BY_DEFAULT";
|
||||
public static final String BACKGROUND_JOB_MAX_IN_SYSTEM = "BACKGROUND_JOB_MAX_IN_SYSTEM";
|
||||
|
|
|
@ -30,7 +30,7 @@ public class X_AD_Package_Imp extends PO implements I_AD_Package_Imp, I_Persiste
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20141030L;
|
||||
private static final long serialVersionUID = 20150813L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_AD_Package_Imp (Properties ctx, int AD_Package_Imp_ID, String trxName)
|
||||
|
@ -100,6 +100,31 @@ public class X_AD_Package_Imp extends PO implements I_AD_Package_Imp, I_Persiste
|
|||
return new KeyNamePair(get_ID(), String.valueOf(getAD_Package_Imp_ID()));
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_Package_Imp_Proc getAD_Package_Imp_Proc() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_Package_Imp_Proc)MTable.get(getCtx(), org.compiere.model.I_AD_Package_Imp_Proc.Table_Name)
|
||||
.getPO(getAD_Package_Imp_Proc_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Package Imp. Proc..
|
||||
@param AD_Package_Imp_Proc_ID Package Imp. Proc. */
|
||||
public void setAD_Package_Imp_Proc_ID (int AD_Package_Imp_Proc_ID)
|
||||
{
|
||||
if (AD_Package_Imp_Proc_ID < 1)
|
||||
set_Value (COLUMNNAME_AD_Package_Imp_Proc_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_AD_Package_Imp_Proc_ID, Integer.valueOf(AD_Package_Imp_Proc_ID));
|
||||
}
|
||||
|
||||
/** Get Package Imp. Proc..
|
||||
@return Package Imp. Proc. */
|
||||
public int getAD_Package_Imp_Proc_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Package_Imp_Proc_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set AD_Package_Imp_UU.
|
||||
@param AD_Package_Imp_UU AD_Package_Imp_UU */
|
||||
public void setAD_Package_Imp_UU (String AD_Package_Imp_UU)
|
||||
|
|
|
@ -29,7 +29,7 @@ public class X_AD_Package_Imp_Detail extends PO implements I_AD_Package_Imp_Deta
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20141030L;
|
||||
private static final long serialVersionUID = 20150818L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_AD_Package_Imp_Detail (Properties ctx, int AD_Package_Imp_Detail_ID, String trxName)
|
||||
|
@ -37,9 +37,9 @@ public class X_AD_Package_Imp_Detail extends PO implements I_AD_Package_Imp_Deta
|
|||
super (ctx, AD_Package_Imp_Detail_ID, trxName);
|
||||
/** if (AD_Package_Imp_Detail_ID == 0)
|
||||
{
|
||||
setAD_Original_ID (0);
|
||||
setAD_Package_Imp_Detail_ID (0);
|
||||
setAD_Package_Imp_ID (0);
|
||||
setRecord_ID (0);
|
||||
} */
|
||||
}
|
||||
|
||||
|
@ -108,26 +108,6 @@ public class X_AD_Package_Imp_Detail extends PO implements I_AD_Package_Imp_Deta
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Original.
|
||||
@param AD_Original_ID Original */
|
||||
public void setAD_Original_ID (int AD_Original_ID)
|
||||
{
|
||||
if (AD_Original_ID < 1)
|
||||
set_Value (COLUMNNAME_AD_Original_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_AD_Original_ID, Integer.valueOf(AD_Original_ID));
|
||||
}
|
||||
|
||||
/** Get Original.
|
||||
@return Original */
|
||||
public int getAD_Original_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Original_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Imp. Package Detail.
|
||||
@param AD_Package_Imp_Detail_ID Imp. Package Detail */
|
||||
public void setAD_Package_Imp_Detail_ID (int AD_Package_Imp_Detail_ID)
|
||||
|
@ -162,6 +142,11 @@ public class X_AD_Package_Imp_Detail extends PO implements I_AD_Package_Imp_Deta
|
|||
return (String)get_Value(COLUMNNAME_AD_Package_Imp_Detail_UU);
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_Package_Imp getAD_Package_Imp() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_Package_Imp)MTable.get(getCtx(), org.compiere.model.I_AD_Package_Imp.Table_Name)
|
||||
.getPO(getAD_Package_Imp_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Package Imp..
|
||||
@param AD_Package_Imp_ID Package Imp. */
|
||||
public void setAD_Package_Imp_ID (int AD_Package_Imp_ID)
|
||||
|
@ -182,6 +167,11 @@ public class X_AD_Package_Imp_Detail extends PO implements I_AD_Package_Imp_Deta
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.compiere.model.I_AD_Table getAD_Table() throws RuntimeException
|
||||
{
|
||||
return (org.compiere.model.I_AD_Table)MTable.get(getCtx(), org.compiere.model.I_AD_Table.Table_Name)
|
||||
.getPO(getAD_Table_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Table.
|
||||
@param AD_Table_ID
|
||||
Database Table information
|
||||
|
@ -222,6 +212,29 @@ public class X_AD_Package_Imp_Detail extends PO implements I_AD_Package_Imp_Deta
|
|||
return (String)get_Value(COLUMNNAME_Name);
|
||||
}
|
||||
|
||||
/** Set Record ID.
|
||||
@param Record_ID
|
||||
Direct internal record ID
|
||||
*/
|
||||
public void setRecord_ID (int Record_ID)
|
||||
{
|
||||
if (Record_ID < 0)
|
||||
set_Value (COLUMNNAME_Record_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_Record_ID, Integer.valueOf(Record_ID));
|
||||
}
|
||||
|
||||
/** Get Record ID.
|
||||
@return Direct internal record ID
|
||||
*/
|
||||
public int getRecord_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_Record_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Success.
|
||||
@param Success Success */
|
||||
public void setSuccess (String Success)
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.compiere.model.MColumn;
|
|||
import org.compiere.model.MTable;
|
||||
import org.compiere.model.PO;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.DisplayType;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.Trx;
|
||||
|
||||
|
@ -69,7 +68,7 @@ public class CreateForeignKey extends SvrProcess {
|
|||
{
|
||||
if (log.isLoggable(Level.INFO)) log.info("AD_Table_ID=" + p_AD_Table_ID + ", AD_Column_ID=" + p_AD_Column_ID);
|
||||
|
||||
Trx trx = Trx.get(get_TrxName(), true);
|
||||
Trx trx = Trx.get(get_TrxName(), false);
|
||||
DatabaseMetaData md = trx.getConnection().getMetaData();
|
||||
|
||||
if (p_AD_Column_ID > 0)
|
||||
|
@ -88,14 +87,14 @@ public class CreateForeignKey extends SvrProcess {
|
|||
else if (p_AD_Table_ID > 0)
|
||||
{
|
||||
MTable table = new MTable(getCtx(), p_AD_Table_ID, get_TrxName());
|
||||
if (table != null)
|
||||
if (table != null) {
|
||||
addLog(table.getAD_Table_ID(), null, null, Msg.getMsg(getCtx(), "CreateForeignKeyProcessTable") + table.getTableName(), table.get_Table_ID(), table.getAD_Table_ID());
|
||||
processDatabaseTableColumn(md, table, null);
|
||||
}
|
||||
}
|
||||
else
|
||||
processDatabase(md);
|
||||
|
||||
trx.close();
|
||||
|
||||
return Msg.getMsg(getCtx(), "CreateForeignKeyProcessResult", new Object[] {countTable, countForeignKey, countError});
|
||||
}
|
||||
|
||||
|
@ -106,18 +105,24 @@ public class CreateForeignKey extends SvrProcess {
|
|||
String schema = DB.getDatabase().getSchema();
|
||||
String[] types = {"TABLE"};
|
||||
|
||||
ResultSet rs = md.getTables(catalog, schema, tableName, types);
|
||||
while (rs.next())
|
||||
{
|
||||
String dbTableName = rs.getString("TABLE_NAME");
|
||||
if (dbTableName == null)
|
||||
continue;
|
||||
MTable table = MTable.get(getCtx(), dbTableName);
|
||||
if (table != null) // exists in AD_Table
|
||||
processDatabaseTableColumn(md, table, null);
|
||||
ResultSet rs = null;
|
||||
try {
|
||||
rs = md.getTables(catalog, schema, tableName, types);
|
||||
while (rs.next())
|
||||
{
|
||||
String dbTableName = rs.getString("TABLE_NAME");
|
||||
if (dbTableName == null)
|
||||
continue;
|
||||
MTable table = MTable.get(getCtx(), dbTableName);
|
||||
if (table != null) { // exists in AD_Table
|
||||
addLog(table.getAD_Table_ID(), null, null, Msg.getMsg(getCtx(), "CreateForeignKeyProcessTable") + table.getTableName(), table.get_Table_ID(), table.getAD_Table_ID());
|
||||
processDatabaseTableColumn(md, table, null);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
DB.close(rs); rs = null;
|
||||
}
|
||||
|
||||
rs.close();
|
||||
}
|
||||
|
||||
private void processDatabaseTableColumn(DatabaseMetaData md, MTable table, MColumn column) throws Exception
|
||||
|
@ -133,13 +138,9 @@ public class CreateForeignKey extends SvrProcess {
|
|||
else if (md.storesLowerCaseIdentifiers())
|
||||
tableName = tableName.toLowerCase();
|
||||
|
||||
addLog(Msg.getMsg(getCtx(), "CreateForeignKeyProcessTable") + tableName);
|
||||
addLog(table.getAD_Table_ID(), null, null, table.toString(), table.get_Table_ID(), table.getAD_Table_ID());
|
||||
++countTable;
|
||||
|
||||
if (column == null)
|
||||
{
|
||||
ResultSet rs = md.getImportedKeys(catalog, schema, tableName);
|
||||
ResultSet rs = null;
|
||||
try {
|
||||
rs = md.getImportedKeys(catalog, schema, tableName);
|
||||
while (rs.next())
|
||||
{
|
||||
String dbFKName = rs.getString("FK_NAME");
|
||||
|
@ -161,336 +162,164 @@ public class CreateForeignKey extends SvrProcess {
|
|||
|
||||
htForeignKeys.put(key, dbForeignKey);
|
||||
}
|
||||
rs.close();
|
||||
} finally {
|
||||
DB.close(rs); rs = null;
|
||||
}
|
||||
|
||||
Enumeration<String> en = htForeignKeys.keys();
|
||||
Enumeration<String> en = htForeignKeys.keys();
|
||||
while (en.hasMoreElements())
|
||||
{
|
||||
String key = en.nextElement();
|
||||
DatabaseKey dbForeignKey = htForeignKeys.get(key);
|
||||
if (dbForeignKey.getKeyColumns()[1] != null)
|
||||
htForeignKeys.remove(key);
|
||||
}
|
||||
|
||||
++countTable;
|
||||
|
||||
if (column == null)
|
||||
{
|
||||
final String getColumnIDSql = "SELECT AD_Column_ID FROM AD_Column WHERE AD_Table_ID = ? AND LOWER(ColumnName) = ?";
|
||||
try {
|
||||
rs = md.getColumns(catalog, schema, tableName, null);
|
||||
while (rs.next())
|
||||
{
|
||||
String columnName = rs.getString("COLUMN_NAME");
|
||||
if (columnName == null)
|
||||
continue;
|
||||
|
||||
int AD_Column_ID = DB.getSQLValue(null, getColumnIDSql, table.getAD_Table_ID(), columnName.toLowerCase());
|
||||
if (AD_Column_ID > 0)
|
||||
{
|
||||
column = MColumn.get(getCtx(), AD_Column_ID);
|
||||
if (column == null)
|
||||
continue;
|
||||
String foreignTable = column.getReferenceTableName();
|
||||
if (foreignTable != null && ! "AD_Ref_List".equals(foreignTable))
|
||||
processDatabaseTableColumn(md, table, column);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
DB.close(rs); rs = null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (processUI != null)
|
||||
processUI.statusUpdate(table.getTableName() + "." + column.getColumnName());
|
||||
boolean modified = false;
|
||||
en = htForeignKeys.keys();
|
||||
while (en.hasMoreElements())
|
||||
{
|
||||
String key = en.nextElement();
|
||||
DatabaseKey dbForeignKey = htForeignKeys.get(key);
|
||||
if (dbForeignKey.getKeyColumns()[1] != null)
|
||||
htForeignKeys.remove(key);
|
||||
}
|
||||
|
||||
String getColumnIDSql = "SELECT AD_Column_ID FROM AD_Column WHERE AD_Table_ID = ? AND LOWER(ColumnName) = ?";
|
||||
rs = md.getColumns(catalog, schema, tableName, null);
|
||||
while (rs.next())
|
||||
{
|
||||
String columnName = rs.getString("COLUMN_NAME");
|
||||
if (columnName == null)
|
||||
continue;
|
||||
|
||||
int AD_Column_ID = DB.getSQLValue(null, getColumnIDSql, table.getAD_Table_ID(), columnName.toLowerCase());
|
||||
if (AD_Column_ID > 0)
|
||||
{
|
||||
column = MColumn.get(getCtx(), AD_Column_ID);
|
||||
if (column == null)
|
||||
continue;
|
||||
|
||||
boolean modified = false;
|
||||
en = htForeignKeys.keys();
|
||||
while (en.hasMoreElements())
|
||||
{
|
||||
String key = en.nextElement();
|
||||
DatabaseKey dbForeignKey = htForeignKeys.get(key);
|
||||
|
||||
String dbDeleteRule = MColumn.FKCONSTRAINTTYPE_NoAction;
|
||||
if (dbForeignKey.getDeleteRule() == DatabaseMetaData.importedKeyCascade)
|
||||
dbDeleteRule = MColumn.FKCONSTRAINTTYPE_Cascade;
|
||||
else if (dbForeignKey.getDeleteRule() == DatabaseMetaData.importedKeySetNull)
|
||||
dbDeleteRule = MColumn.FKCONSTRAINTTYPE_SetNull;
|
||||
|
||||
String fkConstraintType = column.getFKConstraintType();
|
||||
if (fkConstraintType == null)
|
||||
String dbDeleteRule = null;
|
||||
if (dbForeignKey.getDeleteRule() == DatabaseMetaData.importedKeyCascade)
|
||||
dbDeleteRule = MColumn.FKCONSTRAINTTYPE_Cascade;
|
||||
else if (dbForeignKey.getDeleteRule() == DatabaseMetaData.importedKeySetNull)
|
||||
dbDeleteRule = MColumn.FKCONSTRAINTTYPE_SetNull;
|
||||
else if (dbForeignKey.getDeleteRule() == DatabaseMetaData.importedKeyNoAction || dbForeignKey.getDeleteRule() == DatabaseMetaData.importedKeyRestrict)
|
||||
dbDeleteRule = MColumn.FKCONSTRAINTTYPE_NoAction;
|
||||
String fkConstraintType = column.getFKConstraintType();
|
||||
if (fkConstraintType == null) {
|
||||
fkConstraintType = dbDeleteRule;
|
||||
if (fkConstraintType == null) {
|
||||
if ( "AD_Client_ID".equals(column.getColumnName())
|
||||
|| "AD_Org_ID".equals(column.getColumnName())
|
||||
|| "CreatedBy".equals(column.getColumnName())
|
||||
|| "UpdatedBy".equals(column.getColumnName())
|
||||
)
|
||||
fkConstraintType = MColumn.FKCONSTRAINTTYPE_DoNotCreate;
|
||||
else
|
||||
fkConstraintType = MColumn.FKCONSTRAINTTYPE_NoAction;
|
||||
|
||||
if (dbForeignKey.getKeyColumns()[0].equalsIgnoreCase(column.getColumnName()))
|
||||
{
|
||||
if (dbDeleteRule.equals(fkConstraintType))
|
||||
{
|
||||
addLog(Msg.getMsg(getCtx(), "CreateForeignKeyProcessColumn") + column.getColumnName());
|
||||
addLog(column.getAD_Column_ID(), null, null, column.toString(), column.get_Table_ID(), column.getAD_Column_ID());
|
||||
addLog(0, null, null, Msg.getMsg(getCtx(), "CreateForeignKeyProcessExists") + dbForeignKey.getKeyName());
|
||||
modified = true;
|
||||
column.setFKConstraintName(dbForeignKey.getKeyName());
|
||||
column.setFKConstraintType(fkConstraintType);
|
||||
column.saveEx();
|
||||
break;
|
||||
}
|
||||
else if (fkConstraintType.equals(MColumn.FKCONSTRAINTTYPE_DoNotCreate))
|
||||
{
|
||||
addLog(Msg.getMsg(getCtx(), "CreateForeignKeyProcessColumn") + column.getColumnName());
|
||||
addLog(column.getAD_Column_ID(), null, null, column.toString(), column.get_Table_ID(), column.getAD_Column_ID());
|
||||
addLog(0, null, null, Msg.getMsg(getCtx(), "CreateForeignKeyProcessExists") + dbForeignKey.getKeyName());
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("ALTER TABLE ").append(table.getTableName());
|
||||
sql.append(" DROP CONSTRAINT ").append(dbForeignKey.getKeyName());
|
||||
|
||||
Trx trx = Trx.get(Trx.createTrxName("CreateForeignKey"), true);
|
||||
try {
|
||||
int rvalue = DB.executeUpdate(sql.toString(), (Object[]) null, true, trx.getTrxName());
|
||||
addLog(0, null, new BigDecimal(rvalue), sql.toString());
|
||||
} catch (Exception e) {
|
||||
addLog(Msg.getMsg(getCtx(), "Error") + e.getLocalizedMessage());
|
||||
if (trx != null)
|
||||
trx.rollback();
|
||||
} finally {
|
||||
if (trx != null)
|
||||
trx.close();
|
||||
}
|
||||
|
||||
modified = true;
|
||||
column.setFKConstraintName(dbForeignKey.getKeyName());
|
||||
column.setFKConstraintType(fkConstraintType);
|
||||
column.saveEx();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (modified)
|
||||
continue;
|
||||
|
||||
if (!column.isKey() && !column.getColumnName().equals(PO.getUUIDColumnName(table.getTableName())))
|
||||
{
|
||||
String fkConstraint = getForeignKeyConstraint(md, table, column);
|
||||
if (fkConstraint != null && fkConstraint.length() > 0)
|
||||
{
|
||||
addLog(Msg.getMsg(getCtx(), "CreateForeignKeyProcessColumn") + column.getColumnName());
|
||||
addLog(column.getAD_Column_ID(), null, null, column.toString(), column.get_Table_ID(), column.getAD_Column_ID());
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("ALTER TABLE ").append(table.getTableName());
|
||||
sql.append(" ADD ");
|
||||
sql.append(fkConstraint);
|
||||
|
||||
Trx trx = Trx.get(Trx.createTrxName("CreateForeignKey"), true);
|
||||
try {
|
||||
int rvalue = DB.executeUpdate(sql.toString(), (Object[]) null, true, trx.getTrxName());
|
||||
addLog(0, null, new BigDecimal(rvalue), sql.toString());
|
||||
if (rvalue == -1)
|
||||
++countError;
|
||||
else
|
||||
++countForeignKey;
|
||||
} catch (Exception e) {
|
||||
addLog(Msg.getMsg(getCtx(), "Error") + e.getLocalizedMessage());
|
||||
if (trx != null)
|
||||
trx.rollback();
|
||||
++countError;
|
||||
} finally {
|
||||
if (trx != null)
|
||||
trx.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
rs.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
int refid = column.getAD_Reference_ID();
|
||||
if (refid != DisplayType.List && refid != DisplayType.Payment)
|
||||
{
|
||||
String referenceTableName = column.getReferenceTableName();
|
||||
|
||||
if (referenceTableName != null)
|
||||
if (dbForeignKey.getKeyColumns()[0].equalsIgnoreCase(column.getColumnName()))
|
||||
{
|
||||
if (md.storesUpperCaseIdentifiers())
|
||||
referenceTableName = referenceTableName.toUpperCase();
|
||||
else if (md.storesLowerCaseIdentifiers())
|
||||
referenceTableName = referenceTableName.toLowerCase();
|
||||
|
||||
ResultSet rs = md.getCrossReference(catalog, schema, referenceTableName, catalog, schema, tableName);
|
||||
while (rs.next())
|
||||
if (dbDeleteRule.equals(fkConstraintType))
|
||||
{
|
||||
String dbFKName = rs.getString("FK_NAME");
|
||||
if (dbFKName == null)
|
||||
continue;
|
||||
|
||||
String dbFKTable = rs.getString("FKTABLE_NAME");
|
||||
short deleteRule = rs.getShort("DELETE_RULE");
|
||||
|
||||
String key = dbFKName.toLowerCase();
|
||||
DatabaseKey dbForeignKey = htForeignKeys.get(key);
|
||||
if (dbForeignKey == null)
|
||||
dbForeignKey = new DatabaseKey(dbFKName, dbFKTable, new String[30], deleteRule);
|
||||
|
||||
String columnName = rs.getString("FKCOLUMN_NAME");
|
||||
int pos = (rs.getShort("KEY_SEQ"));
|
||||
if (pos > 0)
|
||||
dbForeignKey.getKeyColumns()[pos-1] = columnName;
|
||||
|
||||
htForeignKeys.put(key, dbForeignKey);
|
||||
}
|
||||
rs.close();
|
||||
|
||||
Enumeration<String> en = htForeignKeys.keys();
|
||||
while (en.hasMoreElements())
|
||||
{
|
||||
String key = en.nextElement();
|
||||
DatabaseKey dbForeignKey = htForeignKeys.get(key);
|
||||
if (dbForeignKey.getKeyColumns()[1] != null)
|
||||
htForeignKeys.remove(key);
|
||||
}
|
||||
|
||||
en = htForeignKeys.keys();
|
||||
while (en.hasMoreElements())
|
||||
{
|
||||
String key = en.nextElement();
|
||||
DatabaseKey dbForeignKey = htForeignKeys.get(key);
|
||||
if (dbForeignKey.getKeyColumns()[0].equalsIgnoreCase(column.getColumnName()))
|
||||
{
|
||||
addLog(Msg.getMsg(getCtx(), "CreateForeignKeyProcessColumn") + column.getColumnName());
|
||||
addLog(column.getAD_Column_ID(), null, null, column.toString(), column.get_Table_ID(), column.getAD_Column_ID());
|
||||
addLog(0, null, null, Msg.getMsg(getCtx(), "CreateForeignKeyProcessExists") + dbForeignKey.getKeyName());
|
||||
column.setFKConstraintName(dbForeignKey.getKeyName());
|
||||
column.saveEx();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!column.isKey() && !column.getColumnName().equals(PO.getUUIDColumnName(table.getTableName())))
|
||||
{
|
||||
String fkConstraint = getForeignKeyConstraint(md, table, column);
|
||||
if (fkConstraint != null && fkConstraint.length() > 0)
|
||||
{
|
||||
addLog(Msg.getMsg(getCtx(), "CreateForeignKeyProcessColumn") + column.getColumnName());
|
||||
addLog(column.getAD_Column_ID(), null, null, column.toString(), column.get_Table_ID(), column.getAD_Column_ID());
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("ALTER TABLE ").append(table.getTableName());
|
||||
sql.append(" ADD ");
|
||||
sql.append(fkConstraint);
|
||||
|
||||
Trx trx = Trx.get(Trx.createTrxName("CreateForeignKey"), true);
|
||||
try {
|
||||
int rvalue = DB.executeUpdate(sql.toString(), (Object[]) null, true, trx.getTrxName());
|
||||
addLog(0, null, new BigDecimal(rvalue), sql.toString());
|
||||
if (rvalue == -1)
|
||||
++countError;
|
||||
else
|
||||
++countForeignKey;
|
||||
} catch (Exception e) {
|
||||
addLog(Msg.getMsg(getCtx(), "Error") + e.getLocalizedMessage());
|
||||
if (trx != null)
|
||||
trx.rollback();
|
||||
++countError;
|
||||
} finally {
|
||||
if (trx != null)
|
||||
trx.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static String getForeignKeyConstraint(DatabaseMetaData md, MTable table, MColumn column) throws Exception
|
||||
{
|
||||
if (!column.isKey() && !column.getColumnName().equals(PO.getUUIDColumnName(table.getTableName())))
|
||||
{
|
||||
String fkConstraintType = column.getFKConstraintType();
|
||||
if (fkConstraintType == null)
|
||||
fkConstraintType = MColumn.FKCONSTRAINTTYPE_NoAction;
|
||||
|
||||
if (fkConstraintType.equals(MColumn.FKCONSTRAINTTYPE_DoNotCreate))
|
||||
return "";
|
||||
|
||||
int refid = column.getAD_Reference_ID();
|
||||
if (refid != DisplayType.List && refid != DisplayType.Payment)
|
||||
{
|
||||
String referenceTableName = column.getReferenceTableName();
|
||||
if (referenceTableName != null)
|
||||
{
|
||||
DatabaseKey primaryKey = getPrimaryKey(md, referenceTableName);
|
||||
|
||||
if (primaryKey != null)
|
||||
{
|
||||
String fkConstraintName = column.getFKConstraintName();
|
||||
if (fkConstraintName == null || fkConstraintName.trim().length() == 0)
|
||||
{
|
||||
String columnName = column.getColumnName();
|
||||
if (columnName.toUpperCase().endsWith("_ID"))
|
||||
columnName = columnName.substring(0, columnName.length() - 3);
|
||||
|
||||
StringBuilder constraintName = new StringBuilder();
|
||||
constraintName.append(columnName.replace("_", ""));
|
||||
constraintName.append("_");
|
||||
constraintName.append(table.getTableName().replace("_", ""));
|
||||
if (constraintName.length() > 30)
|
||||
constraintName = new StringBuilder(constraintName.substring(0, 30));
|
||||
fkConstraintName = constraintName.toString();
|
||||
}
|
||||
|
||||
StringBuilder fkConstraint = new StringBuilder();
|
||||
fkConstraint.append("CONSTRAINT ").append(fkConstraintName);
|
||||
fkConstraint.append(" FOREIGN KEY (").append(column.getColumnName()).append(") REFERENCES ");
|
||||
fkConstraint.append(primaryKey.getKeyTable()).append("(").append(primaryKey.getKeyColumns()[0]);
|
||||
for (int i = 1; i < primaryKey.getKeyColumns().length; i++)
|
||||
{
|
||||
if (primaryKey.getKeyColumns()[i] == null)
|
||||
break;
|
||||
fkConstraint.append(", ").append(primaryKey.getKeyColumns()[i]);
|
||||
}
|
||||
fkConstraint.append(")");
|
||||
|
||||
if (fkConstraintType.equals(MColumn.FKCONSTRAINTTYPE_NoAction))
|
||||
;
|
||||
else if (fkConstraintType.equals(MColumn.FKCONSTRAINTTYPE_Cascade))
|
||||
fkConstraint.append(" ON DELETE CASCADE");
|
||||
else if (fkConstraintType.equals(MColumn.FKCONSTRAINTTYPE_SetNull))
|
||||
fkConstraint.append(" ON DELETE SET NULL");
|
||||
|
||||
fkConstraint.append(" DEFERRABLE INITIALLY DEFERRED");
|
||||
|
||||
column.setFKConstraintName(fkConstraintName);
|
||||
addLog(column.getAD_Column_ID(), null, null,
|
||||
Msg.getMsg(getCtx(), "CreateForeignKeyProcessColumn") + column.getColumnName()+ " / " +
|
||||
Msg.getMsg(getCtx(), "CreateForeignKeyProcessExists") + dbForeignKey.getKeyName(),
|
||||
column.get_Table_ID(), column.getAD_Column_ID());
|
||||
modified = true;
|
||||
column.setFKConstraintName(dbForeignKey.getKeyName());
|
||||
column.setFKConstraintType(fkConstraintType);
|
||||
column.saveEx();
|
||||
break;
|
||||
}
|
||||
else if (fkConstraintType.equals(MColumn.FKCONSTRAINTTYPE_DoNotCreate))
|
||||
{
|
||||
addLog(column.getAD_Column_ID(), null, null,
|
||||
Msg.getMsg(getCtx(), "CreateForeignKeyProcessColumn") + column.getColumnName()+ " / " +
|
||||
Msg.getMsg(getCtx(), "CreateForeignKeyProcessExists") + dbForeignKey.getKeyName(),
|
||||
column.get_Table_ID(), column.getAD_Column_ID());
|
||||
|
||||
return fkConstraint.toString();
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("ALTER TABLE ").append(table.getTableName());
|
||||
sql.append(" DROP CONSTRAINT ").append(dbForeignKey.getKeyName());
|
||||
|
||||
Trx trx = null;
|
||||
try {
|
||||
trx = Trx.get(Trx.createTrxName("CreateForeignKey"), true);
|
||||
int rvalue = DB.executeUpdate(sql.toString(), (Object[]) null, true, trx.getTrxName());
|
||||
addLog(0, null, new BigDecimal(rvalue), sql.toString());
|
||||
} catch (Exception e) {
|
||||
addLog(Msg.getMsg(getCtx(), "Error") + e.getLocalizedMessage());
|
||||
if (trx != null)
|
||||
trx.rollback();
|
||||
} finally {
|
||||
if (trx != null)
|
||||
trx.close();
|
||||
}
|
||||
|
||||
modified = true;
|
||||
column.setFKConstraintName(dbForeignKey.getKeyName());
|
||||
column.setFKConstraintType(fkConstraintType);
|
||||
column.saveEx();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (modified)
|
||||
return;
|
||||
|
||||
if (!column.isKey() && !column.getColumnName().equals(PO.getUUIDColumnName(table.getTableName())))
|
||||
{
|
||||
String fkConstraint = MColumn.getForeignKeyConstraint(md, table, column);
|
||||
if (fkConstraint != null && fkConstraint.length() > 0)
|
||||
{
|
||||
addLog(column.getAD_Column_ID(), null, null, Msg.getMsg(getCtx(), "CreateForeignKeyProcessColumn") + column.getColumnName(), column.get_Table_ID(), column.getAD_Column_ID());
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("ALTER TABLE ").append(table.getTableName());
|
||||
sql.append(" ADD ");
|
||||
sql.append(fkConstraint);
|
||||
|
||||
Trx trx = null;
|
||||
try {
|
||||
trx = Trx.get(Trx.createTrxName("CreateForeignKey"), true);
|
||||
int rvalue = DB.executeUpdate(sql.toString(), (Object[]) null, true, trx.getTrxName());
|
||||
addLog(0, null, new BigDecimal(rvalue), sql.toString());
|
||||
if (rvalue == -1)
|
||||
++countError;
|
||||
else
|
||||
++countForeignKey;
|
||||
} catch (Exception e) {
|
||||
addLog(Msg.getMsg(getCtx(), "Error") + e.getLocalizedMessage());
|
||||
if (trx != null)
|
||||
trx.rollback();
|
||||
++countError;
|
||||
} finally {
|
||||
if (trx != null)
|
||||
trx.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public static DatabaseKey getPrimaryKey(DatabaseMetaData md, String primaryTableName) throws Exception
|
||||
{
|
||||
DatabaseKey primaryKey = null;
|
||||
|
||||
String catalog = DB.getDatabase().getCatalog();
|
||||
String schema = DB.getDatabase().getSchema();
|
||||
|
||||
String tableName = primaryTableName;
|
||||
if (md.storesUpperCaseIdentifiers())
|
||||
tableName = tableName.toUpperCase();
|
||||
else if (md.storesLowerCaseIdentifiers())
|
||||
tableName = tableName.toLowerCase();
|
||||
|
||||
ResultSet rs = md.getPrimaryKeys(catalog, schema, tableName);
|
||||
while (rs.next())
|
||||
{
|
||||
String primaryKeyName = rs.getString("PK_NAME");
|
||||
if (primaryKeyName == null)
|
||||
continue;
|
||||
|
||||
String primaryKeyTableName = rs.getString("TABLE_NAME");
|
||||
short deleteRule = -1;
|
||||
|
||||
if (primaryKey == null)
|
||||
primaryKey = new DatabaseKey(primaryKeyName, primaryKeyTableName, new String[30], deleteRule);
|
||||
|
||||
String primaryKeyColumn = rs.getString("COLUMN_NAME");
|
||||
int pos = (rs.getShort("KEY_SEQ"));
|
||||
if (pos > 0)
|
||||
primaryKey.getKeyColumns()[pos-1] = primaryKeyColumn;
|
||||
}
|
||||
rs.close();
|
||||
return primaryKey;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1538,26 +1538,88 @@ public class FinReport extends SvrProcess
|
|||
for (int col = 0; col < m_columns.length; col++)
|
||||
{
|
||||
insert.append(", ");
|
||||
// Only relative Period (not calculation or segment value)
|
||||
if (!(m_columns[col].isColumnTypeRelativePeriod()
|
||||
&& m_columns[col].getRelativePeriodAsInt() == 0))
|
||||
// No calculation
|
||||
if (m_columns[col].isColumnTypeCalculation())
|
||||
{
|
||||
insert.append("NULL");
|
||||
insert.append("Cast(NULL AS NUMBER)");
|
||||
continue;
|
||||
}
|
||||
// Amount Type ... Qty
|
||||
|
||||
// SELECT
|
||||
StringBuffer select = new StringBuffer ("SELECT ");
|
||||
if (m_lines[line].getPAAmountType() != null) // line amount type overwrites column
|
||||
insert.append (m_lines[line].getSelectClause (false));
|
||||
select.append (m_lines[line].getSelectClause (false));
|
||||
else if (m_columns[col].getPAAmountType() != null)
|
||||
insert.append (m_columns[col].getSelectClause (false));
|
||||
select.append (m_columns[col].getSelectClause (false));
|
||||
else
|
||||
{
|
||||
insert.append("NULL");
|
||||
insert.append("Cast(NULL AS NUMBER)");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (p_PA_ReportCube_ID > 0) {
|
||||
select.append(" FROM Fact_Acct_Summary fb WHERE ").append(p_AdjPeriodToExclude).append("DateAcct ");
|
||||
} //report cube
|
||||
else {
|
||||
// Get Period info
|
||||
select.append(" FROM Fact_Acct fb WHERE ").append(p_AdjPeriodToExclude).append("TRUNC(DateAcct) ");
|
||||
}
|
||||
FinReportPeriod frp = getPeriod (m_columns[col].getRelativePeriod());
|
||||
if (m_lines[line].getPAPeriodType() != null) // line amount type overwrites column
|
||||
{
|
||||
if (m_lines[line].isPeriod())
|
||||
select.append(frp.getPeriodWhere());
|
||||
else if (m_lines[line].isYear())
|
||||
select.append(frp.getYearWhere());
|
||||
else if (m_lines[line].isNatural())
|
||||
select.append(frp.getNaturalWhere("fb"));
|
||||
else
|
||||
select.append(frp.getTotalWhere());
|
||||
}
|
||||
else if (m_columns[col].getPAPeriodType() != null)
|
||||
{
|
||||
if (m_columns[col].isPeriod())
|
||||
select.append(frp.getPeriodWhere());
|
||||
else if (m_columns[col].isYear())
|
||||
select.append(frp.getYearWhere());
|
||||
else if (m_columns[col].isNatural())
|
||||
select.append(frp.getNaturalWhere("fb"));
|
||||
else
|
||||
select.append(frp.getTotalWhere());
|
||||
}
|
||||
// Link
|
||||
select.append(" AND fb.Fact_Acct_ID=x.Fact_Acct_ID");
|
||||
// PostingType
|
||||
if (!m_lines[line].isPostingType()) // only if not defined on line
|
||||
{
|
||||
String PostingType = m_columns[col].getPostingType();
|
||||
if (PostingType != null && PostingType.length() > 0)
|
||||
select.append(" AND fb.PostingType='").append(PostingType).append("'");
|
||||
// globalqss - CarlosRuiz
|
||||
if (MReportColumn.POSTINGTYPE_Budget.equals(PostingType)) {
|
||||
if (m_columns[col].getGL_Budget_ID() > 0)
|
||||
select.append(" AND GL_Budget_ID=" + m_columns[col].getGL_Budget_ID());
|
||||
}
|
||||
// end globalqss
|
||||
}
|
||||
// Report Where
|
||||
String s = m_report.getWhereClause();
|
||||
if (s != null && s.length() > 0)
|
||||
select.append(" AND ").append(s);
|
||||
// Limited Segment Values
|
||||
if (m_columns[col].isColumnTypeSegmentValue())
|
||||
select.append(m_columns[col].getWhereClause(p_PA_Hierarchy_ID));
|
||||
|
||||
// Parameter Where
|
||||
select.append(m_parameterWhere);
|
||||
if (log.isLoggable(Level.FINEST))
|
||||
log.finest("Col=" + col + ", Line=" + line + ": " + select);
|
||||
//
|
||||
insert.append("(").append(select).append(")");
|
||||
}
|
||||
|
||||
//
|
||||
insert.append(" FROM Fact_Acct WHERE ")
|
||||
insert.append(" FROM Fact_Acct x WHERE ")
|
||||
.append(m_lines[line].getWhereClause(p_PA_Hierarchy_ID)); // (sources, posting type)
|
||||
// Report Where
|
||||
String s = m_report.getWhereClause();
|
||||
|
@ -1570,24 +1632,6 @@ public class FinReport extends SvrProcess
|
|||
whereClause = whereClause.replaceAll(" AND PA_ReportCube_ID=" + p_PA_ReportCube_ID, "");
|
||||
insert.append(whereClause); // IDEMPIERE-130
|
||||
|
||||
// Period restriction
|
||||
FinReportPeriod frp = getPeriod (0);
|
||||
insert.append(" AND TRUNC(DateAcct) ")
|
||||
.append(frp.getPeriodWhere());
|
||||
// PostingType ??
|
||||
// if (!m_lines[line].isPostingType()) // only if not defined on line
|
||||
// {
|
||||
// String PostingType = m_columns[col].getPostingType();
|
||||
// if (PostingType != null && PostingType.length() > 0)
|
||||
// insert.append(" AND PostingType='").append(PostingType).append("'");
|
||||
// // globalqss - CarlosRuiz
|
||||
// if (PostingType.equals(MReportColumn.POSTINGTYPE_Budget)) {
|
||||
// if (m_columns[col].getGL_Budget_ID() > 0)
|
||||
// select.append(" AND GL_Budget_ID=" + m_columns[col].getGL_Budget_ID());
|
||||
// }
|
||||
// // end globalqss
|
||||
// }
|
||||
|
||||
int no = DB.executeUpdate(insert.toString(), get_TrxName());
|
||||
if (log.isLoggable(Level.FINEST)) log.finest("Trx #=" + no + " - " + insert);
|
||||
if (no == 0)
|
||||
|
|
|
@ -526,7 +526,7 @@ public final class DB
|
|||
{
|
||||
if (s_cc != null)
|
||||
return s_cc.isPostgreSQL();
|
||||
log.severe("No Database");
|
||||
log.severe("No Database");
|
||||
return false;
|
||||
} // isPostgreSQL
|
||||
//begin vpj-cd e-evolution 02/07/2005 PostgreSQL
|
||||
|
@ -2415,7 +2415,14 @@ public final class DB
|
|||
ResultSet rs = null;
|
||||
try {
|
||||
DatabaseMetaData metadata = conn.getMetaData();
|
||||
rs = metadata.getTables(null, null, (DB.isPostgreSQL() ? tableName.toLowerCase() : tableName.toUpperCase()), null);
|
||||
String tblName;
|
||||
if (metadata.storesUpperCaseIdentifiers())
|
||||
tblName = tableName.toUpperCase();
|
||||
else if (metadata.storesLowerCaseIdentifiers())
|
||||
tblName = tableName.toLowerCase();
|
||||
else
|
||||
tblName = tableName;
|
||||
rs = metadata.getTables(null, null, tblName, null);
|
||||
if (rs.next()) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ import java.util.logging.Level;
|
|||
|
||||
import javax.xml.transform.sax.TransformerHandler;
|
||||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.adempiere.pipo2.AbstractElementHandler;
|
||||
import org.adempiere.pipo2.Element;
|
||||
import org.adempiere.pipo2.PIPOContext;
|
||||
|
@ -81,6 +80,7 @@ public class ColumnElementHandler extends AbstractElementHandler {
|
|||
if (!mColumn.is_new() && !mColumn.is_Changed()) {
|
||||
boolean syncDatabase = "Y".equalsIgnoreCase(getStringValue(element, "IsSyncDatabase"));
|
||||
if (syncDatabase) {
|
||||
deferFK(element, mColumn);
|
||||
syncColumn(ctx, mColumn, "Sync", false);
|
||||
}
|
||||
return;
|
||||
|
@ -111,10 +111,12 @@ public class ColumnElementHandler extends AbstractElementHandler {
|
|||
}
|
||||
|
||||
boolean recreateColumn = (mColumn.is_new()
|
||||
|| mColumn.is_ValueChanged("AD_Reference_ID")
|
||||
|| mColumn.is_ValueChanged("FieldLength")
|
||||
|| mColumn.is_ValueChanged("ColumnName") || mColumn
|
||||
.is_ValueChanged("IsMandatory"));
|
||||
|| mColumn.is_ValueChanged(X_AD_Column.COLUMNNAME_AD_Reference_ID)
|
||||
|| mColumn.is_ValueChanged(X_AD_Column.COLUMNNAME_FieldLength)
|
||||
|| mColumn.is_ValueChanged(X_AD_Column.COLUMNNAME_ColumnName)
|
||||
|| mColumn.is_ValueChanged(X_AD_Column.COLUMNNAME_FKConstraintName)
|
||||
|| mColumn.is_ValueChanged(X_AD_Column.COLUMNNAME_FKConstraintType)
|
||||
|| mColumn.is_ValueChanged(X_AD_Column.COLUMNNAME_IsMandatory));
|
||||
|
||||
//ignore fieldlength change for clob and lob
|
||||
if (!mColumn.is_ValueChanged("AD_Reference_ID") && mColumn.is_ValueChanged("FieldLength")) {
|
||||
|
@ -161,6 +163,7 @@ public class ColumnElementHandler extends AbstractElementHandler {
|
|||
}
|
||||
|
||||
if (recreateColumn || syncDatabase) {
|
||||
deferFK(element, mColumn);
|
||||
syncColumn(ctx, mColumn, action, recreateColumn);
|
||||
}
|
||||
} else {
|
||||
|
@ -168,6 +171,12 @@ public class ColumnElementHandler extends AbstractElementHandler {
|
|||
}
|
||||
}
|
||||
|
||||
private void deferFK(Element element, MColumn mColumn) {
|
||||
String foreignTable = mColumn.getReferenceTableName();
|
||||
if (foreignTable != null && ! "AD_Ref_List".equals(foreignTable))
|
||||
element.deferFKColumnID = mColumn.getAD_Column_ID();
|
||||
}
|
||||
|
||||
private void syncColumn(PIPOContext ctx, MColumn mColumn, String action,
|
||||
boolean recreateColumn) throws SAXException {
|
||||
int success = 0;
|
||||
|
@ -216,10 +225,10 @@ public class ColumnElementHandler extends AbstractElementHandler {
|
|||
String schema = DB.getDatabase().getSchema();
|
||||
String tableName = table.getTableName();
|
||||
String columnName = column.getColumnName();
|
||||
if (DB.isOracle()) {
|
||||
if (md.storesUpperCaseIdentifiers()) {
|
||||
tableName = tableName.toUpperCase();
|
||||
columnName = columnName.toUpperCase();
|
||||
} else if (DB.isPostgreSQL()) {
|
||||
} else if (md.storesLowerCaseIdentifiers()) {
|
||||
tableName = tableName.toLowerCase();
|
||||
columnName = columnName.toLowerCase();
|
||||
}
|
||||
|
@ -229,18 +238,6 @@ public class ColumnElementHandler extends AbstractElementHandler {
|
|||
if (!rst.next()) {
|
||||
// table doesn't exist
|
||||
sql = table.getSQLCreate();
|
||||
MColumn[] cols = table.getColumns(false);
|
||||
for (MColumn col : cols)
|
||||
{
|
||||
String fkConstraintSql;
|
||||
try {
|
||||
fkConstraintSql = MColumn.getForeignKeyConstraintSql(md, catalog, schema, tableName, table, col);
|
||||
} catch (Exception e) {
|
||||
throw new AdempiereException(e);
|
||||
}
|
||||
if (fkConstraintSql != null && fkConstraintSql.length() > 0)
|
||||
sql += fkConstraintSql;
|
||||
}
|
||||
} else {
|
||||
//
|
||||
rsc = md.getColumns(catalog, schema, tableName, columnName);
|
||||
|
@ -256,14 +253,6 @@ public class ColumnElementHandler extends AbstractElementHandler {
|
|||
// No existing column
|
||||
sql = column.getSQLAdd(table);
|
||||
}
|
||||
String fkConstraintSql;
|
||||
try {
|
||||
fkConstraintSql = MColumn.getForeignKeyConstraintSql(md, catalog, schema, tableName, table, column);
|
||||
} catch (Exception e) {
|
||||
throw new AdempiereException(e);
|
||||
}
|
||||
if (fkConstraintSql != null && fkConstraintSql.length() > 0)
|
||||
sql += fkConstraintSql;
|
||||
}
|
||||
|
||||
//execute modify or add if needed
|
||||
|
|
|
@ -72,6 +72,7 @@ public class FormElementHandler extends AbstractElementHandler {
|
|||
if (mForm.save(getTrxName(ctx)) == true){
|
||||
logImportDetail (ctx, impDetail, 1, mForm.getName(), mForm.get_ID(), action);
|
||||
element.recordId = mForm.get_ID();
|
||||
element.requireRoleAccessUpdate = true;
|
||||
}
|
||||
else{
|
||||
logImportDetail (ctx, impDetail, 0, mForm.getName(), mForm.get_ID(), action);
|
||||
|
|
|
@ -36,6 +36,12 @@ import org.adempiere.pipo2.PackOut;
|
|||
import org.adempiere.pipo2.PackoutItem;
|
||||
import org.adempiere.pipo2.PoExporter;
|
||||
import org.adempiere.pipo2.PoFiller;
|
||||
import org.compiere.model.I_AD_Form;
|
||||
import org.compiere.model.I_AD_InfoWindow;
|
||||
import org.compiere.model.I_AD_Process;
|
||||
import org.compiere.model.I_AD_Role;
|
||||
import org.compiere.model.I_AD_Window;
|
||||
import org.compiere.model.I_C_DocType;
|
||||
import org.compiere.model.MColumn;
|
||||
import org.compiere.model.MRole;
|
||||
import org.compiere.model.MTable;
|
||||
|
@ -91,6 +97,13 @@ public class GenericPOElementHandler extends AbstractElementHandler {
|
|||
}
|
||||
po.saveEx();
|
||||
element.recordId = po.get_ID();
|
||||
if ( I_AD_Window.Table_Name.equals(tableName)
|
||||
|| I_AD_Process.Table_Name.equals(tableName)
|
||||
|| I_AD_Role.Table_Name.equals(tableName)
|
||||
|| I_AD_Form.Table_Name.equals(tableName)
|
||||
|| I_C_DocType.Table_Name.equals(tableName)
|
||||
|| I_AD_InfoWindow.Table_Name.equals(tableName))
|
||||
element.requireRoleAccessUpdate = true;
|
||||
}
|
||||
|
||||
public void endElement(PIPOContext ctx, Element element) throws SAXException {
|
||||
|
|
|
@ -85,6 +85,7 @@ public class ProcessElementHandler extends AbstractElementHandler {
|
|||
logImportDetail(ctx, impDetail, 1, mProcess.getName(), mProcess
|
||||
.get_ID(), action);
|
||||
element.recordId = mProcess.get_ID();
|
||||
element.requireRoleAccessUpdate = true;
|
||||
} else {
|
||||
logImportDetail(ctx, impDetail, 0, mProcess.getName(), mProcess
|
||||
.get_ID(), action);
|
||||
|
|
|
@ -87,6 +87,7 @@ public class RoleElementHandler extends AbstractElementHandler {
|
|||
element.recordId = mRole.getAD_Role_ID();
|
||||
logImportDetail(ctx, impDetail, 1, mRole.getName(), mRole.get_ID(),
|
||||
action);
|
||||
element.requireRoleAccessUpdate = true;
|
||||
} else {
|
||||
|
||||
logImportDetail(ctx, impDetail, 0, mRole.getName(), mRole.get_ID(),
|
||||
|
|
|
@ -94,6 +94,7 @@ public class WindowElementHandler extends AbstractElementHandler {
|
|||
.get_ID(), action);
|
||||
windows.add(mWindow.getAD_Window_ID());
|
||||
element.recordId = mWindow.get_ID();
|
||||
element.requireRoleAccessUpdate = true;
|
||||
} else {
|
||||
logImportDetail(ctx, impDetail, 0, mWindow.getName(), mWindow
|
||||
.get_ID(), action);
|
||||
|
|
|
@ -91,6 +91,7 @@ public class WorkflowElementHandler extends AbstractElementHandler {
|
|||
.get_ID(), action);
|
||||
workflows.add(mWorkflow.getAD_Workflow_ID());
|
||||
element.recordId = mWorkflow.get_ID();
|
||||
element.requireRoleAccessUpdate = true;
|
||||
} else {
|
||||
log.info("m_Workflow save failure");
|
||||
logImportDetail(ctx, impDetail, 0, mWorkflow.getName(), mWorkflow
|
||||
|
@ -131,6 +132,7 @@ public class WorkflowElementHandler extends AbstractElementHandler {
|
|||
.get_ID(), "Update");
|
||||
workflows.add(m_Workflow.getAD_Workflow_ID());
|
||||
element.recordId = m_Workflow.getAD_Workflow_ID();
|
||||
element.requireRoleAccessUpdate = true;
|
||||
} else {
|
||||
log.info("m_Workflow update fail");
|
||||
logImportDetail(ctx, impDetail, 0, m_Workflow.getName(), m_Workflow
|
||||
|
|
|
@ -111,7 +111,7 @@ public abstract class AbstractElementHandler implements ElementHandler {
|
|||
detail.setName(objectName);
|
||||
detail.setAction(objectStatus);
|
||||
detail.setSuccess(result);
|
||||
detail.setAD_Original_ID(objectID);
|
||||
detail.setRecord_ID(objectID);
|
||||
detail.setAD_Backup_ID(objectIDBackup);
|
||||
detail.setTableName(tableName);
|
||||
detail.setAD_Table_ID(AD_Table_ID);
|
||||
|
|
|
@ -309,10 +309,10 @@ public class ColumnElementHandler extends AbstractElementHandler {
|
|||
String schema = DB.getDatabase().getSchema();
|
||||
String tableName = table.getTableName();
|
||||
String columnName = column.getColumnName();
|
||||
if (DB.isOracle()) {
|
||||
if (md.storesUpperCaseIdentifiers()) {
|
||||
tableName = tableName.toUpperCase();
|
||||
columnName = columnName.toUpperCase();
|
||||
} else if (DB.isPostgreSQL()) {
|
||||
} else if (md.storesLowerCaseIdentifiers()) {
|
||||
tableName = tableName.toLowerCase();
|
||||
columnName = columnName.toLowerCase();
|
||||
}
|
||||
|
|
|
@ -13,11 +13,15 @@ package org.adempiere.pipo.srv;
|
|||
|
||||
import java.io.File;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.concurrent.Semaphore;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.base.IDictionaryService;
|
||||
import org.adempiere.pipo2.PackIn;
|
||||
import org.adempiere.pipo2.Zipper;
|
||||
import org.compiere.model.MAttachment;
|
||||
import org.compiere.model.MSysConfig;
|
||||
import org.compiere.model.X_AD_Package_Imp_Proc;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.Env;
|
||||
|
@ -28,15 +32,31 @@ public class PipoDictionaryService implements IDictionaryService {
|
|||
|
||||
CLogger logger = CLogger.getCLogger(PipoDictionaryService.class.getName());
|
||||
|
||||
private final Semaphore semaphore;
|
||||
|
||||
public PipoDictionaryService() {
|
||||
super();
|
||||
semaphore = new Semaphore(1, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void merge(BundleContext context, File packageFile) throws Exception {
|
||||
if (packageFile == null || !packageFile.exists()) {
|
||||
logger.info("No PackIn Model found");
|
||||
return;
|
||||
}
|
||||
String trxName = Trx.createTrxName();
|
||||
String trxName = null;
|
||||
X_AD_Package_Imp_Proc adPackageImp = null;
|
||||
PackIn packIn = null;
|
||||
try {
|
||||
PackIn packIn = new PackIn();
|
||||
try {
|
||||
semaphore.tryAcquire(120, TimeUnit.SECONDS);
|
||||
} catch (InterruptedException e) {
|
||||
semaphore.release();
|
||||
semaphore.acquire();
|
||||
}
|
||||
trxName = Trx.createTrxName("PipoDS");
|
||||
packIn = new PackIn();
|
||||
packIn.setPackageName(context.getBundle().getSymbolicName());
|
||||
|
||||
//get package version from file name suffix or bundle header
|
||||
|
@ -59,13 +79,11 @@ public class PipoDictionaryService implements IDictionaryService {
|
|||
packIn.setPackageVersion(packageVersion);
|
||||
packIn.setUpdateDictionary(false);
|
||||
|
||||
X_AD_Package_Imp_Proc adPackageImp = new X_AD_Package_Imp_Proc(Env.getCtx(),
|
||||
0, trxName);
|
||||
File zipFilepath = packageFile;
|
||||
if (logger.isLoggable(Level.INFO)) logger.info("zipFilepath->" + zipFilepath);
|
||||
String parentDir = Zipper.getParentDir(zipFilepath);
|
||||
adPackageImp = new X_AD_Package_Imp_Proc(Env.getCtx(), 0, null);
|
||||
if (logger.isLoggable(Level.INFO)) logger.info("zipFilepath->" + packageFile);
|
||||
String parentDir = Zipper.getParentDir(packageFile);
|
||||
File targetDir = new File(System.getProperty("java.io.tmpdir"));
|
||||
Zipper.unpackFile(zipFilepath, targetDir);
|
||||
Zipper.unpackFile(packageFile, targetDir);
|
||||
|
||||
String dict_file = targetDir + File.separator + parentDir + File.separator
|
||||
+ "dict" + File.separator + "PackOut.xml";
|
||||
|
@ -73,22 +91,37 @@ public class PipoDictionaryService implements IDictionaryService {
|
|||
packIn.setPackageDirectory(targetDir + File.separator + parentDir);
|
||||
|
||||
if (logger.isLoggable(Level.INFO)) logger.info("dict file->" + dict_file);
|
||||
adPackageImp.setName(packIn.getPackageName());
|
||||
adPackageImp.setAD_Package_Source_Type("File");
|
||||
packIn.setAD_Package_Imp_Proc(adPackageImp);
|
||||
|
||||
// call XML Handler
|
||||
String msg = packIn.importXML(dict_file, Env.getCtx(), trxName);
|
||||
adPackageImp.setName(packIn.getPackageName());
|
||||
adPackageImp.setDateProcessed(new Timestamp(System.currentTimeMillis()));
|
||||
adPackageImp.setP_Msg(msg);
|
||||
adPackageImp.setAD_Package_Source_Type("File");
|
||||
adPackageImp.saveEx();
|
||||
|
||||
Trx.get(trxName, false).commit();
|
||||
if (logger.isLoggable(Level.INFO)) logger.info("commit " + trxName);
|
||||
} catch (Exception e) {
|
||||
adPackageImp.setP_Msg(e.getLocalizedMessage());
|
||||
logger.log(Level.SEVERE, "importXML:", e);
|
||||
throw e;
|
||||
} finally {
|
||||
Trx.get(trxName, false).close();
|
||||
try {
|
||||
Trx.get(trxName, false).close();
|
||||
} catch (Exception e) {}
|
||||
semaphore.release();
|
||||
adPackageImp.save(); // ignoring exceptions
|
||||
|
||||
if (adPackageImp != null && packIn != null) {
|
||||
// Add the attachment to the packin for possible reprocessing
|
||||
if (MSysConfig.getBooleanValue(MSysConfig.ATTACH_EMBEDDED_2PACK, true) || ! packIn.isSuccess()) {
|
||||
// TODO: This sometimes fails with error No archive storage provider found - because the IAttachmentStore required is still not loaded
|
||||
MAttachment attachment = new MAttachment (adPackageImp.getCtx(), X_AD_Package_Imp_Proc.Table_ID, adPackageImp.getAD_Package_Imp_Proc_ID(), null);
|
||||
attachment.addEntry(packageFile);
|
||||
attachment.save(); // ignoring exceptions
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ public abstract class AbstractElementHandler implements ElementHandler {
|
|||
impDetail.setType(type);
|
||||
impDetail.setName("");
|
||||
impDetail.setAction("");
|
||||
impDetail.setAD_Original_ID(1);
|
||||
impDetail.setRecord_ID(1);
|
||||
impDetail.setTableName(tableName);
|
||||
impDetail.setAD_Table_ID(tableId);
|
||||
impDetail.saveEx(getTrxName(ctx));
|
||||
|
@ -98,7 +98,7 @@ public abstract class AbstractElementHandler implements ElementHandler {
|
|||
detail.setName(objectName);
|
||||
detail.setAction(action);
|
||||
detail.setSuccess(result);
|
||||
detail.setAD_Original_ID(objectID);
|
||||
detail.setRecord_ID(objectID);
|
||||
ctx.packIn.addImportDetail(detail);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,8 @@ public class Element {
|
|||
public Attributes attributes;
|
||||
//defer for later reprocessing
|
||||
public boolean defer = false;
|
||||
//defer for post packin foreign key processing
|
||||
public int deferFKColumnID = 0;
|
||||
//parent element
|
||||
public Element parent;
|
||||
//resolved db recordid, store for reference by child element
|
||||
|
@ -50,6 +52,8 @@ public class Element {
|
|||
|
||||
public boolean deferEnd = false;
|
||||
|
||||
public boolean requireRoleAccessUpdate = false;
|
||||
|
||||
public Map<String, Element> properties = new LinkedHashMap<String, Element>();
|
||||
|
||||
public List<Element> childrens = new ArrayList<Element>();
|
||||
|
|
|
@ -40,6 +40,7 @@ import javax.xml.parsers.SAXParserFactory;
|
|||
import org.compiere.model.MSysConfig;
|
||||
import org.compiere.model.PO;
|
||||
import org.compiere.model.X_AD_Package_Imp_Detail;
|
||||
import org.compiere.model.X_AD_Package_Imp_Proc;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.Trx;
|
||||
|
||||
|
@ -60,8 +61,10 @@ public class PackIn {
|
|||
private Map<String,Integer> columnCache = new HashMap<String,Integer>();
|
||||
private String packageName = null;
|
||||
private String packageVersion = null;
|
||||
private X_AD_Package_Imp_Proc packinProc;
|
||||
|
||||
private List<X_AD_Package_Imp_Detail> importDetails;
|
||||
private boolean success = false;
|
||||
|
||||
public PackIn() {
|
||||
super();
|
||||
|
@ -284,4 +287,23 @@ public class PackIn {
|
|||
public void setPackageVersion(String packageVersion) {
|
||||
this.packageVersion = packageVersion;
|
||||
}
|
||||
|
||||
public X_AD_Package_Imp_Proc getAD_Package_Imp_Proc() {
|
||||
if (packinProc.getAD_Package_Imp_Proc_ID() == 0)
|
||||
packinProc.saveEx(); // we need the ID to set
|
||||
return packinProc;
|
||||
}
|
||||
|
||||
public void setAD_Package_Imp_Proc(X_AD_Package_Imp_Proc packinProc) {
|
||||
this.packinProc = packinProc;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
} // PackIn
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
|
||||
package org.adempiere.pipo2;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DatabaseMetaData;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
|
@ -27,13 +29,19 @@ import java.util.Set;
|
|||
import java.util.Stack;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.adempiere.pipo2.exception.DatabaseAccessException;
|
||||
import org.compiere.model.MColumn;
|
||||
import org.compiere.model.MRole;
|
||||
import org.compiere.model.MTable;
|
||||
import org.compiere.model.Query;
|
||||
import org.compiere.model.X_AD_Package_Imp;
|
||||
import org.compiere.model.X_AD_Package_Imp_Inst;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Trx;
|
||||
import org.compiere.util.Util;
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.helpers.AttributesImpl;
|
||||
|
@ -68,9 +76,11 @@ public class PackInHandler extends DefaultHandler {
|
|||
|
||||
private IHandlerRegistry handlerRegistry = null;
|
||||
private List<DeferEntry> defer = new ArrayList<DeferEntry>();
|
||||
private List<Integer> deferFK = new ArrayList<Integer>();
|
||||
private Stack<Element> stack = new Stack<Element>();
|
||||
private PackIn packIn;
|
||||
private int elementProcessed = 0;
|
||||
private boolean isUpdateRoleAccess = false;
|
||||
|
||||
private void init() throws SAXException {
|
||||
|
||||
|
@ -168,6 +178,7 @@ public class PackInHandler extends DefaultHandler {
|
|||
packageImp.setCreator(atts.getValue("Creator"));
|
||||
packageImp.setCreatorContact(atts.getValue("CreatorContact"));
|
||||
packageImp.setPK_Status(packageStatus);
|
||||
packageImp.setAD_Package_Imp_Proc_ID(packIn.getAD_Package_Imp_Proc().getAD_Package_Imp_Proc_ID());
|
||||
|
||||
packageImp.saveEx();
|
||||
AD_Package_Imp_ID = packageImp.getAD_Package_Imp_ID();
|
||||
|
@ -228,6 +239,14 @@ public class PackInHandler extends DefaultHandler {
|
|||
{
|
||||
defer.add(new DeferEntry(element, true));
|
||||
}
|
||||
if (element.deferFKColumnID > 0)
|
||||
{
|
||||
if (! deferFK.contains(element.deferFKColumnID))
|
||||
deferFK.add(element.deferFKColumnID);
|
||||
}
|
||||
if (element.requireRoleAccessUpdate) {
|
||||
isUpdateRoleAccess = true;
|
||||
}
|
||||
|
||||
for (Element childElement : element.childrens)
|
||||
{
|
||||
|
@ -278,13 +297,25 @@ public class PackInHandler extends DefaultHandler {
|
|||
else
|
||||
elementValue = uri + localName;
|
||||
|
||||
X_AD_Package_Imp packageImp = new X_AD_Package_Imp(m_ctx.ctx, AD_Package_Imp_ID, null);
|
||||
packageImp.setProcessed(true);
|
||||
if (elementValue.equals("idempiere")){
|
||||
processDeferElements();
|
||||
if (!packageStatus.equals("Completed with errors"))
|
||||
packageStatus = "Completed successfully";
|
||||
|
||||
processDeferFKElements();
|
||||
|
||||
updateRoleAccess();
|
||||
|
||||
if (!packageStatus.equals("Completed with errors")) {
|
||||
if (getUnresolvedCount() > 0) {
|
||||
packageStatus = "Completed - unresolved";
|
||||
} else {
|
||||
packageStatus = "Completed successfully";
|
||||
packIn.setSuccess(true);
|
||||
}
|
||||
}
|
||||
|
||||
//Update package history log with package status
|
||||
X_AD_Package_Imp packageImp = new X_AD_Package_Imp(m_ctx.ctx, AD_Package_Imp_ID, null);
|
||||
packageImp.setPK_Status(packageStatus);
|
||||
packageImp.saveEx();
|
||||
|
||||
|
@ -304,14 +335,12 @@ public class PackInHandler extends DefaultHandler {
|
|||
} catch (RuntimeException re) {
|
||||
packageStatus = "Import Failed";
|
||||
//Update package history log with package status
|
||||
X_AD_Package_Imp packageImp = new X_AD_Package_Imp(m_ctx.ctx, AD_Package_Imp_ID, null);
|
||||
packageImp.setPK_Status(packageStatus);
|
||||
packageImp.saveEx();
|
||||
throw re;
|
||||
} catch (SAXException se) {
|
||||
packageStatus = "Import Failed";
|
||||
//Update package history log with package status
|
||||
X_AD_Package_Imp packageImp = new X_AD_Package_Imp(m_ctx.ctx, AD_Package_Imp_ID, null);
|
||||
packageImp.setPK_Status(packageStatus);
|
||||
packageImp.saveEx();
|
||||
throw se;
|
||||
|
@ -368,6 +397,40 @@ public class PackInHandler extends DefaultHandler {
|
|||
} while (defer.size() > 0);
|
||||
}
|
||||
|
||||
private void processDeferFKElements() throws SAXException {
|
||||
|
||||
if (deferFK.isEmpty())
|
||||
return;
|
||||
|
||||
for (int columnID : deferFK) {
|
||||
MColumn column = new MColumn(m_ctx.ctx, columnID, m_ctx.trx.getTrxName());
|
||||
try {
|
||||
Connection conn = m_ctx.trx.getConnection();
|
||||
DatabaseMetaData md = conn.getMetaData();
|
||||
String catalog = DB.getDatabase().getCatalog();
|
||||
String schema = DB.getDatabase().getSchema();
|
||||
MTable table = MTable.get(m_ctx.ctx, column.getAD_Table_ID());
|
||||
String tableName = table.getTableName();
|
||||
|
||||
String fkConstraintSql = MColumn.getForeignKeyConstraintSql(md, catalog, schema, tableName, table, column, false);
|
||||
if (! Util.isEmpty(fkConstraintSql)) {
|
||||
if (fkConstraintSql.indexOf(DB.SQLSTATEMENT_SEPARATOR) == -1) {
|
||||
DB.executeUpdate(fkConstraintSql, false, m_ctx.trx.getTrxName());
|
||||
} else {
|
||||
String statements[] = fkConstraintSql.split(DB.SQLSTATEMENT_SEPARATOR);
|
||||
for (int i = 0; i < statements.length; i++) {
|
||||
if (Util.isEmpty(statements[i]))
|
||||
continue;
|
||||
DB.executeUpdateEx(statements[i], m_ctx.trx.getTrxName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new AdempiereException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setCtx(PIPOContext ctx) {
|
||||
m_ctx = ctx;
|
||||
}
|
||||
|
@ -438,4 +501,18 @@ public class PackInHandler extends DefaultHandler {
|
|||
startElement = b;
|
||||
}
|
||||
}
|
||||
|
||||
private void updateRoleAccess() {
|
||||
if (!isUpdateRoleAccess)
|
||||
return;
|
||||
|
||||
List<MRole> roles = new Query(m_ctx.ctx, MRole.Table_Name, "IsManual='N'", m_ctx.trx.getTrxName())
|
||||
.setOnlyActiveRecords(true)
|
||||
.setOrderBy("AD_Client_ID, Name")
|
||||
.list();
|
||||
for (MRole role : roles) {
|
||||
role.updateAccessRecords(false);
|
||||
}
|
||||
}
|
||||
|
||||
} // PackInHandler
|
||||
|
|
|
@ -134,6 +134,7 @@ public class PackInProcess extends SvrProcess {
|
|||
packIn.setPackageName(packageName);
|
||||
packIn.setPackageVersion(packageVersion);
|
||||
packIn.setUpdateDictionary(m_UpdateDictionary);
|
||||
packIn.setAD_Package_Imp_Proc(adPackageImp);
|
||||
|
||||
// call XML Handler
|
||||
String msg = packIn.importXML(dict_file, getCtx(), get_TrxName());
|
||||
|
|
|
@ -102,7 +102,7 @@ public class PackRollProcess extends SvrProcess {
|
|||
|
||||
String tableName = packageImpDetail.getTableName();
|
||||
|
||||
int recordID = packageImpDetail.getAD_Original_ID();
|
||||
int recordID = packageImpDetail.getRecord_ID();
|
||||
|
||||
// determine if record is an update to the original
|
||||
// if record is an update then update record with backup
|
||||
|
|
|
@ -16,7 +16,6 @@ import org.compiere.model.ServerStateChangeListener;
|
|||
import org.compiere.model.X_AD_Package_Imp;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Trx;
|
||||
import org.osgi.framework.BundleActivator;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.ServiceReference;
|
||||
|
@ -53,9 +52,6 @@ public class AdempiereActivator implements BundleActivator, ServiceTrackerCustom
|
|||
}
|
||||
|
||||
private void installPackage() {
|
||||
String trxName = Trx.createTrxName();
|
||||
try {
|
||||
|
||||
// e.g. 1.0.0.qualifier, check only the "1.0.0" part
|
||||
String version = getVersion();
|
||||
if (version != null)
|
||||
|
@ -86,22 +82,16 @@ public class AdempiereActivator implements BundleActivator, ServiceTrackerCustom
|
|||
X_AD_Package_Imp pkg = q.first();
|
||||
if (pkg == null) {
|
||||
System.out.println("Installing " + getName() + " " + version + " ...");
|
||||
packIn(trxName);
|
||||
packIn();
|
||||
install();
|
||||
System.out.println(getName() + " " + version + " installed.");
|
||||
} else {
|
||||
if (logger.isLoggable(Level.INFO)) logger.info(getName() + " " + version + " was installed: "
|
||||
+ pkg.getCreated());
|
||||
}
|
||||
Trx.get(trxName, false).commit();
|
||||
} finally {
|
||||
if (Trx.get(trxName, false) != null) {
|
||||
Trx.get(trxName, false).close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void packIn(String trxName) {
|
||||
protected void packIn() {
|
||||
URL packout = context.getBundle().getEntry("/META-INF/2Pack.zip");
|
||||
if (packout != null && service != null) {
|
||||
FileOutputStream zipstream = null;
|
||||
|
|
|
@ -34,7 +34,6 @@ import org.compiere.model.ServerStateChangeListener;
|
|||
import org.compiere.model.X_AD_Package_Imp;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Trx;
|
||||
import org.compiere.util.Util;
|
||||
import org.osgi.framework.BundleActivator;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
@ -88,8 +87,6 @@ public class Incremental2PackActivator implements BundleActivator, ServiceTracke
|
|||
}
|
||||
|
||||
private void installPackage() {
|
||||
String trxName = Trx.createTrxName();
|
||||
try {
|
||||
// e.g. 1.0.0.qualifier, check only the "1.0.0" part
|
||||
String bundleVersionPart = getVersion();
|
||||
String installedVersionPart = null;
|
||||
|
@ -120,14 +117,8 @@ public class Incremental2PackActivator implements BundleActivator, ServiceTracke
|
|||
}
|
||||
}
|
||||
}
|
||||
packIn(trxName, installedVersionPart, bundleVersionPart);
|
||||
packIn(installedVersionPart, bundleVersionPart);
|
||||
afterPackIn();
|
||||
Trx.get(trxName, false).commit();
|
||||
} finally {
|
||||
if (Trx.get(trxName, false) != null) {
|
||||
Trx.get(trxName, false).close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static class TwoPackEntry {
|
||||
|
@ -139,7 +130,7 @@ public class Incremental2PackActivator implements BundleActivator, ServiceTracke
|
|||
}
|
||||
}
|
||||
|
||||
protected void packIn(String trxName, String installedVersionPart, String bundleVersionPart) {
|
||||
protected void packIn(String installedVersionPart, String bundleVersionPart) {
|
||||
List<TwoPackEntry> list = new ArrayList<TwoPackEntry>();
|
||||
|
||||
//2Pack_1.0.0.zip, 2Pack_1.0.1.zip, etc
|
||||
|
@ -172,7 +163,7 @@ public class Incremental2PackActivator implements BundleActivator, ServiceTracke
|
|||
});
|
||||
|
||||
for(TwoPackEntry entry : list) {
|
||||
packIn(trxName, entry.url);
|
||||
packIn(entry.url);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -184,7 +175,7 @@ public class Incremental2PackActivator implements BundleActivator, ServiceTracke
|
|||
return v;
|
||||
}
|
||||
|
||||
protected void packIn(String trxName, URL packout) {
|
||||
protected void packIn(URL packout) {
|
||||
if (packout != null && service != null) {
|
||||
String path = packout.getPath();
|
||||
String suffix = path.substring(path.lastIndexOf("_"));
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package org.adempiere.webui;
|
||||
|
||||
import java.util.Hashtable;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.ServletContextEvent;
|
||||
import javax.servlet.ServletContextListener;
|
||||
|
@ -11,12 +10,9 @@ import javax.servlet.http.HttpSessionListener;
|
|||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.compiere.Adempiere;
|
||||
import org.compiere.model.MSession;
|
||||
import org.compiere.model.Query;
|
||||
import org.compiere.model.ServerStateChangeEvent;
|
||||
import org.compiere.model.ServerStateChangeListener;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.WebUtil;
|
||||
|
||||
public class LoggedSessionListener implements HttpSessionListener, ServletContextListener, ServerStateChangeListener{
|
||||
|
|
|
@ -52,6 +52,7 @@ import org.adempiere.webui.component.ProcessInfoDialog;
|
|||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.component.ZkCssHelper;
|
||||
import org.adempiere.webui.editor.IProcessButton;
|
||||
import org.adempiere.webui.editor.WButtonEditor;
|
||||
import org.adempiere.webui.editor.WEditor;
|
||||
import org.adempiere.webui.event.ActionEvent;
|
||||
import org.adempiere.webui.event.ActionListener;
|
||||
|
@ -89,6 +90,7 @@ import org.compiere.model.MQuery;
|
|||
import org.compiere.model.MRecentItem;
|
||||
import org.compiere.model.MRole;
|
||||
import org.compiere.model.MWindow;
|
||||
import org.compiere.model.PO;
|
||||
import org.compiere.model.X_AD_CtxHelp;
|
||||
import org.compiere.process.DocAction;
|
||||
import org.compiere.process.ProcessInfo;
|
||||
|
@ -1308,6 +1310,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
|
||||
}
|
||||
|
||||
private String prevdbInfo = "";
|
||||
/**
|
||||
* @param e
|
||||
* @see DataStatusListener#dataStatusChanged(DataStatusEvent)
|
||||
|
@ -1334,36 +1337,65 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
if (!detailTab)
|
||||
{
|
||||
String dbInfo = e.getMessage();
|
||||
if (logger.isLoggable(Level.INFO)) logger.info(dbInfo);
|
||||
if (adTabbox.getSelectedGridTab() != null && adTabbox.getSelectedGridTab().isQueryActive())
|
||||
dbInfo = "[ " + dbInfo + " ]";
|
||||
breadCrumb.setStatusDB(dbInfo, e);
|
||||
String adInfo = e.getAD_Message();
|
||||
if ( ! prevdbInfo.equals(dbInfo)
|
||||
&& ( GridTab.DEFAULT_STATUS_MESSAGE.equals(adInfo)
|
||||
|| GridTable.DATA_REFRESH_MESSAGE.equals(adInfo)
|
||||
|| GridTable.DATA_INSERTED_MESSAGE.equals(adInfo)
|
||||
|| GridTable.DATA_UPDATE_COPIED_MESSAGE.equals(adInfo)
|
||||
)
|
||||
) {
|
||||
prevdbInfo = dbInfo;
|
||||
if (logger.isLoggable(Level.INFO)) logger.info(dbInfo);
|
||||
if (adTabbox.getSelectedGridTab() != null && adTabbox.getSelectedGridTab().isQueryActive())
|
||||
dbInfo = "[ " + dbInfo + " ]";
|
||||
breadCrumb.setStatusDB(dbInfo, e);
|
||||
|
||||
String prefix = null;
|
||||
if (dbInfo.contains("*"))
|
||||
prefix = "*";
|
||||
String prefix = null;
|
||||
if (dbInfo.contains("*"))
|
||||
prefix = "*";
|
||||
|
||||
String titleLogic = null;
|
||||
int windowID = getADTab().getSelectedGridTab().getAD_Window_ID();
|
||||
if (windowID > 0) {
|
||||
titleLogic = MWindow.get(Env.getCtx(), windowID).getTitleLogic();
|
||||
String titleLogic = null;
|
||||
int windowID = getADTab().getSelectedGridTab().getAD_Window_ID();
|
||||
if (windowID > 0) {
|
||||
titleLogic = MWindow.get(Env.getCtx(), windowID).getTitleLogic();
|
||||
}
|
||||
String header = null;
|
||||
if (! Util.isEmpty(titleLogic)) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (prefix != null)
|
||||
sb.append(prefix);
|
||||
sb.append(Env.getContext(ctx, curWindowNo, "_WinInfo_WindowName", false)).append(": ");
|
||||
if (titleLogic.contains("<")) {
|
||||
// IDEMPIERE-1328 - enable using format or subcolumns on title
|
||||
if ( getADTab() != null
|
||||
&& getADTab().getADTabpanel(0) != null
|
||||
&& getADTab().getADTabpanel(0).getGridTab() != null
|
||||
&& getADTab().getADTabpanel(0).getGridTab().getTableModel() != null) {
|
||||
GridTab tab = getADTab().getADTabpanel(0).getGridTab();
|
||||
int row = tab.getCurrentRow();
|
||||
int cnt = tab.getRowCount();
|
||||
boolean inserting = tab.getTableModel().isInserting();
|
||||
if (row >= 0 && cnt > 0 && !inserting) {
|
||||
PO po = tab.getTableModel().getPO(row);
|
||||
titleLogic = Env.parseVariable(titleLogic, po, null, false);
|
||||
} else {
|
||||
titleLogic = Env.parseContext(Env.getCtx(), curWindowNo, titleLogic, false, true);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
titleLogic = Env.parseContext(Env.getCtx(), curWindowNo, titleLogic, false, true);
|
||||
}
|
||||
sb.append(titleLogic);
|
||||
header = sb.toString().trim();
|
||||
if (header.endsWith(":"))
|
||||
header = header.substring(0, header.length()-1);
|
||||
}
|
||||
if (Util.isEmpty(header))
|
||||
header = AEnv.getDialogHeader(Env.getCtx(), curWindowNo, prefix);
|
||||
|
||||
SessionManager.getAppDesktop().setTabTitle(header, curWindowNo);
|
||||
}
|
||||
String header = null;
|
||||
if (! Util.isEmpty(titleLogic)) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (prefix != null)
|
||||
sb.append(prefix);
|
||||
sb.append(Env.getContext(ctx, curWindowNo, "_WinInfo_WindowName", false)).append(": ");
|
||||
titleLogic = Env.parseContext(Env.getCtx(), curWindowNo, titleLogic, false, true);
|
||||
sb.append(titleLogic);
|
||||
header = sb.toString().trim();
|
||||
if (header.endsWith(":"))
|
||||
header = header.substring(0, header.length()-1);
|
||||
}
|
||||
if (Util.isEmpty(header))
|
||||
header = AEnv.getDialogHeader(Env.getCtx(), curWindowNo, prefix);
|
||||
|
||||
SessionManager.getAppDesktop().setTabTitle(header, curWindowNo);
|
||||
}
|
||||
else if (adTabbox.getSelectedDetailADTabpanel() == null)
|
||||
{
|
||||
|
@ -1701,6 +1733,9 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
detailTab.dynamicDisplay(0);
|
||||
}
|
||||
focusToActivePanel();
|
||||
// IDEMPIERE-1328 - refresh recent item after running a process, i.e. completing a doc that changes documentno
|
||||
MRecentItem.touchUpdatedRecord(ctx, adTabbox.getSelectedGridTab().getAD_Table_ID(),
|
||||
adTabbox.getSelectedGridTab().getRecord_ID(), Env.getAD_User_ID(ctx));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2621,8 +2656,22 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
// Zoom
|
||||
if (col.equals("Record_ID"))
|
||||
{
|
||||
int AD_Table_ID = Env.getContextAsInt (ctx, curWindowNo, "AD_Table_ID");
|
||||
int Record_ID = Env.getContextAsInt (ctx, curWindowNo, "Record_ID");
|
||||
int AD_Table_ID = -1;
|
||||
int Record_ID = -1;
|
||||
|
||||
if (wButton instanceof WButtonEditor) {
|
||||
int curTabNo = 0;
|
||||
WButtonEditor be = (WButtonEditor)wButton;
|
||||
if (be.getGridField() != null && be.getGridField().getGridTab() != null) {
|
||||
curTabNo = ((WButtonEditor)wButton).getGridField().getGridTab().getTabNo();
|
||||
AD_Table_ID = Env.getContextAsInt (ctx, curWindowNo, curTabNo, "AD_Table_ID");
|
||||
Record_ID = Env.getContextAsInt (ctx, curWindowNo, curTabNo, "Record_ID");
|
||||
}
|
||||
}
|
||||
if (AD_Table_ID < 0)
|
||||
AD_Table_ID = Env.getContextAsInt (ctx, curWindowNo, "AD_Table_ID");
|
||||
if (Record_ID < 0)
|
||||
Record_ID = Env.getContextAsInt (ctx, curWindowNo, "Record_ID");
|
||||
|
||||
AEnv.zoom(AD_Table_ID, Record_ID);
|
||||
return;
|
||||
|
|
|
@ -333,6 +333,10 @@ public class DB_PostgreSQL implements AdempiereDatabase
|
|||
String cache = convertCache.get(oraStatement);
|
||||
if (cache != null) {
|
||||
Convert.logMigrationScript(oraStatement, cache);
|
||||
if ("true".equals(System.getProperty("org.idempiere.db.postgresql.debug"))) {
|
||||
// log.warning("Oracle -> " + oraStatement);
|
||||
log.warning("Pgsql -> " + cache);
|
||||
}
|
||||
return cache;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ public class Convert_PostgreSQL extends Convert_SQL92 {
|
|||
private TreeMap<String,String> m_map;
|
||||
|
||||
/** Logger */
|
||||
@SuppressWarnings("unused")
|
||||
private static CLogger log = CLogger.getCLogger(Convert_PostgreSQL.class);
|
||||
|
||||
|
||||
|
@ -116,6 +115,10 @@ public class Convert_PostgreSQL extends Convert_SQL92 {
|
|||
statement = recoverQuotedStrings(statement, retVars);
|
||||
result.add(statement);
|
||||
|
||||
if ("true".equals(System.getProperty("org.idempiere.db.postgresql.debug"))) {
|
||||
log.warning("Oracle -> " + sqlStatement);
|
||||
log.warning("PgSQL -> " + statement);
|
||||
}
|
||||
return result;
|
||||
} // convertStatement
|
||||
|
||||
|
|
Loading…
Reference in New Issue