[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) <ayh@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
This commit is contained in:
Habib (ayh)
2023-06-17 22:02:28 +02:00
parent 860c57e1a7
commit 4e09f0d86e
3 changed files with 7 additions and 2 deletions
+5
View File
@@ -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
@@ -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" },
@@ -148,7 +148,7 @@
</a>
</div>
<div t-if="journal_type == 'sale'">
<widget name="account_file_uploader" linkText="Upload Invoices" btnClass="file_upload_kanban_action_a"/>
<widget name="account_file_uploader" title="Upload Invoices" btnClass="file_upload_kanban_action_a"/>
</div>
</div>