From f698ed534193067c31acfeeaa6ea3c2cbc4ca13a Mon Sep 17 00:00:00 2001 From: amoyaux Date: Mon, 13 Feb 2017 15:49:13 +0100 Subject: [PATCH] [FIX][Accounting] Entry chatter "has been created from : empty" When a journal entry is created automatically from an invoice validation, that logs an internal note with the text "This account entry has been created from:". There should be a clickable invoice's reference after but there was only an empty space. The problem come from the method that call the template "message_origin_link" with the selected invoices as arguments. The template use the attributes id, _name and name. But for the invoice object we want to use the number attribute instead of name. The name of an invoice is empty by default and thus is rendered as a blank in the template. This commit modify the template and use the property display_name instead of name. "display_name" use the number for the invoice and is still correct for other object. The invoice name is just a reference and is not required, so if you use the field name of the invoice it can return an empty string. The name_get method returns the invoice id + invoice number and eventualy the invoice name. --- addons/mail/views/mail_templates.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/views/mail_templates.xml b/addons/mail/views/mail_templates.xml index 91f7be41d96..ed840d6bfe1 100644 --- a/addons/mail/views/mail_templates.xml +++ b/addons/mail/views/mail_templates.xml @@ -36,7 +36,7 @@