diff options
| author | jat-odoo <jat@openerp.com> | 2016-07-01 13:33:14 +0200 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2016-07-01 14:05:03 +0200 |
| commit | 0b1a27a3c7862bbe511614d05e04db696fcd71d5 (patch) | |
| tree | cc555a78e008fe36c2427adf7eec7b26825fd2cc /addons/rating_project/data/project_data.xml | |
| parent | 5560ac4a04ce21407e019965bc1a943b31e88211 (diff) | |
[REF,IMP] project,project_issue,rating: Handle ratings more efficiently
Purpose:
For our internal project management, we would like to track the customer
satisfaction on the open projects. We send them an email every one or 2
weeks allowing them to give a feedback by clicking on one of 3
smileys: Happy, Average, Angry. They can also put a additional explanation.
We already have something similar which is working on livechat with a
unusable reporting, and on issues but unusable. Our project are managed by tasks.
Specification:
- On the project : Selection fields : (Periodical Rating or Rating on Stage)
+ Fields to choose the period if periodical
- On the stage : email_template_id field.
- IF :
---> Periodical : Send an email to all the customers for the tasks on this stage periodically
---> On Stage : Send an email to the customer's tasks when the task reaches the stage
- That way, it's impossible to send a satisfaction request both periodically and sequentially.
FP request
- Who is the customer : The customer on the task OR the customer on the related sales order
OR the customer on the projet OR nobody
- The last feedback is displayed on the task kanban card (Thumb up, down, or neutral)
- On the project kanban card, the customer satisfaction is displayed. This is the simple
mean of all the previous ratings.
Diffstat (limited to 'addons/rating_project/data/project_data.xml')
| -rw-r--r-- | addons/rating_project/data/project_data.xml | 138 |
1 files changed, 98 insertions, 40 deletions
diff --git a/addons/rating_project/data/project_data.xml b/addons/rating_project/data/project_data.xml index 5fa22af596f..1332a726e39 100644 --- a/addons/rating_project/data/project_data.xml +++ b/addons/rating_project/data/project_data.xml @@ -1,51 +1,109 @@ <?xml version="1.0" encoding="utf-8"?> <openerp> <data> + <record id="ir_cron_rating_project" model="ir.cron"> + <field name="name">Send Customer Rating Forms</field> + <field name="interval_type">days</field> + <field name="numbercall">-1</field> + <field name="model">project.project</field> + <field name="function">_send_rating_all</field> + </record> + + <record id="mt_task_rating" model="mail.message.subtype"> + <field name="name">Task Rating</field> + <field name="res_model">project.task</field> + <field name="default" eval="True"/> + <field name="description">Ratings</field> + </record> + <record id="mt_project_task_rating" model="mail.message.subtype"> + <field name="name">Task Rating</field> + <field name="sequence">14</field> + <field name="res_model">project.project</field> + <field name="default" eval="True"/> + <field name="parent_id" eval="ref('mt_task_rating')"/> + <field name="relation_field">project_id</field> + </record> <record id="rating_project_request_email_template" model="mail.template"> - <field name="name">Rating Project Request</field> - <field name="email_from">${object.rated_partner_id.email or ''}</field> - <field name="subject">${object.res_name}</field> - <field name="model_id" ref="rating.model_rating_rating"/> - <field name="email_to" >${object.partner_id.email}</field> + <field name="name">Task: Rating Request</field> + <field name="email_from">${object.rating_get_rated_partner_id().email or '' | safe}</field> + <field name="subject">${object.project_id.company_id.name}: Service Rating Request</field> + <field name="model_id" ref="project.model_project_task"/> + <field name="partner_to" >${object.rating_get_partner_id().id}</field> <field name="auto_delete" eval="True"/> <field name="body_html"><![CDATA[ -<body> - <div style="max-width:600px; height:auto; margin-left:30px;"> - <div style="margin-left:30px;align=center;"> - Dear ${object.partner_id.name}, - </div><br> - <div style="margin-left:30px;align=center;" width="60%"> - We hope the services provided have met your expectations. - <br>If you have any more questions or comments, do not hesitate to reply to this e-mail. - <br><br>Please, help us to improve ourself by rating the service we provide. - </div><br> - <table style="margin-left:50px;" width="70%"> - <tr> - <td> - <a href="/rating/${object.access_token}/10"> - <img alt="Great" src="rating/static/src/img/rating_10.png" title="It was great"/> - </a> - </td> - <td> - <a href="/rating/${object.access_token}/5"> - <img alt="Okay" src="rating/static/src/img/rating_5.png" title="It was okay"/> - </a> - </td> - <td> - <a href="/rating/${object.access_token}/0"> - <img alt="Bad" src="rating/static/src/img/rating_0.png" title="It wasn't good"/> - </a> - </td> - </tr> - </table><br> - <h4 style="margin-left:30px;font-weight:normal;">Thank you </h4> - <h4 style="margin-left:30px;font-weight:normal;">${object.rated_partner_id.name or ''} </h4> - </div> -</body> - ]]> - </field> +% set access_token = object.rating_get_access_token() +<div style="background:#F0F0F0;color:#515166;padding:10px 0px;font-family:Arial,Helvetica,sans-serif;font-size:14px;"> + <table style="width:600px;margin:5px auto;"> + <tbody> + <tr><td> + <a href="/"><img src="/web/binary/company_logo" style="vertical-align:baseline;max-width:100px;" /></a> + </td><td style="text-align:right;vertical-align:middle;"> + Satisfaction Survey + </td></tr> + </tbody> + </table> + <table style="width:600px;margin:0px auto;background:white;border:1px solid #e1e1e1;"> + <tbody> + <tr><td style="padding:15px 20px 10px 20px;"> + <p>Hello,</p> + <p>Please take a moment to rate our services related to the task "<strong>${object.name}</strong>" + assigned to <strong>${object.rating_get_rated_partner_id().name}</strong>.</p> + <p>We appreciate your feedback. It helps us to improve continuously.</p> + </td></tr> + <tr><td style="padding:10px 20px"> + <table style="width:100%;border-top:1px solid #e1e1e1;"> + <tr> + <td style="text-align:center;"> + <h2 style="font-weight:300;font-size:18px;"> + Tell us how you feel about our service + </h2> + </td> + </tr> + <tr> + <td style="padding:10px 10px;"> + <table style="width:100%;text-align:center;"> + <tr> + <td> + <a href="/rating/${access_token}/10"> + <img alt="Great" src="/rating/static/src/img/rating_10.png" title="It was great"/> + </a> + </td> + <td> + <a href="/rating/${access_token}/5"> + <img alt="Okay" src="/rating/static/src/img/rating_5.png" title="It was okay"/> + </a> + </td> + <td> + <a href="/rating/${access_token}/1"> + <img alt="Bad" src="/rating/static/src/img/rating_1.png" title="It wasn't good"/> + </a> + </td> + </tr> + </table> + </td> + </tr> + </table> + </td></tr> + <tr><td style="padding:15px 20px 10px 20px;">${object.user_id.signature | safe}</td></tr> + </tbody> + </table> + <table style="width:600px;margin:auto;text-align:center;font-size:12px;"> + <tbody> + <tr><td style="padding-top:10px;color:#afafaf;"> + % if object.project_id.rating_status == 'stage': + <p>This customer survey has been sent because your task has been moved to the stage <b>${object.stage_id.name}</b></p> + % endif + % if object.project_id.rating_status == 'periodic': + <p>This customer survey has been sent <b>${object.project_id.rating_status_period}</b> as long as the task is in the <b>${object.stage_id.name}</b> stage. + % endif + <p>Email automatically sent by <a href="https://www.odoo.com/page/project-management" style="color:#a24689;text-decoration:none;">Odoo Project</a> for <a href="${object.project_id.company_id.website}" style="color:#a24689;text-decoration:none;">${object.project_id.company_id.name}</a></p> + </td></tr> + </tbody> + </table> +</div> +]]></field> </record> </data> </openerp> |
