diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index c401ed93108..efbb103ccf3 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -509,7 +509,7 @@ class AccountInvoice(models.Model): 'is_recurring_document': True, }) # set the due date - #invoice._onchange_payment_term_date_invoice() + invoice._onchange_payment_term_date_invoice() link = '%s' % (self.id, self.number) invoice.message_post(body=_('This bill has been generated by %s') % link) return invoice diff --git a/addons/purchase/models/account_invoice.py b/addons/purchase/models/account_invoice.py index 4847ddf11ee..fecd7515a39 100644 --- a/addons/purchase/models/account_invoice.py +++ b/addons/purchase/models/account_invoice.py @@ -212,7 +212,7 @@ class AccountInvoice(models.Model): def create(self, vals): invoice = super(AccountInvoice, self).create(vals) purchase = invoice.invoice_line_ids.mapped('purchase_line_id.order_id') - if purchase and not invoice.refund_invoice_id: + if purchase and not invoice.refund_invoice_id and not invoice.is_recurring_document: message = _("This vendor bill has been created from: %s") % (",".join([""+order.name+"" for order in purchase])) invoice.message_post(body=message) return invoice