diff --git a/addons/mail/data/mail_data.xml b/addons/mail/data/mail_data.xml index 3f9d152f389..85cabc28a3c 100644 --- a/addons/mail/data/mail_data.xml +++ b/addons/mail/data/mail_data.xml @@ -60,156 +60,88 @@
- % if ctx.get('button_access'): - % endif
+% endif + % if not ctx['is_discussion'] or not len(ctx['actions']) == 0 or ctx.get('is_accessible'): -
- - - - + + + + + +
- ${user.company_id.name} - -

- % if ctx.get('button_access') or ctx.get('button_follow') or ctx.get('button_unfollow'): - ${ctx['button_access']['title']} - % endif +

+ + + - -
+ % if ctx.get('button_access') or ctx.get('button_follow') or ctx.get('button_unfollow'): + ${ctx['button_access']['title']} + % endif - % if ctx.get('button_follow'): - % if ctx.get('actions'): - | - % endif - ${ctx['button_follow']['title']} - % elif ctx.get('button_unfollow'): - % if ctx.get('actions'): - | - % endif - ${ctx['button_unfollow']['title']} - % endif + % if ctx.get('button_follow'): + % if ctx.get('actions'): + | + % endif + ${ctx['button_follow']['title']} + % elif ctx.get('button_unfollow'): + % if ctx.get('actions'): + | + % endif + ${ctx['button_unfollow']['title']} + % endif - % if ctx.get('actions'): - | - % for action in ctx['actions']: - ${action['title']} - % endfor - % endif -

-
+ % if ctx.get('actions'): + % for action in ctx['actions']: + | + ${action['title']} + % endfor + % endif +
+ ${user.company_id.name} +
+
+ % if ctx.get('subtype') and ctx.get('subtype').internal: + + Internal note: replies are not sent to followers. + + % endif +
-
- - - - -
-
-
-
-
-
-
-% else: -
- - - % if not ctx['is_discussion'] or not len(ctx['actions']) == 0: - - - ${object.body | safe} - % if ctx.get('tracking'): -
    - % for tracking in ctx['tracking'] -
  • ${tracking[0]} : ${tracking[1]} -> ${tracking[2]}
  • - % endfor -
- % endif - - - % else: - - - ${object.body | safe} - % if ctx.get('tracking'): -
    - % for tracking in ctx['tracking'] -
  • ${tracking[0]} : ${tracking[1]} -> ${tracking[2]}
  • - % endfor -
- % endif - - - % endif - - -
-% if not ctx['is_discussion'] or not len(ctx['actions']) == 0: -
-% else: -
- - % if ctx.get('signature'): - % if not ctx['is_discussion'] or not len(ctx['actions']) == 0: - - - ${ctx['signature'] | safe} - - - % else: - - - ${ctx['signature'] | safe} - - - % endif - % endif - % if not ctx['is_discussion'] or not len(ctx['actions']) == 0: - - - Sent by - % if ctx.get('website_url'): - - % endif - ${ctx.get('company_name')} - % if ctx.get('website_url'): - - % endif - using - Odoo - - - % else: - - - Sent by - % if ctx.get('website_url'): - - % endif - ${ctx.get('company_name')} - % if ctx.get('website_url'): - - % endif - using - Odoo - - - % endif - - -
]]> +% if ctx.get('signature'): + ${ctx['signature'] | safe} +% endif +
+

+ Sent by + % if ctx.get('website_url'): + + % endif + ${ctx.get('company_name')} + % if ctx.get('website_url'): + + % endif + using + Odoo. +

+]]> diff --git a/addons/mail/models/res_partner.py b/addons/mail/models/res_partner.py index ae52c976a0f..98aa747fe5e 100644 --- a/addons/mail/models/res_partner.py +++ b/addons/mail/models/res_partner.py @@ -83,6 +83,7 @@ class Partner(models.Model): 'record_name': record_name, 'tracking': tracking, 'is_discussion': is_discussion, + 'subtype': message.subtype_id, 'is_accessible': message._is_accessible() }