summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorVictor Feyens <vfe@odoo.com>2019-10-09 10:40:18 +0000
committerfw-bot <otis@odoo.com>2019-10-10 06:34:13 +0000
commit20c48953f85a00dafb8c23feda84b7ebf58036e3 (patch)
treedd899ba5f9d8d080fc11335dbb9618b6fcc2b104 /addons
parent0f6d2a42caf4b6417690383ca80e39ee9557ef49 (diff)
[FIX] snailmail_account: send multiple invoices
* Ensure compute always sets partner_id. * Don't show "to" when partner_id is not set closes odoo/odoo#38334 X-original-commit: 7e122140b13fce5cf466376fe9fcb631e4b6bd75 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/snailmail_account/wizard/account_invoice_send.py1
-rw-r--r--addons/snailmail_account/wizard/account_invoice_send_views.xml2
2 files changed, 2 insertions, 1 deletions
diff --git a/addons/snailmail_account/wizard/account_invoice_send.py b/addons/snailmail_account/wizard/account_invoice_send.py
index bf6471b76cd..ffdaa2f6a6e 100644
--- a/addons/snailmail_account/wizard/account_invoice_send.py
+++ b/addons/snailmail_account/wizard/account_invoice_send.py
@@ -25,6 +25,7 @@ class AccountInvoiceSend(models.TransientModel):
@api.depends('invoice_ids')
def _get_partner(self):
+ self.partner_id = self.env['res.partner']
for wizard in self:
if wizard.invoice_ids and len(wizard.invoice_ids) == 1:
wizard.partner_id = wizard.invoice_ids.partner_id.id
diff --git a/addons/snailmail_account/wizard/account_invoice_send_views.xml b/addons/snailmail_account/wizard/account_invoice_send_views.xml
index b2efb714bf6..2ff5746b9a8 100644
--- a/addons/snailmail_account/wizard/account_invoice_send_views.xml
+++ b/addons/snailmail_account/wizard/account_invoice_send_views.xml
@@ -23,7 +23,7 @@
<i class="fa fa-info-circle" role="img" aria-label="Warning" title="Make sure you have enough Stamps on your account."/>
)</b>
</span>
- <span attrs="{'invisible': [('composition_mode', '=', 'mass_mail')]}">
+ <span attrs="{'invisible': ['|', ('composition_mode', '=', 'mass_mail'), ('partner_id', '=', False)]}">
<span attrs="{'invisible': [('invalid_addresses', '!=', 0)]}">
<div class="text-right text-muted d-inline-block" name="address">
<span> to: </span>