summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Frantzen (bfr) <bfr@odoo.com>2020-12-07 08:28:27 +0000
committerBenjamin Frantzen (bfr) <bfr@odoo.com>2020-12-07 14:10:45 +0000
commite18c3f023d10944b2cea9cd23703529b41ba48d3 (patch)
tree60a2eadec555928058811ae6eb2c55161836302c
parentb68ca9fb1d3f8c0a6346fa1d3d6cce28f4977bbd (diff)
[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#62939 Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
-rw-r--r--addons/account_edi/models/account_move.py2
-rw-r--r--addons/account_edi/views/account_move_views.xml2
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 @@
</xpath>
<xpath expr="//header" position="after">
<div class="alert alert-info" role="alert" style="margin-bottom:0px;"
- attrs="{'invisible': [('edi_web_services_to_process', '=', '')]}">
+ attrs="{'invisible': [('edi_web_services_to_process', '=', False)]}">
<div>The invoice will be sent asynchronously to :
<field name="edi_web_services_to_process" class="oe_inline"/>
</div>