From d01e033c201fd8ab75b97d73fa1f2e98e33a7ad7 Mon Sep 17 00:00:00 2001 From: Andrea Date: Wed, 5 Aug 2020 12:13:03 +0200 Subject: [PATCH] [FIX] translation not loaded --- account_financial_report/__manifest__.py | 2 +- .../i18n/account_financial_report.pot | 5 ++++ account_financial_report/i18n/ar.po | 5 ++++ account_financial_report/i18n/ca.po | 5 ++++ account_financial_report/i18n/de.po | 5 ++++ account_financial_report/i18n/es.po | 5 ++++ account_financial_report/i18n/es_AR.po | 5 ++++ account_financial_report/i18n/fr.po | 5 ++++ account_financial_report/i18n/fr_CH.po | 5 ++++ account_financial_report/i18n/hr.po | 5 ++++ account_financial_report/i18n/hr_HR.po | 5 ++++ account_financial_report/i18n/it.po | 5 ++++ account_financial_report/i18n/ja.po | 5 ++++ account_financial_report/i18n/nl.po | 5 ++++ account_financial_report/i18n/nl_NL.po | 5 ++++ account_financial_report/i18n/pt.po | 5 ++++ account_financial_report/i18n/pt_BR.po | 5 ++++ account_financial_report/i18n/ro.po | 5 ++++ account_financial_report/models/__init__.py | 1 + .../models/ir_actions_report.py | 27 +++++++++++++++++++ .../wizard/aged_partner_balance_wizard.py | 1 + .../wizard/general_ledger_wizard.py | 1 + .../wizard/journal_ledger_wizard.py | 1 + .../wizard/open_items_wizard.py | 1 + .../wizard/trial_balance_wizard.py | 1 + .../wizard/vat_report_wizard.py | 1 + 26 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 account_financial_report/models/ir_actions_report.py diff --git a/account_financial_report/__manifest__.py b/account_financial_report/__manifest__.py index b796d796..ea578d5a 100644 --- a/account_financial_report/__manifest__.py +++ b/account_financial_report/__manifest__.py @@ -5,7 +5,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Account Financial Reports", - "version": "13.0.1.3.0", + "version": "13.0.1.3.1", "category": "Reporting", "summary": "OCA Financial Reports", "author": "Camptocamp SA," diff --git a/account_financial_report/i18n/account_financial_report.pot b/account_financial_report/i18n/account_financial_report.pot index 59b79d9d..e691272c 100644 --- a/account_financial_report/i18n/account_financial_report.pot +++ b/account_financial_report/i18n/account_financial_report.pot @@ -1379,6 +1379,11 @@ msgstr "" msgid "Ref - Label" msgstr "" +#. module: account_financial_report +#: model:ir.model,name:account_financial_report.model_ir_actions_report +msgid "Report Action" +msgstr "" + #. module: account_financial_report #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0 #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0 diff --git a/account_financial_report/i18n/ar.po b/account_financial_report/i18n/ar.po index 1245c030..f62c333d 100644 --- a/account_financial_report/i18n/ar.po +++ b/account_financial_report/i18n/ar.po @@ -1393,6 +1393,11 @@ msgstr "تاريخ الاستحقاق" msgid "Ref - Label" msgstr "" +#. module: account_financial_report +#: model:ir.model,name:account_financial_report.model_ir_actions_report +msgid "Report Action" +msgstr "" + #. module: account_financial_report #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0 #: code:addons/account_financial_report/report/open_items_xlsx.py:0 diff --git a/account_financial_report/i18n/ca.po b/account_financial_report/i18n/ca.po index 31689b51..76ac6c54 100644 --- a/account_financial_report/i18n/ca.po +++ b/account_financial_report/i18n/ca.po @@ -1391,6 +1391,11 @@ msgstr "" msgid "Ref - Label" msgstr "" +#. module: account_financial_report +#: model:ir.model,name:account_financial_report.model_ir_actions_report +msgid "Report Action" +msgstr "" + #. module: account_financial_report #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0 #: code:addons/account_financial_report/report/open_items_xlsx.py:0 diff --git a/account_financial_report/i18n/de.po b/account_financial_report/i18n/de.po index 995f3c52..f24b1634 100644 --- a/account_financial_report/i18n/de.po +++ b/account_financial_report/i18n/de.po @@ -1417,6 +1417,11 @@ msgstr "" msgid "Ref - Label" msgstr "Ref - Titel" +#. module: account_financial_report +#: model:ir.model,name:account_financial_report.model_ir_actions_report +msgid "Report Action" +msgstr "" + #. module: account_financial_report #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0 #: code:addons/account_financial_report/report/open_items_xlsx.py:0 diff --git a/account_financial_report/i18n/es.po b/account_financial_report/i18n/es.po index 880ce4d3..be95c282 100644 --- a/account_financial_report/i18n/es.po +++ b/account_financial_report/i18n/es.po @@ -1400,6 +1400,11 @@ msgstr "" msgid "Ref - Label" msgstr "Ref - Etiqueta" +#. module: account_financial_report +#: model:ir.model,name:account_financial_report.model_ir_actions_report +msgid "Report Action" +msgstr "" + #. module: account_financial_report #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0 #: code:addons/account_financial_report/report/open_items_xlsx.py:0 diff --git a/account_financial_report/i18n/es_AR.po b/account_financial_report/i18n/es_AR.po index 6fe977a3..710902e8 100644 --- a/account_financial_report/i18n/es_AR.po +++ b/account_financial_report/i18n/es_AR.po @@ -1399,6 +1399,11 @@ msgstr "" msgid "Ref - Label" msgstr "Referencia" +#. module: account_financial_report +#: model:ir.model,name:account_financial_report.model_ir_actions_report +msgid "Report Action" +msgstr "" + #. module: account_financial_report #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0 #: code:addons/account_financial_report/report/open_items_xlsx.py:0 diff --git a/account_financial_report/i18n/fr.po b/account_financial_report/i18n/fr.po index 320fc42c..719213b6 100644 --- a/account_financial_report/i18n/fr.po +++ b/account_financial_report/i18n/fr.po @@ -1421,6 +1421,11 @@ msgstr "" msgid "Ref - Label" msgstr "Ref - Libellé" +#. module: account_financial_report +#: model:ir.model,name:account_financial_report.model_ir_actions_report +msgid "Report Action" +msgstr "" + #. module: account_financial_report #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0 #: code:addons/account_financial_report/report/open_items_xlsx.py:0 diff --git a/account_financial_report/i18n/fr_CH.po b/account_financial_report/i18n/fr_CH.po index 997e1366..b8cee139 100644 --- a/account_financial_report/i18n/fr_CH.po +++ b/account_financial_report/i18n/fr_CH.po @@ -1416,6 +1416,11 @@ msgstr "" msgid "Ref - Label" msgstr "Ref - Libellé" +#. module: account_financial_report +#: model:ir.model,name:account_financial_report.model_ir_actions_report +msgid "Report Action" +msgstr "" + #. module: account_financial_report #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0 #: code:addons/account_financial_report/report/open_items_xlsx.py:0 diff --git a/account_financial_report/i18n/hr.po b/account_financial_report/i18n/hr.po index 9c7d1070..19e75e2e 100644 --- a/account_financial_report/i18n/hr.po +++ b/account_financial_report/i18n/hr.po @@ -1366,6 +1366,11 @@ msgstr "" msgid "Ref - Label" msgstr "" +#. module: account_financial_report +#: model:ir.model,name:account_financial_report.model_ir_actions_report +msgid "Report Action" +msgstr "" + #. module: account_financial_report #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0 #: code:addons/account_financial_report/report/open_items_xlsx.py:0 diff --git a/account_financial_report/i18n/hr_HR.po b/account_financial_report/i18n/hr_HR.po index c2714b81..cbfa09e9 100644 --- a/account_financial_report/i18n/hr_HR.po +++ b/account_financial_report/i18n/hr_HR.po @@ -1374,6 +1374,11 @@ msgstr "" msgid "Ref - Label" msgstr "" +#. module: account_financial_report +#: model:ir.model,name:account_financial_report.model_ir_actions_report +msgid "Report Action" +msgstr "" + #. module: account_financial_report #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0 #: code:addons/account_financial_report/report/open_items_xlsx.py:0 diff --git a/account_financial_report/i18n/it.po b/account_financial_report/i18n/it.po index 4c69a45c..d06c5039 100644 --- a/account_financial_report/i18n/it.po +++ b/account_financial_report/i18n/it.po @@ -1417,6 +1417,11 @@ msgstr "" msgid "Ref - Label" msgstr "Rif - Etichetta" +#. module: account_financial_report +#: model:ir.model,name:account_financial_report.model_ir_actions_report +msgid "Report Action" +msgstr "" + #. module: account_financial_report #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0 #: code:addons/account_financial_report/report/open_items_xlsx.py:0 diff --git a/account_financial_report/i18n/ja.po b/account_financial_report/i18n/ja.po index e7514a99..23ae3c62 100644 --- a/account_financial_report/i18n/ja.po +++ b/account_financial_report/i18n/ja.po @@ -1367,6 +1367,11 @@ msgstr "" msgid "Ref - Label" msgstr "" +#. module: account_financial_report +#: model:ir.model,name:account_financial_report.model_ir_actions_report +msgid "Report Action" +msgstr "" + #. module: account_financial_report #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0 #: code:addons/account_financial_report/report/open_items_xlsx.py:0 diff --git a/account_financial_report/i18n/nl.po b/account_financial_report/i18n/nl.po index e6ce42d5..daf5764b 100644 --- a/account_financial_report/i18n/nl.po +++ b/account_financial_report/i18n/nl.po @@ -1431,6 +1431,11 @@ msgstr "" msgid "Ref - Label" msgstr "Ref - Label" +#. module: account_financial_report +#: model:ir.model,name:account_financial_report.model_ir_actions_report +msgid "Report Action" +msgstr "" + #. module: account_financial_report #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0 #: code:addons/account_financial_report/report/open_items_xlsx.py:0 diff --git a/account_financial_report/i18n/nl_NL.po b/account_financial_report/i18n/nl_NL.po index d1c6ce63..23ed9775 100644 --- a/account_financial_report/i18n/nl_NL.po +++ b/account_financial_report/i18n/nl_NL.po @@ -1373,6 +1373,11 @@ msgstr "" msgid "Ref - Label" msgstr "" +#. module: account_financial_report +#: model:ir.model,name:account_financial_report.model_ir_actions_report +msgid "Report Action" +msgstr "" + #. module: account_financial_report #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0 #: code:addons/account_financial_report/report/open_items_xlsx.py:0 diff --git a/account_financial_report/i18n/pt.po b/account_financial_report/i18n/pt.po index d6f3c322..742df40f 100644 --- a/account_financial_report/i18n/pt.po +++ b/account_financial_report/i18n/pt.po @@ -1372,6 +1372,11 @@ msgstr "" msgid "Ref - Label" msgstr "" +#. module: account_financial_report +#: model:ir.model,name:account_financial_report.model_ir_actions_report +msgid "Report Action" +msgstr "" + #. module: account_financial_report #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0 #: code:addons/account_financial_report/report/open_items_xlsx.py:0 diff --git a/account_financial_report/i18n/pt_BR.po b/account_financial_report/i18n/pt_BR.po index 7f1b5d09..0991bae2 100644 --- a/account_financial_report/i18n/pt_BR.po +++ b/account_financial_report/i18n/pt_BR.po @@ -1423,6 +1423,11 @@ msgstr "" msgid "Ref - Label" msgstr "Ref - Rótulo" +#. module: account_financial_report +#: model:ir.model,name:account_financial_report.model_ir_actions_report +msgid "Report Action" +msgstr "" + #. module: account_financial_report #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0 #: code:addons/account_financial_report/report/open_items_xlsx.py:0 diff --git a/account_financial_report/i18n/ro.po b/account_financial_report/i18n/ro.po index 81d513dc..4336a452 100644 --- a/account_financial_report/i18n/ro.po +++ b/account_financial_report/i18n/ro.po @@ -1399,6 +1399,11 @@ msgstr "Sold inițial" msgid "Ref - Label" msgstr "" +#. module: account_financial_report +#: model:ir.model,name:account_financial_report.model_ir_actions_report +msgid "Report Action" +msgstr "" + #. module: account_financial_report #: code:addons/account_financial_report/report/aged_partner_balance_xlsx.py:0 #: code:addons/account_financial_report/report/open_items_xlsx.py:0 diff --git a/account_financial_report/models/__init__.py b/account_financial_report/models/__init__.py index b5fef1fe..789507c9 100644 --- a/account_financial_report/models/__init__.py +++ b/account_financial_report/models/__init__.py @@ -1,3 +1,4 @@ from . import account from . import account_group from . import account_move_line +from . import ir_actions_report diff --git a/account_financial_report/models/ir_actions_report.py b/account_financial_report/models/ir_actions_report.py new file mode 100644 index 00000000..83c1435b --- /dev/null +++ b/account_financial_report/models/ir_actions_report.py @@ -0,0 +1,27 @@ +# Copyright 2020 Onestein () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import api, models + + +class IrActionsReport(models.Model): + _inherit = "ir.actions.report" + + @api.model + def _prepare_account_financial_report_context(self, data): + lang = data.get("account_financial_report_lang") + return dict(self.env.context or {}, lang=lang) if lang else self.env.context + + @api.model + def render_qweb_html(self, docids, data=None): + return super( + IrActionsReport, + self.with_context(self._prepare_account_financial_report_context(data)), + ).render_qweb_html(docids, data) + + @api.model + def render_xlsx(self, docids, data): + return super( + IrActionsReport, + self.with_context(self._prepare_account_financial_report_context(data)), + ).render_xlsx(docids, data) diff --git a/account_financial_report/wizard/aged_partner_balance_wizard.py b/account_financial_report/wizard/aged_partner_balance_wizard.py index c609a820..fd33abdd 100644 --- a/account_financial_report/wizard/aged_partner_balance_wizard.py +++ b/account_financial_report/wizard/aged_partner_balance_wizard.py @@ -159,6 +159,7 @@ class AgedPartnerBalanceWizard(models.TransientModel): "account_ids": self.account_ids.ids, "partner_ids": self.partner_ids.ids, "show_move_line_details": self.show_move_line_details, + "account_financial_report_lang": self.env.lang, } def _export(self, report_type): diff --git a/account_financial_report/wizard/general_ledger_wizard.py b/account_financial_report/wizard/general_ledger_wizard.py index 77382e63..ddf7ea6a 100644 --- a/account_financial_report/wizard/general_ledger_wizard.py +++ b/account_financial_report/wizard/general_ledger_wizard.py @@ -310,6 +310,7 @@ class GeneralLedgerReportWizard(models.TransientModel): "centralize": self.centralize, "fy_start_date": self.fy_start_date, "unaffected_earnings_account": self.unaffected_earnings_account.id, + "account_financial_report_lang": self.env.lang, } def _export(self, report_type): diff --git a/account_financial_report/wizard/journal_ledger_wizard.py b/account_financial_report/wizard/journal_ledger_wizard.py index aaff6a6b..8e077185 100644 --- a/account_financial_report/wizard/journal_ledger_wizard.py +++ b/account_financial_report/wizard/journal_ledger_wizard.py @@ -127,6 +127,7 @@ class JournalLedgerReportWizard(models.TransientModel): "sort_option": self.sort_option, "group_option": self.group_option, "with_account_name": self.with_account_name, + "account_financial_report_lang": self.env.lang, } def _export(self, report_type): diff --git a/account_financial_report/wizard/open_items_wizard.py b/account_financial_report/wizard/open_items_wizard.py index 601da455..2abd23e2 100644 --- a/account_financial_report/wizard/open_items_wizard.py +++ b/account_financial_report/wizard/open_items_wizard.py @@ -183,6 +183,7 @@ class OpenItemsReportWizard(models.TransientModel): "target_move": self.target_move, "account_ids": self.account_ids.ids, "partner_ids": self.partner_ids.ids or [], + "account_financial_report_lang": self.env.lang, } def _export(self, report_type): diff --git a/account_financial_report/wizard/trial_balance_wizard.py b/account_financial_report/wizard/trial_balance_wizard.py index 8061fa4a..ba7288e9 100644 --- a/account_financial_report/wizard/trial_balance_wizard.py +++ b/account_financial_report/wizard/trial_balance_wizard.py @@ -288,6 +288,7 @@ class TrialBalanceReportWizard(models.TransientModel): "hide_parent_hierarchy_level": self.hide_parent_hierarchy_level, "show_partner_details": self.show_partner_details, "unaffected_earnings_account": self.unaffected_earnings_account.id, + "account_financial_report_lang": self.env.lang, } def _export(self, report_type): diff --git a/account_financial_report/wizard/vat_report_wizard.py b/account_financial_report/wizard/vat_report_wizard.py index 0b2771d2..eaa8f9fd 100644 --- a/account_financial_report/wizard/vat_report_wizard.py +++ b/account_financial_report/wizard/vat_report_wizard.py @@ -113,6 +113,7 @@ class VATReportWizard(models.TransientModel): "based_on": self.based_on, "only_posted_moves": self.target_move == "posted", "tax_detail": self.tax_detail, + "account_financial_report_lang": self.env.lang, } def _export(self, report_type):