diff --git a/addons/account/models/ir_actions_report.py b/addons/account/models/ir_actions_report.py index 50312a1bf61..8cf5b086615 100644 --- a/addons/account/models/ir_actions_report.py +++ b/addons/account/models/ir_actions_report.py @@ -49,8 +49,12 @@ class IrActionsReport(models.Model): def _render_qweb_pdf(self, report_ref, res_ids=None, data=None): # Check for reports only available for invoices. + # + append context data with the display_name_in_footer parameter if self._get_report(report_ref).report_name in ('account.report_invoice_with_payments', 'account.report_invoice'): invoices = self.env['account.move'].browse(res_ids) + if self.env['ir.config_parameter'].sudo().get_param('account.display_name_in_footer'): + data = data and dict(data) or {} + data.update({'display_name_in_footer': True}) if any(x.move_type == 'entry' for x in invoices): raise UserError(_("Only invoices could be printed.")) diff --git a/addons/l10n_fr/__manifest__.py b/addons/l10n_fr/__manifest__.py index e59e66ed1e2..072f08f0476 100644 --- a/addons/l10n_fr/__manifest__.py +++ b/addons/l10n_fr/__manifest__.py @@ -35,6 +35,7 @@ configuration of their taxes and fiscal positions manually. ], 'data': [ 'data/account_chart_template_data.xml', + 'data/account_data.xml', 'views/l10n_fr_view.xml', 'data/tax_report_data.xml', 'data/res_country_data.xml', diff --git a/addons/l10n_fr/data/account_data.xml b/addons/l10n_fr/data/account_data.xml new file mode 100644 index 00000000000..33373aaac36 --- /dev/null +++ b/addons/l10n_fr/data/account_data.xml @@ -0,0 +1,9 @@ + + + + + account.display_name_in_footer + True + + + diff --git a/addons/web/views/report_templates.xml b/addons/web/views/report_templates.xml index 5545f7134e9..f1bea053b90 100644 --- a/addons/web/views/report_templates.xml +++ b/addons/web/views/report_templates.xml @@ -333,6 +333,9 @@ of +
+ +
@@ -375,6 +378,9 @@
Page: /
+
+ +
@@ -470,6 +476,9 @@
Page: /
+
+ +