From 8373bafbc2a49bca7007ce32e96fb719fd74f1de Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 13 Dec 2018 16:31:58 +0000 Subject: [PATCH] [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 --- addons/account/i18n/account.pot | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index 657f2638631..bd43c3cf608 100644 --- a/addons/account/i18n/account.pot +++ b/addons/account/i18n/account.pot @@ -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