From 4e09f0d86efcab3525618d9583309d677f7d64a2 Mon Sep 17 00:00:00 2001 From: "Habib (ayh)" Date: Thu, 15 Jun 2023 16:30:22 +0000 Subject: [PATCH] [FIX] account: term is not translatable The bills upload widget uses a custom attr "linkText". translate.py will only generate terms that are in the TRANSLATED_ATTRS constant, thereby not including these in the po template file. To fix this, the attribute is changed to a recognised attr "title". The JS widget will still recognize linkText, for databases that have not updated the module. Task-3335585 closes odoo/odoo#125516 X-original-commit: 8569ceb101f6dfe5882c33c120b9ed6d76ccf5be Related: odoo/enterprise#42755 Signed-off-by: Habib Ayob (ayh) Signed-off-by: Brice Bartoletti (bib) --- addons/account/i18n/account.pot | 5 +++++ .../static/src/components/bills_upload/bills_upload.js | 2 +- addons/account/views/account_journal_dashboard_view.xml | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index 04ae5a7bb6a..977722a216e 100644 --- a/addons/account/i18n/account.pot +++ b/addons/account/i18n/account.pot @@ -14076,6 +14076,11 @@ msgstr "" msgid "Upload" msgstr "" +#. module: account +#: model_terms:ir.ui.view,arch_db:account.account_journal_dashboard_kanban_view +msgid "Upload Invoices" +msgstr "" + #. module: account #. odoo-python #: code:addons/account/wizard/account_tour_upload_bill.py:0 diff --git a/addons/account/static/src/components/bills_upload/bills_upload.js b/addons/account/static/src/components/bills_upload/bills_upload.js index 8ed65a2a9f1..e6cd0f34590 100644 --- a/addons/account/static/src/components/bills_upload/bills_upload.js +++ b/addons/account/static/src/components/bills_upload/bills_upload.js @@ -80,7 +80,7 @@ export const accountFileUploader = { extractProps: ({ attrs }) => ({ togglerTemplate: attrs.template || "account.JournalUploadLink", btnClass: attrs.btnClass || "", - linkText: attrs.linkText || _lt("Upload"), + linkText: attrs.linkText || attrs.title || _lt("Upload"), //TODO: remove linkText attr in master (not translatable) }), fieldDependencies: [ { name: "id", type: "integer" }, diff --git a/addons/account/views/account_journal_dashboard_view.xml b/addons/account/views/account_journal_dashboard_view.xml index b3867efd220..924eba2b989 100644 --- a/addons/account/views/account_journal_dashboard_view.xml +++ b/addons/account/views/account_journal_dashboard_view.xml @@ -148,7 +148,7 @@
- +