From cd7a4b0000c88245563506ecfd711f59d130a9b9 Mon Sep 17 00:00:00 2001 From: sbejaoui Date: Mon, 23 Dec 2019 17:01:12 +0100 Subject: [PATCH] [IMP] - Add alink to the invoice in contract message at manual invoicing --- contract/models/contract.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/contract/models/contract.py b/contract/models/contract.py index b648a68f..3ee12bf4 100644 --- a/contract/models/contract.py +++ b/contract/models/contract.py @@ -452,11 +452,15 @@ class ContractContract(models.Model): This method triggers the creation of the next invoices of the contracts even if their next invoicing date is in the future. """ + invoice = self._recurring_create_invoice() self.message_post( - body=_("Manually invoiced. Invoice date: %s") - % self.recurring_next_date + body=_( + 'Contract manually invoiced: ' + 'Invoice' + ) + % (invoice._name, invoice.id) ) - return self._recurring_create_invoice() + return invoice @api.multi def _recurring_create_invoice(self, date_ref=False):