From e1c49246a295183d3a68e5fefd5c9436aaf80ca8 Mon Sep 17 00:00:00 2001 From: "Benjamin Frantzen (bfr)" Date: Mon, 7 Dec 2020 08:28:27 +0000 Subject: [PATCH] [FIX] account_edi: fix 'send now' visibility in account.move form view - Before the fix, the banner with the button would show when the move is posted or in creation mode even though no async edi is associated to this move. closes odoo/odoo#62974 X-original-commit: e18c3f023d10944b2cea9cd23703529b41ba48d3 Signed-off-by: Laurent Smet Signed-off-by: bfr-o --- addons/account_edi/models/account_move.py | 2 +- addons/account_edi/views/account_move_views.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_edi/models/account_move.py b/addons/account_edi/models/account_move.py index 46d8e1d67b7..95b279414cf 100644 --- a/addons/account_edi/models/account_move.py +++ b/addons/account_edi/models/account_move.py @@ -55,7 +55,7 @@ class AccountMove(models.Model): for move in self: to_process = move.edi_document_ids.filtered(lambda d: d.state in ['to_send', 'to_cancel']) format_web_services = to_process.edi_format_id.filtered(lambda f: f._needs_web_services()) - move.edi_web_services_to_process = ', '.join(f.name for f in format_web_services) + move.edi_web_services_to_process = ', '.join(f.name for f in format_web_services) or False @api.depends('restrict_mode_hash_table', 'state') def _compute_show_reset_to_draft_button(self): diff --git a/addons/account_edi/views/account_move_views.xml b/addons/account_edi/views/account_move_views.xml index 498c1a4d7ba..1a0d8f8e7d9 100644 --- a/addons/account_edi/views/account_move_views.xml +++ b/addons/account_edi/views/account_move_views.xml @@ -24,7 +24,7 @@