From f412ff0ceb372fd8a21fd00ef137a0a17816b1b7 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Tue, 15 Dec 2020 13:35:14 +0000 Subject: [PATCH] [FIX] account_edi: hide alert when there are no web services this is more safe way than previously applied in https://github.com/odoo/odoo/pull/62939 because it doesn't require ``-u account_edi`` in cases when it worked correctly, i.e. when _compute_edi_web_services_to_process is called, but computes empty string value. Additionally, it fixes same problem in account.payment model. --- opw-2414500 closes odoo/odoo#63543 X-original-commit: d393467886be1bd356a135e3fdc1ebb304c6614c Signed-off-by: Nicolas Martinelli (nim) Signed-off-by: Ivan Yelizariev // IEL --- addons/account_edi/models/account_move.py | 2 +- addons/account_edi/views/account_move_views.xml | 2 +- addons/account_edi/views/account_payment_views.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/account_edi/models/account_move.py b/addons/account_edi/models/account_move.py index 95b279414cf..46d8e1d67b7 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) or False + move.edi_web_services_to_process = ', '.join(f.name for f in format_web_services) @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 1a0d8f8e7d9..b52ca353e0f 100644 --- a/addons/account_edi/views/account_move_views.xml +++ b/addons/account_edi/views/account_move_views.xml @@ -24,7 +24,7 @@