Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031760Openbravo ERPE. Translationpublic2015-12-22 09:542015-12-28 18:51
amayavicente 
vmromanos 
highmajorN/A
closedfixed 
5
 
 
vmromanos
Core
No
0031760: [SERQA 455] Some fields cannot be translated in Sales Invoice || Add Payment
Some fields cannot be translated in Sales Invoice || Add Payment. All the parameters have been translates in the same way, in the windows Process Definition and Element (see attached images), however, the fields 'Recieved From' and 'Deposit TO' are not translated.
1. Install the French localization.
2. Login in the backoffice in French and open the Sales Invoice ||Add Payment
SER-QA
related to defect 0030986 closed inigosanchez Openbravo ERP No transalation tab for the 'Process Definition' window. 
blocks defect 0031872 closed amayavicente Openbravo Localizations Some fields cannot be translated in Purchase Invoice || Add Payment 
jpg 5732.JPG (171,707) 2015-12-22 09:55
https://issues.openbravo.com/file_download.php?file_id=8836&type=bug
jpg

jpg 5732_2.JPG (142,387) 2015-12-22 09:55
https://issues.openbravo.com/file_download.php?file_id=8837&type=bug
jpg

jpg 5732_3.JPG (227,932) 2015-12-22 09:55
https://issues.openbravo.com/file_download.php?file_id=8838&type=bug
jpg

diff add-payment-trl.diff (1,638) 2015-12-22 10:38
https://issues.openbravo.com/file_download.php?file_id=8839&type=bug
diff add-payment-trl2.diff (3,722) 2015-12-22 11:03
https://issues.openbravo.com/file_download.php?file_id=8840&type=bug
Issue History
2015-12-22 09:54amayavicenteNew Issue
2015-12-22 09:54amayavicenteAssigned To => platform
2015-12-22 09:54amayavicenteModules => Core
2015-12-22 09:54amayavicenteResolution time => 1451948400
2015-12-22 09:54amayavicenteTriggers an Emergency Pack => No
2015-12-22 09:55amayavicenteTag Attached: SER-QA
2015-12-22 09:55amayavicenteFile Added: 5732.JPG
2015-12-22 09:55amayavicenteFile Added: 5732_2.JPG
2015-12-22 09:55amayavicenteFile Added: 5732_3.JPG
2015-12-22 10:23alostaleNote Added: 0082924
2015-12-22 10:23alostaleAssigned Toplatform => Triage Finance
2015-12-22 10:23inigosanchezIssue Monitored: inigosanchez
2015-12-22 10:26alostaleRelationship addedrelated to 0030986
2015-12-22 10:38alostaleFile Added: add-payment-trl.diff
2015-12-22 10:39alostaleNote Added: 0082925
2015-12-22 11:03alostaleFile Added: add-payment-trl2.diff
2015-12-22 11:04alostaleNote Added: 0082930
2015-12-28 12:07vmromanosStatusnew => scheduled
2015-12-28 12:07vmromanosAssigned ToTriage Finance => vmromanos
2015-12-28 12:10vmromanosNote Added: 0083009
2015-12-28 12:15hgbotCheckin
2015-12-28 12:15hgbotNote Added: 0083010
2015-12-28 12:15hgbotStatusscheduled => resolved
2015-12-28 12:15hgbotResolutionopen => fixed
2015-12-28 12:15hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4f71605143ec1da2f5d80785f891dfbf3b6edd3f [^]
2015-12-28 12:16vmromanosReview Assigned To => vmromanos
2015-12-28 12:16vmromanosNote Added: 0083011
2015-12-28 12:16vmromanosStatusresolved => closed
2015-12-28 18:51hudsonbotCheckin
2015-12-28 18:51hudsonbotNote Added: 0083026
2016-01-13 12:56amayavicenteRelationship addedblocks 0031872

Notes
(0082924)
alostale   
2015-12-22 10:23   
These specific labels is they are overwritten by org.openbravo.advpaymentmngt.actionHandler.AddPaymentReloadLabelsActionHandler when the window is opened based on the context the process is opened from.

The problem is AddPaymentReloadLabelsActionHandler is not taking in consideration translations.
(0082925)
alostale   
2015-12-22 10:39   
Attached proposal for fix (add-payment-trl.diff). There was code to try to get translations, but the query it executed was incorrect.
(0082930)
alostale   
2015-12-22 11:04   
Attached alternative fix which:
-Prevents uneeded query if trl is not installed in the instance
-Removes code duplicities
(0083009)
vmromanos   
2015-12-28 12:10   
Test plan:
1. Install any translation pack
2. Add a new payment from the following windows in en_US:
Purchase Invoice, Sales Invoice, Payment In, Payment Out, Financial Account | Transaction (BP Withdrawal and BP Deposit).
Verify the labels for Business Partner and Financial Account are OK
3. Change the language
4. Add a new payment from the following windows in the new language:
Purchase Invoice, Sales Invoice, Payment In, Payment Out, Financial Account | Transaction (BP Withdrawal and BP Deposit).
Verify the labels for Business Partner and Financial Account are OK and properly translated.

Please note that the translation is taken from the element linked to the process definition parameter
(0083010)
hgbot   
2015-12-28 12:15   
Repository: erp/devel/pi
Changeset: 4f71605143ec1da2f5d80785f891dfbf3b6edd3f
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Mon Dec 28 12:15:18 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/4f71605143ec1da2f5d80785f891dfbf3b6edd3f [^]

Fixed bug 31760: Some labels in Add Payment can't be translated

Solution partially based on ALO's one.
The query for translation was wrongly using the element TRL ID instead of the Application Element ID.
Avoid querying the database when language is en_US

This piece of code is executed from Purchase Invoice, Sales Invoice, Payment In, Payment Out, Financial Account | Transaction, Financial Account | Match Statement. However, only in the Financial Account flows seem to be really useful, so we should think about not running it in the other places.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentReloadLabelsActionHandler.java
---
(0083011)
vmromanos   
2015-12-28 12:16   
Code review + testing OK
(0083026)
hudsonbot   
2015-12-28 18:51   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/45daa25294c6 [^]
Maturity status: Test