IDEMPIERE-454 Easy import
This commit is contained in:
parent
485a66164a
commit
506f380141
|
@ -0,0 +1,78 @@
|
|||
-- Feb 11, 2013 5:42:41 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Table name {0} does not correspond to the parent''s table name {1}',200146,'D','18535f25-f9d7-47c0-9c21-de68afa04444','DiffTableName','Y',TO_DATE('2013-02-11 17:42:40','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2013-02-11 17:42:40','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Feb 11, 2013 5:42:41 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200146 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)
|
||||
;
|
||||
|
||||
-- Feb 11, 2013 5:43:20 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Record not processed, due to master record failure',200147,'D','ffc51041-2111-4944-9ac5-35d7688194ef','NotProcessed','Y',TO_DATE('2013-02-11 17:43:20','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2013-02-11 17:43:20','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Feb 11, 2013 5:43:20 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200147 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)
|
||||
;
|
||||
|
||||
-- Feb 11, 2013 5:45:35 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Different parent value: Master value {0} Detail value {1}',200148,'D','3516b3e0-6f8c-458d-af58-b6e22e6f0156','DiffParentValue','Y',TO_DATE('2013-02-11 17:45:35','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2013-02-11 17:45:35','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Feb 11, 2013 5:45:35 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200148 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)
|
||||
;
|
||||
|
||||
-- Mar 11, 2013 3:58:04 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Csv file must not contain ''>'' in header record {0}. ',200152,'D','1d9054fa-48d7-4e65-b74a-3164eaa156b8','WrongHeader','Y',TO_DATE('2013-03-11 15:58:02','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2013-03-11 15:58:02','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Mar 11, 2013 3:58:04 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200152 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)
|
||||
;
|
||||
|
||||
-- Mar 11, 2013 3:59:21 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','No child tab was found with such table {0}. ',200153,'D','027a1bdf-7b45-4afc-93c5-a6113b5f1acb','NoChildTab','Y',TO_DATE('2013-03-11 15:59:20','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2013-03-11 15:59:20','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Mar 11, 2013 3:59:21 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200153 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)
|
||||
;
|
||||
|
||||
-- Mar 11, 2013 4:04:53 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
UPDATE C_AcctProcessor SET DateNextRun=TO_DATE('2013-03-11 16:14:53','YYYY-MM-DD HH24:MI:SS'), DateLastRun=TO_DATE('2013-03-11 16:04:53','YYYY-MM-DD HH24:MI:SS'),Updated=TO_DATE('2013-03-11 16:04:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctProcessor_ID=100
|
||||
;
|
||||
|
||||
-- Mar 11, 2013 4:10:39 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Wrong detail name{0}, it must contain the character ''>'':{1} ',200154,'D','b82cafbc-f6d0-4002-b358-a4a9783f77c2','WrongDetailName','Y',TO_DATE('2013-03-11 16:10:38','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2013-03-11 16:10:38','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Mar 11, 2013 4:10:39 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200154 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)
|
||||
;
|
||||
|
||||
-- Mar 11, 2013 4:12:48 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Parent value cannot be deleted {0}!',200155,'D','31e87e31-75b2-4555-8251-5d5d7dfe7ada','NoParentDelete','Y',TO_DATE('2013-03-11 16:12:47','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_DATE('2013-03-11 16:12:47','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Mar 11, 2013 4:12:48 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200155 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)
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201302110600_IDEMPIERE-454.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
-- Feb 11, 2013 5:42:41 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Table name {0} does not correspond to the parent''s table name {1}',200146,'D','18535f25-f9d7-47c0-9c21-de68afa04444','DiffTableName','Y',TO_TIMESTAMP('2013-02-11 17:42:40','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2013-02-11 17:42:40','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Feb 11, 2013 5:42:41 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200146 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)
|
||||
;
|
||||
|
||||
-- Feb 11, 2013 5:43:20 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Record not processed, due to master record failure',200147,'D','ffc51041-2111-4944-9ac5-35d7688194ef','NotProcessed','Y',TO_TIMESTAMP('2013-02-11 17:43:20','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2013-02-11 17:43:20','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Feb 11, 2013 5:43:20 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200147 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)
|
||||
;
|
||||
|
||||
-- Feb 11, 2013 5:45:35 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Different parent value: Master value {0} Detail value {1}',200148,'D','3516b3e0-6f8c-458d-af58-b6e22e6f0156','DiffParentValue','Y',TO_TIMESTAMP('2013-02-11 17:45:35','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2013-02-11 17:45:35','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Feb 11, 2013 5:45:35 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200148 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)
|
||||
;
|
||||
|
||||
-- Mar 11, 2013 3:58:04 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Csv file must not contain ''>'' in header record {0}. ',200152,'D','1d9054fa-48d7-4e65-b74a-3164eaa156b8','WrongHeader','Y',TO_TIMESTAMP('2013-03-11 15:58:02','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2013-03-11 15:58:02','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Mar 11, 2013 3:58:04 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200152 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)
|
||||
;
|
||||
|
||||
-- Mar 11, 2013 3:59:21 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','No child tab was found with such table {0}. ',200153,'D','027a1bdf-7b45-4afc-93c5-a6113b5f1acb','NoChildTab','Y',TO_TIMESTAMP('2013-03-11 15:59:20','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2013-03-11 15:59:20','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Mar 11, 2013 3:59:21 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200153 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)
|
||||
;
|
||||
|
||||
-- Mar 11, 2013 4:04:53 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
UPDATE C_AcctProcessor SET DateNextRun=TO_TIMESTAMP('2013-03-11 16:14:53','YYYY-MM-DD HH24:MI:SS'), DateLastRun=TO_TIMESTAMP('2013-03-11 16:04:53','YYYY-MM-DD HH24:MI:SS'),Updated=TO_TIMESTAMP('2013-03-11 16:04:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctProcessor_ID=100
|
||||
;
|
||||
|
||||
-- Mar 11, 2013 4:10:39 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Wrong detail name{0}, it must contain the character ''>'':{1} ',200154,'D','b82cafbc-f6d0-4002-b358-a4a9783f77c2','WrongDetailName','Y',TO_TIMESTAMP('2013-03-11 16:10:38','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2013-03-11 16:10:38','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Mar 11, 2013 4:10:39 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200154 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)
|
||||
;
|
||||
|
||||
-- Mar 11, 2013 4:12:48 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('E','Parent value cannot be deleted {0}!',200155,'D','31e87e31-75b2-4555-8251-5d5d7dfe7ada','NoParentDelete','Y',TO_TIMESTAMP('2013-03-11 16:12:47','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2013-03-11 16:12:47','YYYY-MM-DD HH24:MI:SS'))
|
||||
;
|
||||
|
||||
-- Mar 11, 2013 4:12:48 PM COT
|
||||
-- IDEMPIERE-454 Easy import
|
||||
INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200155 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)
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201302110600_IDEMPIERE-454.sql') FROM dual
|
||||
;
|
||||
|
|
@ -31,7 +31,10 @@ import org.adempiere.model.MTabCustomization;
|
|||
import org.compiere.model.GridField;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.GridTable;
|
||||
import org.compiere.model.GridWindow;
|
||||
import org.compiere.model.GridWindowVO;
|
||||
import org.compiere.model.MColumn;
|
||||
import org.compiere.model.MLocation;
|
||||
import org.compiere.model.MQuery;
|
||||
import org.compiere.model.MRefList;
|
||||
import org.compiere.model.MTable;
|
||||
|
@ -76,10 +79,16 @@ public class GridTabCSVExporter implements IGridTabExporter
|
|||
List<String> headArray = new ArrayList<String>();
|
||||
List<CellProcessor> procArray = new ArrayList<CellProcessor>();
|
||||
table = MTable.get(Env.getCtx(), gridTab.getTableName());
|
||||
int specialHDispayType = 0;
|
||||
//master tab
|
||||
for (int idxfld = 0; idxfld < gridFields.length; idxfld++) {
|
||||
GridField field = gridFields[idxfld];
|
||||
MColumn column = MColumn.get(Env.getCtx(), field.getAD_Column_ID());
|
||||
//Special Columns
|
||||
if(DisplayType.Location == column.getAD_Reference_ID()){
|
||||
specialHDispayType = DisplayType.Location;
|
||||
continue;
|
||||
}
|
||||
String headName = resolveColumnName(table, column);
|
||||
headArray.add(headName);
|
||||
if (DisplayType.Date == column.getAD_Reference_ID()) {
|
||||
|
@ -94,15 +103,26 @@ public class GridTabCSVExporter implements IGridTabExporter
|
|||
procArray.add(new Optional(new FmtNumber(nf)));
|
||||
} else if (DisplayType.YesNo == column.getAD_Reference_ID()) {
|
||||
procArray.add(new Optional(new FmtBool("Y", "N")));
|
||||
} else { // lookups and text
|
||||
} else { // lookups
|
||||
procArray.add(new Optional());
|
||||
}
|
||||
}
|
||||
|
||||
if(specialHDispayType > 0){
|
||||
for(String specialHeader:resolveSpecialColumnName(specialHDispayType)){
|
||||
headArray.add(specialHeader);
|
||||
procArray.add(null);
|
||||
}
|
||||
}
|
||||
//Details up to tab level 1
|
||||
if(childs.size() > 0){
|
||||
int specialDetDispayType = 0;
|
||||
for(GridTab detail: childs){
|
||||
//comment this line if you want to export all tabs
|
||||
if(detail.getTabNo()>1)
|
||||
break;
|
||||
|
||||
if (detail.getTabLevel()>1)
|
||||
if(detail.getTabLevel()>1)
|
||||
continue;
|
||||
|
||||
IsValidTab = IsValidTabToExport(detail);
|
||||
|
@ -114,7 +134,11 @@ public class GridTabCSVExporter implements IGridTabExporter
|
|||
gridFields = getFields(detail);
|
||||
for(GridField field : gridFields){
|
||||
MColumn columnDetail = MColumn.get(Env.getCtx(), field.getAD_Column_ID());
|
||||
String headNameDetail =detail.getTableName()+">"+resolveColumnName(tableDetail, columnDetail);
|
||||
if(DisplayType.Location == columnDetail.getAD_Reference_ID()){
|
||||
specialDetDispayType = DisplayType.Location;
|
||||
continue;
|
||||
}
|
||||
String headNameDetail= detail.getTableName()+">"+resolveColumnName(tableDetail, columnDetail);
|
||||
headArray.add(headNameDetail);
|
||||
if (DisplayType.Date == columnDetail.getAD_Reference_ID()) {
|
||||
procArray.add(new Optional(new FmtDate(DisplayType.DEFAULT_DATE_FORMAT)));
|
||||
|
@ -129,6 +153,12 @@ public class GridTabCSVExporter implements IGridTabExporter
|
|||
} else if (DisplayType.YesNo == columnDetail.getAD_Reference_ID()) {
|
||||
procArray.add(new Optional(new FmtBool("Y", "N")));
|
||||
} else { // lookups and text
|
||||
procArray.add(new Optional());
|
||||
}
|
||||
}
|
||||
if(specialDetDispayType > 0){
|
||||
for(String specialHeader:resolveSpecialColumnName(specialDetDispayType)){
|
||||
headArray.add(specialHeader);
|
||||
procArray.add(null);
|
||||
}
|
||||
}
|
||||
|
@ -156,16 +186,52 @@ public class GridTabCSVExporter implements IGridTabExporter
|
|||
int idxfld = 0;
|
||||
int index =0;
|
||||
int rowDetail=0;
|
||||
int record_Id = 0;
|
||||
|
||||
for(GridField field : getFields(gridTab)){
|
||||
MColumn column = MColumn.get(Env.getCtx(), field.getAD_Column_ID());
|
||||
|
||||
if(DisplayType.Location == column.getAD_Reference_ID()){
|
||||
Object fResolved =resolveValue(gridTab, table, column, idxrow, column.getColumnName());
|
||||
|
||||
if (fResolved!=null)
|
||||
record_Id= Integer.parseInt(fResolved.toString());
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
String headName = header[idxfld];
|
||||
Object value = resolveValue(gridTab, table, column, idxrow, headName);
|
||||
row.put(headName, value);
|
||||
row.put(headName,value);
|
||||
idxfld++;
|
||||
index++;
|
||||
}
|
||||
|
||||
if(specialHDispayType > 0 && record_Id > 0){
|
||||
switch(specialHDispayType) {
|
||||
case DisplayType.Location:
|
||||
MLocation address = new MLocation (Env.getCtx(),record_Id,null);
|
||||
for(String specialHeader:resolveSpecialColumnName(specialHDispayType)){
|
||||
String columnName = specialHeader.substring(specialHeader.indexOf(">")+1,specialHeader.length());
|
||||
Object sValue = null;
|
||||
if (columnName.indexOf("[") >= 0 && columnName .endsWith("]")){
|
||||
int indx = columnName.indexOf("[");
|
||||
String columnRef= columnName.substring(indx+1,columnName.length()-1);
|
||||
String tableRef = columnName.substring(0,indx);
|
||||
Object record_id= address.get_Value(tableRef);
|
||||
if (record_id!=null)
|
||||
sValue = queryExecute(columnRef,tableRef,record_id);
|
||||
}else{
|
||||
sValue = address.get_Value(columnName);
|
||||
}
|
||||
row.put(specialHeader, sValue);
|
||||
idxfld++;
|
||||
index++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
while(true){
|
||||
if(childs.size()>0){
|
||||
Map<String, Object> tmpRow = resolveMasterDetailRow(rowDetail,tabMapDetails,headArray,index,gridTab.getKeyID(idxrow), gridTab.getKeyColumnName());
|
||||
|
@ -176,7 +242,7 @@ public class GridTabCSVExporter implements IGridTabExporter
|
|||
row.put(detailColumn , value);
|
||||
}
|
||||
rowDetail++;
|
||||
mapWriter.write(row, header, processors);
|
||||
mapWriter.write(row, header,processors);
|
||||
}else{
|
||||
break;
|
||||
}
|
||||
|
@ -186,7 +252,7 @@ public class GridTabCSVExporter implements IGridTabExporter
|
|||
}
|
||||
|
||||
if(rowDetail==0)
|
||||
mapWriter.write(row, header, processors);
|
||||
mapWriter.write(row, header,processors);
|
||||
|
||||
idxfld=0;
|
||||
}
|
||||
|
@ -201,7 +267,6 @@ public class GridTabCSVExporter implements IGridTabExporter
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//add constraints to not allow certain tabs
|
||||
|
@ -221,6 +286,7 @@ public class GridTabCSVExporter implements IGridTabExporter
|
|||
Map<String, Object> row = new HashMap<String, Object>();
|
||||
Object value = null;
|
||||
boolean hasDetails = false;
|
||||
int specialDetDispayType = 0;
|
||||
|
||||
if (currentDetRow > 0 )
|
||||
for(int j =0;j<idxfld;j++)
|
||||
|
@ -231,8 +297,17 @@ public class GridTabCSVExporter implements IGridTabExporter
|
|||
String whereCla = getWhereClause (childTab ,record_Id ,keyColumnParent);
|
||||
childTab.getTableModel().dataRequery(whereCla, false, 0);
|
||||
if (childTab.getRowCount() > 0) {
|
||||
int specialRecordId = 0;
|
||||
for(GridField field : childTabDetail.getValue()){
|
||||
MColumn column = MColumn.get(Env.getCtx(), field.getAD_Column_ID());
|
||||
if(DisplayType.Location == column.getAD_Reference_ID()){
|
||||
specialDetDispayType = DisplayType.Location;
|
||||
Object fResolved = resolveValue(childTab, MTable.get(Env.getCtx(),childTab.getTableName()), column, currentDetRow,column.getColumnName());
|
||||
if(fResolved!=null)
|
||||
specialRecordId = Integer.parseInt(fResolved.toString());
|
||||
|
||||
continue;
|
||||
}
|
||||
MTable tableDetail = MTable.get(Env.getCtx(), childTab.getTableName());
|
||||
String headName = headArray.get(headArray.indexOf(childTab.getTableName()+">"+resolveColumnName(tableDetail,column)));
|
||||
value = resolveValue(childTab, MTable.get(Env.getCtx(),childTab.getTableName()), column, currentDetRow, headName.substring(headName.indexOf(">")+ 1,headName.length()));
|
||||
|
@ -241,6 +316,24 @@ public class GridTabCSVExporter implements IGridTabExporter
|
|||
hasDetails = true;
|
||||
|
||||
}
|
||||
if(specialDetDispayType > 0 && specialRecordId > 0){
|
||||
MLocation address = new MLocation (Env.getCtx(),specialRecordId,null);
|
||||
for(String specialHeader:resolveSpecialColumnName(specialDetDispayType)){
|
||||
String columnName = specialHeader.substring(specialHeader.indexOf(">")+1,specialHeader.length());
|
||||
Object sValue = null;
|
||||
if (columnName.indexOf("[") >= 0 && columnName .endsWith("]")){
|
||||
int indx = columnName.indexOf("[");
|
||||
String columnRef= columnName.substring(indx+1,columnName.length()-1);
|
||||
String tableRef = columnName.substring(0,indx);
|
||||
Object record_id= address.get_Value(tableRef);
|
||||
if(record_id!=null)
|
||||
sValue = queryExecute(columnRef,tableRef,record_id);
|
||||
}else{
|
||||
sValue = address.get_Value(columnName);
|
||||
}
|
||||
row.put(specialHeader, sValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (hasDetails)
|
||||
|
@ -285,6 +378,16 @@ public class GridTabCSVExporter implements IGridTabExporter
|
|||
return value;
|
||||
}
|
||||
|
||||
private Object queryExecute(String selectColumn,String tableName,Object record_id){
|
||||
|
||||
StringBuilder select = new StringBuilder("SELECT ")
|
||||
.append(selectColumn).append(" FROM ")
|
||||
.append(tableName.substring(0,tableName.length()-3)).append(" WHERE ")
|
||||
.append(tableName).append("=?");
|
||||
|
||||
return DB.getSQLValueStringEx(null, select.toString(),record_id);
|
||||
}
|
||||
|
||||
private String resolveColumnName(MTable table, MColumn column) {
|
||||
StringBuilder name = new StringBuilder(column.getColumnName());
|
||||
if (DisplayType.isLookup(column.getAD_Reference_ID())) {
|
||||
|
@ -306,6 +409,32 @@ public class GridTabCSVExporter implements IGridTabExporter
|
|||
return name.toString();
|
||||
}
|
||||
|
||||
private ArrayList<String> resolveSpecialColumnName(int displayType){
|
||||
|
||||
ArrayList<String> specialColumnNames = new ArrayList<String>();
|
||||
if (DisplayType.Location == displayType ){
|
||||
GridWindowVO gWindowVO = Env.getMWindowVO(0,121,0);
|
||||
GridWindow m_mWindow = new GridWindow (gWindowVO);
|
||||
GridTab m_mTab = m_mWindow.getTab(0);
|
||||
m_mWindow.initTab(0);
|
||||
for(GridField locField:m_mTab.getFields()){
|
||||
if("AD_Client_ID".equals(locField.getColumnName()))
|
||||
continue;
|
||||
if("AD_Org_ID".equals(locField.getColumnName()))
|
||||
continue;
|
||||
if("IsActive".equals(locField.getColumnName()))
|
||||
continue;
|
||||
if(!locField.isDisplayed())
|
||||
continue;
|
||||
|
||||
String fName = resolveColumnName(MTable.get(Env.getCtx(), m_mTab.getTableName()),MColumn.get(Env.getCtx(), locField.getAD_Column_ID()));
|
||||
specialColumnNames.add(m_mTab.getTableName()+">"+ fName);
|
||||
}
|
||||
}
|
||||
|
||||
return specialColumnNames;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileExtension() {
|
||||
return "csv";
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue