po translations for the same text occurring in different aeroo reports are not loaded
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Aeroo Reports |
New
|
Undecided
|
Unassigned |
Bug Description
If there are 2 or more aeroo reports featuring the same translatable text and a correct po file with translations (e.g.:
#. module: my_module
#: report:
#: report:
msgid "Invoice"
msgstr "<Invoice_
), then only the first report (report1_xml_id) will have its translation imported.
This happens both at normal module update and at manual translations import (from menu Settings > Translations > Import/Export > Import Translation).
=======
Reason:
/server/
When looking for existing translations to match those being imported, variable find_expr considers res_id for comparison only when the record is of type=='model'.
Since aeroo reports should also be compared by res_id, the correct find_expr should be:
find_expr = "irt.lang = ti.lang AND irt.type = ti.type " \
- " AND (ti.type != 'model' OR ti.res_id = irt.res_id) "
+ " AND (ti.type NOT IN ('model','report') OR ti.res_id = irt.res_id) "
I couldn't manage to fix this part of ir_translation.py from inside of my own module (i.e. non-intrusively), so had to introduce this change into the server part.
It would be great if anybody had an idea of how this change could be introduced into the aeroo module, instead of touching the server side. Of course, if this solution is correct.
GitHub bug: https:/
description: | updated |