[FIX] account: send several invoices => state sent
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
This commit is contained in:
@@ -49,6 +49,8 @@ class AccountInvoiceSend(models.TransientModel):
|
||||
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):
|
||||
|
||||
Reference in New Issue
Block a user