diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2018-12-13 16:31:58 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2018-12-13 17:08:15 +0000 |
| commit | 8373bafbc2a49bca7007ce32e96fb719fd74f1de (patch) | |
| tree | a0dce60dbaf13925c4636f14155b265c785bf299 /addons/base_import_module/tests/test_module/static/src | |
| parent | f69c004795e0a7f32d5c6243cc3d4915cf010bbe (diff) | |
[FIX] account: missing translation
- Install a second language, e.g. French
- Set Parter A language to French
- Create an invoice for A with a date due in the past
- On the partner form view, print the 'Due Payments'
The body of the letter is not translated in French.
Something quite weird appears:
- The corresponding string is exported in the `stock` module
- It is linked to the demo data `stock.res_company_1`, which corresponds
to 'My Company, Chicago'.
Therefore, the translation cannot be found by the corresponding query
generated in `_generate_translated_field` and `_read_from_database`:
```
SELECT "res_company"."id" as "id",COALESCE("res_company__overdue_msg"."value", "res_company"."overdue_msg") as "overdue_msg" FROM "res_company" LEFT JOIN
(SELECT DISTINCT ON (res_id) res_id, value
FROM "ir_translation"
WHERE name='res.company,overdue_msg' AND lang='fr_BE' AND value!=''
ORDER BY res_id, id DESC)
as "res_company__overdue_msg" ON ("res_company"."id" = "res_company__overdue_msg"."res_id")
WHERE "res_company".id = 1 ORDER BY "res_company"."sequence" ,"res_company"."name"
```
Indeed, `res_company.id` is 1, while `res_company__overdue_msg.res_id`
is 3.
The root cause has been solved in v11, to we only export the necessary
term.
opw-1908337
closes odoo/odoo#29525
Diffstat (limited to 'addons/base_import_module/tests/test_module/static/src')
0 files changed, 0 insertions, 0 deletions
