Skip to content
Permalink
Browse files

[FIX] snailmail_account: send multiple invoices

* Ensure compute always sets partner_id.
* Don't show "to" when partner_id is not set
  • Loading branch information...
Feyensv committed Oct 9, 2019
1 parent 4ad7a99 commit 4bd482fd15afb667b1d6afd82cd2f60c49f18ef9
@@ -25,6 +25,7 @@ def _compute_invalid_addresses(self):

@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
@@ -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>

0 comments on commit 4bd482f

Please sign in to comment.
You can’t perform that action at this time.