IDEMPIERE-255 - Items in sort tabs are not translated

This commit is contained in:
Nicolas Micoud 2012-05-30 10:01:36 +02:00
parent 5be12ca9cd
commit 41bbbc5b6a
3 changed files with 103 additions and 2 deletions

View File

@ -0,0 +1,51 @@
-- May 30, 2012 9:45:15 AM CEST
-- IDEMPIERE-255
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,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,200192,469,0,10,522,'Name',TO_DATE('2012-05-30 09:45:13','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity','D',60,'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.','Y','Y','Y','N','N','N','N','N','N','N','Y','N','N','Y','Name',0,TO_DATE('2012-05-30 09:45:13','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- May 30, 2012 9:45:16 AM CEST
-- IDEMPIERE-255
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=200192 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)
;
-- May 30, 2012 9:45:22 AM CEST
-- IDEMPIERE-255
ALTER TABLE AD_PrintFormatItem_Trl ADD Name NVARCHAR2(60) DEFAULT NULL
;
-- May 30, 2012 9:46:11 AM CEST
-- IDEMPIERE-255
UPDATE AD_Column SET IsTranslated='Y',Updated=TO_DATE('2012-05-30 09:46:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6940
;
-- May 30, 2012 9:46:35 AM CEST
-- IDEMPIERE-255
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,Updated,UpdatedBy) VALUES (0,200192,200140,0,433,TO_DATE('2012-05-30 09:46:34','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity',60,'D','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.','Y','Y','Y','N','N','N','N','N','Name',TO_DATE('2012-05-30 09:46:34','YYYY-MM-DD HH24:MI:SS'),100)
;
-- May 30, 2012 9:46:35 AM CEST
-- IDEMPIERE-255
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=200140 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)
;
-- May 30, 2012 9:46:40 AM CEST
-- IDEMPIERE-255
UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200140
;
-- May 30, 2012 9:46:40 AM CEST
-- IDEMPIERE-255
UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=5769
;
-- May 30, 2012 9:46:40 AM CEST
-- IDEMPIERE-255
UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=6274
;
UPDATE AD_System
SET LastMigrationScriptApplied='840_IDEMPIERE-255.sql'
WHERE LastMigrationScriptApplied<'840_IDEMPIERE-255.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -0,0 +1,50 @@
-- May 30, 2012 9:45:16 AM CEST
-- IDEMPIERE-255
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,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,200192,469,0,10,522,'Name',TO_TIMESTAMP('2012-05-30 09:45:13','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity','D',60,'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.','Y','Y','Y','N','N','N','N','N','N','N','Y','N','N','Y','Name',0,TO_TIMESTAMP('2012-05-30 09:45:13','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- May 30, 2012 9:45:16 AM CEST
-- IDEMPIERE-255
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=200192 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)
;
-- May 30, 2012 9:45:22 AM CEST
-- IDEMPIERE-255
ALTER TABLE AD_PrintFormatItem_Trl ADD COLUMN Name VARCHAR(60) DEFAULT NULL
;
-- May 30, 2012 9:46:11 AM CEST
-- IDEMPIERE-255
UPDATE AD_Column SET IsTranslated='Y',Updated=TO_TIMESTAMP('2012-05-30 09:46:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6940
;
-- May 30, 2012 9:46:35 AM CEST
-- IDEMPIERE-255
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,Updated,UpdatedBy) VALUES (0,200192,200140,0,433,TO_TIMESTAMP('2012-05-30 09:46:34','YYYY-MM-DD HH24:MI:SS'),100,'Alphanumeric identifier of the entity',60,'D','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.','Y','Y','Y','N','N','N','N','N','Name',TO_TIMESTAMP('2012-05-30 09:46:34','YYYY-MM-DD HH24:MI:SS'),100)
;
-- May 30, 2012 9:46:35 AM CEST
-- IDEMPIERE-255
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=200140 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)
;
-- May 30, 2012 9:46:40 AM CEST
-- IDEMPIERE-255
UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200140
;
-- May 30, 2012 9:46:40 AM CEST
-- IDEMPIERE-255
UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=5769
;
-- May 30, 2012 9:46:40 AM CEST
-- IDEMPIERE-255
UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=6274
;
UPDATE AD_System
SET LastMigrationScriptApplied='840_IDEMPIERE-255.sql'
WHERE LastMigrationScriptApplied<'840_IDEMPIERE-255.sql'
OR LastMigrationScriptApplied IS NULL
;

View File

@ -511,7 +511,7 @@ public class SynchronizeTerminology extends SvrProcess
log.info("Synchronize PrintFormatItem Trl from Element Trl (Multi-Lingual)");
sql="UPDATE AD_PRINTFORMATITEM_TRL trl"
+" SET PrintName = (SELECT e.PrintName"
+" SET (PrintName, Name) = (SELECT e.PrintName, e.Name" // idempiere 255
+" FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_PRINTFORMATITEM pfi"
+" WHERE e.AD_LANGUAGE=trl.AD_LANGUAGE"
+" AND e.AD_Element_ID=c.AD_Element_ID"
@ -536,7 +536,7 @@ public class SynchronizeTerminology extends SvrProcess
log.info("Synchronize PrintFormatItem Trl (Not Multi-Lingual)");
sql="UPDATE AD_PRINTFORMATITEM_TRL trl"
+" SET PrintName = (SELECT pfi.PrintName"
+" SET (PrintName, Name) = (SELECT pfi.PrintName, pfi.Name" // idempiere 255
+" FROM AD_PRINTFORMATITEM pfi"
+" WHERE pfi.AD_PrintFormatItem_ID=trl.AD_PrintFormatItem_ID)"
+" WHERE EXISTS (SELECT 1 "