From 8cb4252d443b3d67a677b6b6be4f3e945f3bb6b3 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Sun, 17 Jul 2016 23:49:23 +0200 Subject: [PATCH] [IMP] sale: better email template for quotations --- addons/account/data/invoice_action_data.xml | 2 +- addons/sale/data/mail_template_data.xml | 107 ++++++++++++++++++-- 2 files changed, 97 insertions(+), 12 deletions(-) diff --git a/addons/account/data/invoice_action_data.xml b/addons/account/data/invoice_action_data.xml index 42650f07380..1d21ab4dbf7 100644 --- a/addons/account/data/invoice_action_data.xml +++ b/addons/account/data/invoice_action_data.xml @@ -34,7 +34,7 @@ from ${object.company_id.name}.

- View Invoice + View Invoice


diff --git a/addons/sale/data/mail_template_data.xml b/addons/sale/data/mail_template_data.xml index f7dde926e0a..23742e2ee26 100644 --- a/addons/sale/data/mail_template_data.xml +++ b/addons/sale/data/mail_template_data.xml @@ -19,14 +19,12 @@ % set is_online = access_action and access_action['type'] == 'ir.actions.act_url' % set access_name = is_online and object.template_id and 'Accept and pay %s online' % doc_name or 'View %s' % doc_name % set access_url = is_online and access_action['url'] or object.get_signup_url() -

Dear -% if object.partner_id.is_company and object.child_ids: - ${object.partner_id.child_ids[0].name} -% else : - ${object.partner_id.name} +

Dear ${object.partner_id.name} +% if object.partner_id.parent_id: + (${object.partner_id.parent_id.name}) % endif ,

-

Thank you for your inquiry.
+

Here is your ${doc_name} ${object.name} % if object.origin: (with reference: ${object.origin} ) @@ -35,16 +33,103 @@ amounting in ${object.amount_total} ${object.pricelist_id.currency_id.na from ${object.company_id.name}.

-

- ${access_name} -

-

If you have any question, do not hesitate to contact us.

-

Best regards,

+

+
+ ${access_name} +

+ (or view attached PDF) +
+
+ +

You can reply to this email if you have any questions.

+

Thank you,

+ +

% if object.user_id and object.user_id.signature: ${object.user_id.signature | safe} % endif +

]]> + + + Sale Order Notification Email + ${object.subject} + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + ${object.record_name} + + + ${user.company_id.name} +
+
+ + + + +
+ ${object.body | safe} +
+
+ + + + + +
+ ${user.company_id.name}
+ ${user.company_id.phone or ''} +
+ % if user.company_id.email: + ${user.company_id.email}
+ % endif + % if user.company_id.website: + + ${user.company_id.website} + + % endif +
+
+ Powered by Odoo. +
+ + + ]]>
+
+ +