Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0014689Openbravo ERPA. Platformpublic2010-09-23 16:562010-09-29 11:57
psarobe 
alostale 
immediatemajoralways
closedfixed 
5
2.50MP21 
2.50MP222.50MP22 
Core
No
0014689: Translation: If you apply any translation module on top of MP21 some fields get not translated
Translation: If you apply any translation module on top of MP21 some fields get not translated.

The non-translated fields are those ones in purchase windows (isSotrx='N') that do not have a translation for the PO elements.
1. Install the MP21 community appliance
2. Login as Openbravo/openbravo
3. Install the Spanish translation
4. Login as Openbravo/openbravo with role big bazaar admin
5. Go to Purchase invoice window. Some fields and buttons are not translated

See attach
Regression
related to defect 0013178 closed alostale The column 'Purchaser Order Lines' on Matched Purchaser Order's grid view is mistranslated 
related to defect 00145512.50MP23 closed alostale When a translation module is installed the synchronize terminology is not executed 
png error.PNG (48,993) 2010-09-23 16:56
https://issues.openbravo.com/file_download.php?file_id=3118&type=bug
png
Issue History
2010-09-23 16:56psarobeNew Issue
2010-09-23 16:56psarobeAssigned To => alostale
2010-09-23 16:56psarobeFile Added: error.PNG
2010-09-23 16:56psarobeStatusnew => scheduled
2010-09-23 16:56psarobefix_in_branch => pi
2010-09-23 21:36jpabloaeIssue Monitored: jpabloae
2010-09-24 08:31alostaleRelationship addedrelated to 0013178
2010-09-24 08:37alostaleNote Added: 0031336
2010-09-24 08:43hgbotCheckin
2010-09-24 08:43hgbotNote Added: 0031338
2010-09-24 08:43hgbotStatusscheduled => resolved
2010-09-24 08:43hgbotResolutionopen => fixed
2010-09-24 08:43hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/88428c9b2bcc460abe6d1a9a406acee891162216 [^]
2010-09-24 09:15psarobeTag Attached: Regression
2010-09-24 10:10alostaleStatusresolved => new
2010-09-24 10:10alostaleResolutionfixed => open
2010-09-24 10:12alostalefix_in_branchpi =>
2010-09-24 10:12alostaleDescription Updatedbug_revision_view_page.php?rev_id=922#r922
2010-09-24 10:12alostaleStatusnew => scheduled
2010-09-24 10:12alostalefix_in_branch => pi
2010-09-24 10:12alostaleStatusscheduled => resolved
2010-09-24 10:12alostaleResolutionopen => fixed
2010-09-24 10:28alostaleNote Added: 0031339
2010-09-24 12:28hgbotCheckin
2010-09-24 12:28hgbotNote Added: 0031347
2010-09-25 12:36psarobeNote Added: 0031358
2010-09-25 12:36psarobeStatusresolved => closed
2010-09-25 12:36psarobeFixed in Version => 2.50MP22
2010-09-26 00:00anonymoussf_bug_id0 => 3075666
2010-09-29 11:57hudsonbotCheckin
2010-09-29 11:57hudsonbotNote Added: 0031461
2010-09-29 11:57hudsonbotCheckin
2010-09-29 11:57hudsonbotNote Added: 0031463
2010-09-30 11:18alostaleRelationship addedrelated to 0014551

Notes
(0031336)
alostale   
2010-09-24 08:37   
This bug was introduced by issue 0013178 and it is only reproducible in PostgreSQL.


The problem is in the AD_Element_Trl_Trg, in this piece of code:

UPDATE AD_Field_Trl
  SET NAME = coalesce(:NEW.PO_NAME, :new.Name),
      Description = coalesce(:NEW.PO_Description, :new.Description),
      ...

For purchase windows (isSoTrx='N') it tries to set the PO names in the Field_Trl table, in order to leave it empty it sets them only in case they are not empty. The problem is the translation process is setting '' instead of null for empty strings, which in PostgreSQL is not equal to null.
(0031338)
hgbot   
2010-09-24 08:43   
Repository: erp/devel/pi
Changeset: 88428c9b2bcc460abe6d1a9a406acee891162216
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Sep 24 08:42:01 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/88428c9b2bcc460abe6d1a9a406acee891162216 [^]

fixed issue 14689: Tranlation does not work in PG

  Translation process now sets NULL instead of '' for empty strings. This
  makes Oracle, PostgreSQL and edition from UI behave in the same way,
  making also to work properly SQL code expecting null for empty strings.
  This last case was what made the translation to fail in AD_Element_Trl_Trg
  trigger.

---
M src/org/openbravo/erpCommon/ad_forms/TranslationHandler.java
---
(0031339)
alostale   
2010-09-24 10:28   
This does not affect to instances that already had the translation installed in a previous MP and were updated to MP21. For instances that have installed the translation in MP21 it will be required to fix the translation once they are updated to a higher version, there are two possible scenarios:
  *Translation is installed as a single module. The solution consists on deinstalling the translation and installing it again.
  *Translation is installed within a pack or template (for example a localization pack). In this case it is not possible to deinstall just the translation. The solution would be:
    *Execute in DB (using a DB client such as psql or pgAdmin): ''update ad_module set status ='I' where istranslationmodule='Y';''
    *In command line execute from the root directory of Openbravo installation: ''ant apply.module''
(0031347)
hgbot   
2010-09-24 12:28   
Repository: erp/devel/pi
Changeset: 714819270152e18bf7297340e88a09d7701d2007
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Sep 24 12:27:34 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/714819270152e18bf7297340e88a09d7701d2007 [^]

related to issue 14689

  When updating ad_element_trl check for changes in PO* columns, this solves:
    -A change in a PO* column was not propagated to its trl fields if there was
     not also a change in any other column.
    -Reinstalling a language didn't made changes as data is not previously removed,
     so the only change after previos fix was changes in PO* from '' to null

---
M src-db/database/model/triggers/AD_ELEMENT_TRL_TRG.xml
---
(0031358)
psarobe   
2010-09-25 12:36   
Tested in PI. Works fine
(0031461)
hudsonbot   
2010-09-29 11:57   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/88428c9b2bcc [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/51c2c2967221 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18452.obx [^]
(0031463)
hudsonbot   
2010-09-29 11:57   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/714819270152 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/51c2c2967221 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18452.obx [^]