Permalink
Browse files

[IMP] sale: Imrpove the Sale order mail template.

Rename the attachment file name.

Restore the option : have the name of the customer who viewed the quotation on the email notification

TaskID: 1920476

closes #30550
  • Loading branch information...
ppr-odoo committed Jan 23, 2019
1 parent 677cdcd commit e5971126ee5920cbfee21cab0fec3263d6def1e4
Showing with 5 additions and 5 deletions.
  1. +1 −1 addons/sale/controllers/portal.py
  2. +4 −4 addons/sale/data/mail_data.xml
@@ -156,7 +156,7 @@ def portal_order_page(self, order_id, report_type=None, access_token=None, messa
# Log only once a day
if order_sudo and request.session.get('view_quote_%s' % order_sudo.id) != now and request.env.user.share and access_token:
request.session['view_quote_%s' % order_sudo.id] = now
body = _('Quotation viewed by customer')
body = _('Quotation viewed by customer %s') % order_sudo.partner_id.name
_message_post_helper(res_model='sale.order', res_id=order_sudo.id, message=body, token=order_sudo.access_token, message_type='notification', subtype="mail.mt_note", partner_ids=order_sudo.user_id.sudo().partner_id.ids)

values = {
@@ -80,11 +80,11 @@
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
% set doc_name = 'quotation' if object.state in ('draft', 'sent') else 'order'
Dear ${object.partner_id.name}
% if object.partner_id.parent_id:
(${object.partner_id.parent_id.name})
Dear ${object.partner_id.name} (${object.partner_id.parent_id.name}),
% else:
Dear ${object.partner_id.name},
% endif
,
<br /><br />
Here is
% if ctx.get('proforma')
@@ -103,7 +103,7 @@
</div>
</field>
<field name="report_template" ref="action_report_saleorder"/>
<field name="report_name">${(object.name or '').replace('/','_')}${object.state == 'draft' and '_draft' or ''}</field>
<field name="report_name">${(object.name or '').replace('/','_')}</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="user_signature" eval="False"/>
<field name="auto_delete" eval="True"/>

0 comments on commit e597112

Please sign in to comment.