diff --git a/addons/account_facturx/models/ir_actions_report.py b/addons/account_facturx/models/ir_actions_report.py index 9e1d1f179a5..46028f40244 100644 --- a/addons/account_facturx/models/ir_actions_report.py +++ b/addons/account_facturx/models/ir_actions_report.py @@ -13,7 +13,7 @@ class IrActionsReport(models.Model): @api.multi def _post_pdf(self, save_in_attachment, pdf_content=None, res_ids=None): # OVERRIDE - if self.model == 'account.invoice' and (res_ids or len(res_ids) == 1): + if self.model == 'account.invoice' and res_ids and len(res_ids) == 1: invoice = self.env['account.invoice'].browse(res_ids) if invoice.type in ('out_invoice', 'out_refund') and invoice.state != 'draft': xml_content = invoice._export_as_facturx_xml()