[FIX] translation not loaded
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from . import account
|
||||
from . import account_group
|
||||
from . import account_move_line
|
||||
from . import ir_actions_report
|
||||
|
||||
27
account_financial_report/models/ir_actions_report.py
Normal file
27
account_financial_report/models/ir_actions_report.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# Copyright 2020 Onestein (<https://www.onestein.eu>)
|
||||
# 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)
|
||||
Reference in New Issue
Block a user