From c70e2a5777263d5e29430ffa7fa4519cfaff3048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 19 Jul 2016 16:01:14 +0200 Subject: [PATCH] [FIX] mail: display access button on discussion emails if recipient can see the document Currently no access button is displayed if the email is a discussion and has no contextual actions like creating a new document, or setting the responsible of the document. However it leads to emails being sent without access button. This can be extremely frustrating and make the notification email quite impossible to use efficiently. With this commit when an user has access to a document the link to the document is always displayed in the notification email. --- addons/mail/data/mail_data.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mail/data/mail_data.xml b/addons/mail/data/mail_data.xml index 44fd815a279..fa62d092b70 100644 --- a/addons/mail/data/mail_data.xml +++ b/addons/mail/data/mail_data.xml @@ -69,7 +69,7 @@ -% if not ctx['is_discussion'] or not len(ctx['actions']) == 0 or ctx.get('is_accessible'): +% if not ctx['is_discussion'] or not len(ctx['actions']) == 0 or ctx.get('button_access') or ctx.get('is_accessible'):
@@ -155,7 +155,7 @@
-% if not ctx['is_discussion'] or not len(ctx['actions']) == 0: +% if not ctx['is_discussion'] or not len(ctx['actions']) == 0 or ctx.get('button_access'):
% else: