diff options
| author | Thomas Beckers <tbs@odoo.com> | 2021-05-10 13:59:41 +0000 |
|---|---|---|
| committer | Thomas Beckers <tbs@odoo.com> | 2021-05-10 13:59:41 +0000 |
| commit | e1659f8a9041d409d0d303a7c12342b2e73675c7 (patch) | |
| tree | 833422cb537e113ff1ea26c18c61d955610c8d70 /addons | |
| parent | 86a2819697d5d9d1c32ba902d8a1089acf6110f2 (diff) | |
[FIX] account_edi_facturx: avoid crash when no edi attachment
When we get the values to embed to pdf, these values can be False if
there is no edi attachment on the account_move so try to assign something
to 'values' will fail.
Now there is a check before assignment.
opw-2526280
closes odoo/odoo#70613
Signed-off-by: Josse Colpaert <jco@openerp.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/account_edi_facturx/models/account_edi_format.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account_edi_facturx/models/account_edi_format.py b/addons/account_edi_facturx/models/account_edi_format.py index 21480f5a1a2..ae0a3f3bf6d 100644 --- a/addons/account_edi_facturx/models/account_edi_format.py +++ b/addons/account_edi_facturx/models/account_edi_format.py @@ -47,7 +47,7 @@ class AccountEdiFormat(models.Model): def _get_embedding_to_invoice_pdf_values(self, invoice): values = super()._get_embedding_to_invoice_pdf_values(invoice) - if self.code == 'facturx_1_0_05': + if values and self.code == 'facturx_1_0_05': values['name'] = 'factur-x.xml' return values |
