[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
This commit is contained in:
@@ -3307,6 +3307,18 @@ msgstr ""
|
||||
msgid "Day(s) after the invoice date"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:res.company,overdue_msg:base.main_company
|
||||
msgid "Dear Sir/Madam,\n"
|
||||
"\n"
|
||||
"Our records indicate that some payments on your account are still due. Please find details below.\n"
|
||||
"If the amount has already been paid, please disregard this notice. Otherwise, please forward us the total amount stated below.\n"
|
||||
"If you have any queries regarding your account, Please contact us.\n"
|
||||
"\n"
|
||||
"Thank you in advance for your cooperation.\n"
|
||||
"Best Regards,"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: model:ir.model.fields,field_description:account.field_account_move_line_debit
|
||||
#: model:ir.ui.view,arch_db:account.report_financial
|
||||
|
||||
Reference in New Issue
Block a user