[FIX] purchase: complete c410911a and revert part of 60aa759

is_recurring_document is removed after revert of 76427541 in c410911ad
This commit is contained in:
Nicolas Lempereur
2018-03-05 22:53:38 +01:00
parent 3de9d443c7
commit bc66da2dfa
+1 -1
View File
@@ -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 and not invoice.is_recurring_document:
if purchase and not invoice.refund_invoice_id:
message = _("This vendor bill has been created from: %s") % (",".join(["<a href=# data-oe-model=purchase.order data-oe-id="+str(order.id)+">"+order.name+"</a>" for order in purchase]))
invoice.message_post(body=message)
return invoice