diff --git a/addons/mail/data/mail_data.xml b/addons/mail/data/mail_data.xml index 2b2f389726b..327c776b987 100644 --- a/addons/mail/data/mail_data.xml +++ b/addons/mail/data/mail_data.xml @@ -83,7 +83,7 @@ % endif % if not ctx.get('button_access') and not ctx.get('button_follow') and not ctx.get('button_unfollow') and ctx.get('model_name'): -

+

About ${ctx['model_name']} % if ctx.get('record_name'): : ${ctx['record_name']} @@ -97,7 +97,7 @@ % if ctx.get('actions'): % for action in ctx['actions']: ${action['title']} - %if len(ctx['actions']) > 1 and loop.index < len(ctx['actions']): + %if cmp(len(ctx['actions']), 1) == 1 and cmp(len(ctx['actions']), loop.index) == 1: | % endif % endfor @@ -113,6 +113,7 @@ using Odoo % endif +

@@ -136,7 +137,7 @@ % if ctx.get('tracking'): % endif @@ -154,7 +155,8 @@ -% endif]]> +% endif +]]> diff --git a/addons/mail/models/mail_template.py b/addons/mail/models/mail_template.py index 19aee797c3b..3117b571ed6 100644 --- a/addons/mail/models/mail_template.py +++ b/addons/mail/models/mail_template.py @@ -77,6 +77,7 @@ try: 'reduce': reduce, 'map': map, 'round': round, + 'cmp': cmp, # dateutil.relativedelta is an old-style class and cannot be directly # instanciated wihtin a jinja2 expression, so a lambda "proxy" is