Skip to content

Commit

Permalink
[FIX] account: send several invoices => state sent
Browse files Browse the repository at this point in the history
When we print or post_message of an invoice it is set as sent.

But when we multiprint, we do not use each invoice post_message but
create directly mail.mail then send them in batch.

Thus the invoices are not set as "Sent".

With this change we make a special case.

opw-1910937
closes #28852
  • Loading branch information
nle-odoo committed Nov 21, 2018
1 parent c487d2c commit e6f8ebf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions addons/account/wizard/account_invoice_send.py
Expand Up @@ -49,6 +49,8 @@ def onchange_template_id(self):
def _send_email(self):
if self.is_email:
self.composer_id.send_mail()
if self.env.context.get('mark_invoice_as_sent'):
self.mapped('invoice_ids').write({'sent': True})

@api.multi
def _print_document(self):
Expand Down

0 comments on commit e6f8ebf

Please sign in to comment.