From a461eba04c39d68e83fe6109ecc452fb4ce44230 Mon Sep 17 00:00:00 2001
From: Pratima Gupta
Date: Mon, 4 Jun 2018 15:55:30 +0200
Subject: [PATCH] [IMP] project: make email templates bioutifoul
Purpose of this commit is to enhance quality of templates proposed by Odoo
and make them use notification layout when send by emails. Those emails
are cleaner and more up to date compared to other emails.
Including
* reception acknowledgment template is moved from demo to data to ensure
people have a template to copy and use for their stages;
* improve layout of rating request template;
* use notification layout when sending template-based emails;
* rename the admin spam template so that templates are correctly ordered
when viewing them in list;
This commit is related to task ID 51122 (and PR #24052).
---
addons/project/data/project_demo.xml | 14 --
.../data/project_mail_template_data.xml | 153 +++++++++---------
2 files changed, 79 insertions(+), 88 deletions(-)
diff --git a/addons/project/data/project_demo.xml b/addons/project/data/project_demo.xml
index 269fee0efb8..c21509b9e9f 100644
--- a/addons/project/data/project_demo.xml
+++ b/addons/project/data/project_demo.xml
@@ -21,20 +21,6 @@
Usability
-
-
- Task: Reception Acknowledgment
- Reception of ${object.name}
-
-
- Dear ${object.partner_id.name or 'customer'},
-Thank you for your enquiry.
-If you have any questions, please let us know.
-Best regards,
]]>
-
-
-
1
diff --git a/addons/project/data/project_mail_template_data.xml b/addons/project/data/project_mail_template_data.xml
index e3d8f1f5be5..a7d4dcc15f4 100644
--- a/addons/project/data/project_mail_template_data.xml
+++ b/addons/project/data/project_mail_template_data.xml
@@ -3,7 +3,7 @@
- project module install then send email
+ Project: Spam admin after install
Your Odoo Project application
help@odoo.com
${user.email|safe}
@@ -113,87 +113,92 @@
name="send_mail"
eval="[ref('mail_template_data_module_install_project'), ref('base.module_project')]"/>
+
+
+ Task: Reception Acknowledgment
+
+ Reception of ${object.name}
+
+
+
+ Dear ${object.partner_id.name or 'customer'},
+ Thank you for your enquiry.
+ If you have any questions, please let us know.
+
+ Thank you,
+
+
+
+
+
+
+
Task: Rating Request
- ${object.rating_get_rated_partner_id().email or '' | safe}
- ${object.project_id.company_id.name}: Service Rating Request
+ ${object.project_id.company_id.name}: Satisfaction Survey
+ ${('"%s" <%s>' % (object.rating_get_rated_partner_id().name, object.rating_get_rated_partner_id().email) if object.rating_get_rated_partner_id().email else '') | safe}
${object.rating_get_partner_id().id}
-
-
+
+
% set access_token = object.rating_get_access_token()
-
-
-
-
- |
- Satisfaction Survey
- |
-
-
-
-
- |
- Hello,
- Please take a moment to rate our services related to the task "${object.name}"
- assigned to ${object.rating_get_rated_partner_id().name}.
- We appreciate your feedback. It helps us to improve continuously.
- |
-
-
-
-
-
- Tell us how you feel about our service:
-
- (click on one of these smileys)
- |
-
-
- |
-
- |
-
-
- |
- | ${(object.user_id.signature or '')| safe} |
-
-
-
-
- |
- % if object.project_id.rating_status == 'stage':
- This customer survey has been sent because your task has been moved to the stage ${object.stage_id.name}
- % endif
- % if object.project_id.rating_status == 'periodic':
- This customer survey is sent ${object.project_id.rating_status_period} as long as the task is in the ${object.stage_id.name} stage.
- % endif
- Email automatically sent by Odoo Project for ${object.project_id.company_id.name}
- |
-
+ % set partner = object.rating_get_partner_id()
+
+
+
+ Hello ${partner.name},
+ Please take a moment to rate our services related to the task "${object.name}"
+ % if object.rating_get_rated_partner_id().name:
+ assigned to ${object.rating_get_rated_partner_id().name}.
+ % else:
+ .
+ % endif
+ |
+
+
+
+ Tell us how you feel about our service
+ (click on one of these smileys)
+ |
+ |
+
+ |
+
+ |
+
+ We appreciate your feedback. It helps us to improve continuously.
+ % if object.project_id.rating_status == 'stage':
+ This customer survey has been sent because your task has been moved to the stage ${object.stage_id.name}
+ % endif
+ % if object.project_id.rating_status == 'periodic':
+ This customer survey is sent ${object.project_id.rating_status_period} as long as the task is in the ${object.stage_id.name} stage.
+ % endif
+ |
+
-]]>
+
+
+