Implemente FR [3135351] - Enable Scheduler for buttons

https://sourceforge.net/tracker/?func=detail&aid=3135351&group_id=176962&atid=879335
This commit is contained in:
Carlos Ruiz 2011-03-25 23:12:48 -05:00
parent 3c267f1daa
commit bb55b5582a
6 changed files with 296 additions and 10 deletions

View File

@ -0,0 +1,81 @@
-- Dec 11, 2010 4:53:42 PM COT
-- schedule with record id
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,60264,126,0,19,688,'AD_Table_ID',TO_DATE('2010-12-11 16:53:41','YYYY-MM-DD HH24:MI:SS'),100,'Database Table information','D',10,'The Database Table provides the information of the table definition','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Table',0,TO_DATE('2010-12-11 16:53:41','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Dec 11, 2010 4:53:42 PM COT
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=60264 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Dec 11, 2010 4:54:37 PM COT
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,60265,538,0,28,688,'Record_ID',TO_DATE('2010-12-11 16:54:36','YYYY-MM-DD HH24:MI:SS'),100,'Direct internal record ID','D',10,'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.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Record ID',0,TO_DATE('2010-12-11 16:54:36','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Dec 11, 2010 4:54:37 PM COT
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=60265 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Dec 11, 2010 4:55:04 PM COT
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,60264,60991,0,589,TO_DATE('2010-12-11 16:55:03','YYYY-MM-DD HH24:MI:SS'),100,'Database Table information',10,'D','The Database Table provides the information of the table definition','Y','Y','Y','N','N','N','N','N','Table',160,0,TO_DATE('2010-12-11 16:55:03','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Dec 11, 2010 4:55:04 PM COT
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=60991 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Dec 11, 2010 4:55:14 PM COT
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,60265,60992,0,589,TO_DATE('2010-12-11 16:55:13','YYYY-MM-DD HH24:MI:SS'),100,'Direct internal record ID',10,'D','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.','Y','Y','Y','N','N','N','N','Y','Record ID',170,0,TO_DATE('2010-12-11 16:55:13','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Dec 11, 2010 4:55:14 PM COT
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=60992 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Dec 11, 2010 4:56:27 PM COT
ALTER TABLE AD_Scheduler ADD AD_Table_ID NUMBER(10) DEFAULT NULL
;
-- Dec 11, 2010 4:56:33 PM COT
ALTER TABLE AD_Scheduler ADD Record_ID NUMBER(10) DEFAULT NULL
;
-- Dec 11, 2010 5:00:09 PM COT
UPDATE AD_Column SET AD_Reference_ID=11,Updated=TO_DATE('2010-12-11 17:00:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=60265
;
-- Dec 11, 2010 5:53:00 PM COT
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53122,0,TO_DATE('2010-12-11 17:52:59','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','The table doesn''t have associated button for the process','Choose a table with a column associated to the process','E',TO_DATE('2010-12-11 17:52:59','YYYY-MM-DD HH24:MI:SS'),100,'TableMustHaveProcessButton')
;
-- Dec 11, 2010 5:53:00 PM COT
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53122 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Dec 11, 2010 5:54:08 PM COT
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53123,0,TO_DATE('2010-12-11 17:54:07','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','To use Record ID you need to choose a table','Fill the table field first','E',TO_DATE('2010-12-11 17:54:07','YYYY-MM-DD HH24:MI:SS'),100,'MustFillTable')
;
-- Dec 11, 2010 5:54:08 PM COT
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53123 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Dec 11, 2010 5:54:58 PM COT
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53124,0,TO_DATE('2010-12-11 17:54:57','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Record ID doesn''t exist in the table','Fill properly the Record ID field with a valid ID on the chosen table','E',TO_DATE('2010-12-11 17:54:57','YYYY-MM-DD HH24:MI:SS'),100,'NoRecordID')
;
-- Dec 11, 2010 5:54:58 PM COT
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53124 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Dec 11, 2010 5:55:22 PM COT
UPDATE AD_Message_Trl SET IsTranslated='Y',MsgText='La tabla no tiene asociado un botón para el proceso',MsgTip='Escoja una tabla con una columna asociada al proceso',Updated=TO_DATE('2010-12-11 17:55:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53122 AND AD_Language LIKE 'es_%'
;
-- Dec 11, 2010 5:55:48 PM COT
UPDATE AD_Message_Trl SET IsTranslated='Y',MsgText='Debe seleccionar una tabla para utilizar el ID de Registro',MsgTip='Llene primero el campo tabla',Updated=TO_DATE('2010-12-11 17:55:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53123 AND AD_Language LIKE 'es_%'
;
-- Dec 11, 2010 5:56:17 PM COT
UPDATE AD_Message_Trl SET IsTranslated='Y',MsgText='ID de Registro no existe en la tabla',MsgTip='Llene correctamente el campo ID de Registro con un ID válido en la tabla seleccionada',Updated=TO_DATE('2010-12-11 17:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53124 AND AD_Language LIKE 'es_%'
;

View File

@ -0,0 +1,83 @@
SET CLIENT_ENCODING TO 'UTF8';
-- Dec 11, 2010 4:53:42 PM COT
-- schedule with record id
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,60264,126,0,19,688,'AD_Table_ID',TO_TIMESTAMP('2010-12-11 16:53:41','YYYY-MM-DD HH24:MI:SS'),100,'Database Table information','D',10,'The Database Table provides the information of the table definition','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Table',0,TO_TIMESTAMP('2010-12-11 16:53:41','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Dec 11, 2010 4:53:42 PM COT
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=60264 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Dec 11, 2010 4:54:37 PM COT
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,60265,538,0,28,688,'Record_ID',TO_TIMESTAMP('2010-12-11 16:54:36','YYYY-MM-DD HH24:MI:SS'),100,'Direct internal record ID','D',10,'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.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Record ID',0,TO_TIMESTAMP('2010-12-11 16:54:36','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Dec 11, 2010 4:54:37 PM COT
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=60265 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Dec 11, 2010 4:55:04 PM COT
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,60264,60991,0,589,TO_TIMESTAMP('2010-12-11 16:55:03','YYYY-MM-DD HH24:MI:SS'),100,'Database Table information',10,'D','The Database Table provides the information of the table definition','Y','Y','Y','N','N','N','N','N','Table',160,0,TO_TIMESTAMP('2010-12-11 16:55:03','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Dec 11, 2010 4:55:04 PM COT
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=60991 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Dec 11, 2010 4:55:14 PM COT
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,60265,60992,0,589,TO_TIMESTAMP('2010-12-11 16:55:13','YYYY-MM-DD HH24:MI:SS'),100,'Direct internal record ID',10,'D','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.','Y','Y','Y','N','N','N','N','Y','Record ID',170,0,TO_TIMESTAMP('2010-12-11 16:55:13','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Dec 11, 2010 4:55:14 PM COT
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=60992 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
;
-- Dec 11, 2010 4:56:27 PM COT
ALTER TABLE AD_Scheduler ADD COLUMN AD_Table_ID NUMERIC(10) DEFAULT NULL
;
-- Dec 11, 2010 4:56:33 PM COT
ALTER TABLE AD_Scheduler ADD COLUMN Record_ID NUMERIC(10) DEFAULT NULL
;
-- Dec 11, 2010 5:00:09 PM COT
UPDATE AD_Column SET AD_Reference_ID=11,Updated=TO_TIMESTAMP('2010-12-11 17:00:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=60265
;
-- Dec 11, 2010 5:53:00 PM COT
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53122,0,TO_TIMESTAMP('2010-12-11 17:52:59','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','The table doesn''t have associated button for the process','Choose a table with a column associated to the process','E',TO_TIMESTAMP('2010-12-11 17:52:59','YYYY-MM-DD HH24:MI:SS'),100,'TableMustHaveProcessButton')
;
-- Dec 11, 2010 5:53:00 PM COT
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53122 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Dec 11, 2010 5:54:08 PM COT
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53123,0,TO_TIMESTAMP('2010-12-11 17:54:07','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','To use Record ID you need to choose a table','Fill the table field first','E',TO_TIMESTAMP('2010-12-11 17:54:07','YYYY-MM-DD HH24:MI:SS'),100,'MustFillTable')
;
-- Dec 11, 2010 5:54:08 PM COT
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53123 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Dec 11, 2010 5:54:58 PM COT
INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53124,0,TO_TIMESTAMP('2010-12-11 17:54:57','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Record ID doesn''t exist in the table','Fill properly the Record ID field with a valid ID on the chosen table','E',TO_TIMESTAMP('2010-12-11 17:54:57','YYYY-MM-DD HH24:MI:SS'),100,'NoRecordID')
;
-- Dec 11, 2010 5:54:58 PM COT
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53124 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
;
-- Dec 11, 2010 5:55:22 PM COT
UPDATE AD_Message_Trl SET IsTranslated='Y',MsgText='La tabla no tiene asociado un botón para el proceso',MsgTip='Escoja una tabla con una columna asociada al proceso',Updated=TO_TIMESTAMP('2010-12-11 17:55:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53122 AND AD_Language LIKE 'es_%'
;
-- Dec 11, 2010 5:55:48 PM COT
UPDATE AD_Message_Trl SET IsTranslated='Y',MsgText='Debe seleccionar una tabla para utilizar el ID de Registro',MsgTip='Llene primero el campo tabla',Updated=TO_TIMESTAMP('2010-12-11 17:55:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53123 AND AD_Language LIKE 'es_%'
;
-- Dec 11, 2010 5:56:17 PM COT
UPDATE AD_Message_Trl SET IsTranslated='Y',MsgText='ID de Registro no existe en la tabla',MsgTip='Llene correctamente el campo ID de Registro con un ID válido en la tabla seleccionada',Updated=TO_TIMESTAMP('2010-12-11 17:56:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=53124 AND AD_Language LIKE 'es_%'
;

View File

@ -31,7 +31,7 @@ public interface I_AD_Scheduler
public static final String Table_Name = "AD_Scheduler"; public static final String Table_Name = "AD_Scheduler";
/** AD_Table_ID=688 */ /** AD_Table_ID=688 */
public static final int Table_ID = MTable.getTable_ID(Table_Name); public static final int Table_ID = 688;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
@ -75,7 +75,7 @@ public interface I_AD_Scheduler
*/ */
public int getAD_Process_ID(); public int getAD_Process_ID();
public I_AD_Process getAD_Process() throws RuntimeException; public org.compiere.model.I_AD_Process getAD_Process() throws RuntimeException;
/** Column name AD_Scheduler_ID */ /** Column name AD_Scheduler_ID */
public static final String COLUMNNAME_AD_Scheduler_ID = "AD_Scheduler_ID"; public static final String COLUMNNAME_AD_Scheduler_ID = "AD_Scheduler_ID";
@ -90,6 +90,21 @@ public interface I_AD_Scheduler
*/ */
public int getAD_Scheduler_ID(); public int getAD_Scheduler_ID();
/** Column name AD_Table_ID */
public static final String COLUMNNAME_AD_Table_ID = "AD_Table_ID";
/** Set Table.
* Database Table information
*/
public void setAD_Table_ID (int AD_Table_ID);
/** Get Table.
* Database Table information
*/
public int getAD_Table_ID();
public org.compiere.model.I_AD_Table getAD_Table() throws RuntimeException;
/** Column name Created */ /** Column name Created */
public static final String COLUMNNAME_Created = "Created"; public static final String COLUMNNAME_Created = "Created";
@ -258,6 +273,19 @@ public interface I_AD_Scheduler
/** Get Process Now */ /** Get Process Now */
public boolean isProcessing(); public boolean isProcessing();
/** 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 ScheduleType */ /** Column name ScheduleType */
public static final String COLUMNNAME_ScheduleType = "ScheduleType"; public static final String COLUMNNAME_ScheduleType = "ScheduleType";
@ -284,7 +312,7 @@ public interface I_AD_Scheduler
*/ */
public int getSupervisor_ID(); public int getSupervisor_ID();
public I_AD_User getSupervisor() throws RuntimeException; public org.compiere.model.I_AD_User getSupervisor() throws RuntimeException;
/** Column name Updated */ /** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated"; public static final String COLUMNNAME_Updated = "Updated";

View File

@ -25,6 +25,8 @@ import java.util.Properties;
import java.util.TreeSet; import java.util.TreeSet;
import org.compiere.util.DB; import org.compiere.util.DB;
import org.compiere.util.DisplayType;
import org.compiere.util.Msg;
/** /**
@ -32,6 +34,9 @@ import org.compiere.util.DB;
* *
* @author Jorg Janke * @author Jorg Janke
* @version $Id: MScheduler.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $ * @version $Id: MScheduler.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $
*
* Contributors:
* Carlos Ruiz - globalqss - FR [3135351] - Enable Scheduler for buttons
*/ */
public class MScheduler extends X_AD_Scheduler public class MScheduler extends X_AD_Scheduler
implements AdempiereProcessor, AdempiereProcessor2 implements AdempiereProcessor, AdempiereProcessor2
@ -264,6 +269,38 @@ public class MScheduler extends X_AD_Scheduler
} }
} }
} }
// FR [3135351] - Enable Scheduler for buttons
if (getAD_Table_ID() > 0) {
// Validate the table has any button referencing the process
int colid = new Query(getCtx(), MColumn.Table_Name, "AD_Table_ID=? AND AD_Reference_ID=? AND AD_Process_ID=?", get_TrxName())
.setOnlyActiveRecords(true)
.setParameters(getAD_Table_ID(), DisplayType.Button, getAD_Process_ID())
.firstId();
if (colid <= 0) {
log.saveError("Error", Msg.getMsg(getCtx(), "TableMustHaveProcessButton"));
return false;
}
} else {
setRecord_ID(-1);
}
if (getRecord_ID() != 0) {
// Validate AD_Table_ID must be set
if (getAD_Table_ID() <= 0) {
log.saveError("Error", Msg.getMsg(getCtx(), "MustFillTable"));
return false;
}
// Validate the record must exists on the same client of the scheduler
MTable table = MTable.get(getCtx(), getAD_Table_ID());
PO po = table.getPO(getRecord_ID(), get_TrxName());
if (po == null || po.get_ID() <= 0 || po.getAD_Client_ID() != getAD_Client_ID()) {
log.saveError("Error", Msg.getMsg(getCtx(), "NoRecordID"));
return false;
}
}
//
return true; return true;
} // beforeSave } // beforeSave

View File

@ -31,7 +31,7 @@ public class X_AD_Scheduler extends PO implements I_AD_Scheduler, I_Persistent
/** /**
* *
*/ */
private static final long serialVersionUID = 20100614L; private static final long serialVersionUID = 20110325L;
/** Standard Constructor */ /** Standard Constructor */
public X_AD_Scheduler (Properties ctx, int AD_Scheduler_ID, String trxName) public X_AD_Scheduler (Properties ctx, int AD_Scheduler_ID, String trxName)
@ -78,9 +78,9 @@ public class X_AD_Scheduler extends PO implements I_AD_Scheduler, I_Persistent
return sb.toString(); return sb.toString();
} }
public I_AD_Process getAD_Process() throws RuntimeException public org.compiere.model.I_AD_Process getAD_Process() throws RuntimeException
{ {
return (I_AD_Process)MTable.get(getCtx(), I_AD_Process.Table_Name) return (org.compiere.model.I_AD_Process)MTable.get(getCtx(), org.compiere.model.I_AD_Process.Table_Name)
.getPO(getAD_Process_ID(), get_TrxName()); } .getPO(getAD_Process_ID(), get_TrxName()); }
/** Set Process. /** Set Process.
@ -129,6 +129,34 @@ public class X_AD_Scheduler extends PO implements I_AD_Scheduler, I_Persistent
return ii.intValue(); 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
*/
public void setAD_Table_ID (int AD_Table_ID)
{
if (AD_Table_ID < 1)
set_Value (COLUMNNAME_AD_Table_ID, null);
else
set_Value (COLUMNNAME_AD_Table_ID, Integer.valueOf(AD_Table_ID));
}
/** Get Table.
@return Database Table information
*/
public int getAD_Table_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Table_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Cron Scheduling Pattern. /** Set Cron Scheduling Pattern.
@param CronPattern @param CronPattern
Cron pattern to define when the process should be invoked. Cron pattern to define when the process should be invoked.
@ -353,6 +381,29 @@ public class X_AD_Scheduler extends PO implements I_AD_Scheduler, I_Persistent
return false; return false;
} }
/** 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();
}
/** ScheduleType AD_Reference_ID=318 */ /** ScheduleType AD_Reference_ID=318 */
public static final int SCHEDULETYPE_AD_Reference_ID=318; public static final int SCHEDULETYPE_AD_Reference_ID=318;
/** Frequency = F */ /** Frequency = F */
@ -381,9 +432,9 @@ public class X_AD_Scheduler extends PO implements I_AD_Scheduler, I_Persistent
return (String)get_Value(COLUMNNAME_ScheduleType); return (String)get_Value(COLUMNNAME_ScheduleType);
} }
public I_AD_User getSupervisor() throws RuntimeException public org.compiere.model.I_AD_User getSupervisor() throws RuntimeException
{ {
return (I_AD_User)MTable.get(getCtx(), I_AD_User.Table_Name) return (org.compiere.model.I_AD_User)MTable.get(getCtx(), org.compiere.model.I_AD_User.Table_Name)
.getPO(getSupervisor_ID(), get_TrxName()); } .getPO(getSupervisor_ID(), get_TrxName()); }
/** Set Supervisor. /** Set Supervisor.

View File

@ -52,6 +52,9 @@ import org.compiere.util.Trx;
* *
* @author Jorg Janke * @author Jorg Janke
* @version $Id: Scheduler.java,v 1.5 2006/07/30 00:53:33 jjanke Exp $ * @version $Id: Scheduler.java,v 1.5 2006/07/30 00:53:33 jjanke Exp $
*
* Contributors:
* Carlos Ruiz - globalqss - FR [3135351] - Enable Scheduler for buttons
*/ */
public class Scheduler extends AdempiereServer public class Scheduler extends AdempiereServer
{ {
@ -157,8 +160,8 @@ public class Scheduler extends AdempiereServer
boolean isReport = (process.isReport() || process.getAD_ReportView_ID() > 0); boolean isReport = (process.isReport() || process.getAD_ReportView_ID() > 0);
// Process (see also MWFActivity.performWork // Process (see also MWFActivity.performWork
int AD_Table_ID = 0; int AD_Table_ID = m_model.getAD_Table_ID();
int Record_ID = 0; int Record_ID = m_model.getRecord_ID();
// //
MPInstance pInstance = new MPInstance(process, Record_ID); MPInstance pInstance = new MPInstance(process, Record_ID);
fillParameter(pInstance); fillParameter(pInstance);
@ -294,6 +297,9 @@ public class Scheduler extends AdempiereServer
MSchedulerPara sPara = sParams[np]; MSchedulerPara sPara = sParams[np];
if (iPara.getParameterName().equals(sPara.getColumnName())) if (iPara.getParameterName().equals(sPara.getColumnName()))
{ {
String paraDesc = sPara.getDescription();
if (paraDesc != null && paraDesc.trim().length() > 0)
iPara.setInfo(sPara.getDescription());
String variable = sPara.getParameterDefault(); String variable = sPara.getParameterDefault();
log.fine(sPara.getColumnName() + " = " + variable); log.fine(sPara.getColumnName() + " = " + variable);
// Value - Constant/Variable // Value - Constant/Variable