[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.
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
<meta itemprop="name" content="View ${ctx['model_name']}"/>
|
||||
</div>
|
||||
</div>
|
||||
% 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'):
|
||||
<div summary="o_mail_notification" style="padding:0px; width:600px; margin:0 auto; background: #FFFFFF repeat top /100%;color:#777777">
|
||||
<table cellspacing="0" cellpadding="0" style="width:600px; border-collapse:collapse; background:inherit; color:inherit">
|
||||
<tbody><tr>
|
||||
@@ -155,7 +155,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
% 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'):
|
||||
<div style="padding:0px; width:600px; max-width:600px; margin:0 auto; background: #FFFFFF repeat top /100%;color:#777777">
|
||||
% else:
|
||||
<div style="padding:0px; width:600px; max-width:600px; margin:0 auto; background: #FFFFFF repeat top /100%;>
|
||||
|
||||
Reference in New Issue
Block a user