diff options
| author | Benjamin Frantzen (bfr) <bfr@odoo.com> | 2019-12-18 13:45:38 +0000 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2020-05-08 12:17:20 +0000 |
| commit | e4a4ffb974ccde1842e1b2389450718f8576ad5b (patch) | |
| tree | 6159873058286c65a3a3bfb5a48f2ef5ffbf7565 /addons/website_livechat | |
| parent | f427a38c4e0dcd63d086706ad66a3e5570fbf0aa (diff) | |
[IMP] customer ratings flow improvements
- Rename the 'Use Rating on Project' feature into 'Customer Ratings'
- Rename the 'Set Email Template to Stages' link to 'Set a Rating Email Template on Stages'
- Add an optional list view for the Stages menu
- display warning if the rating_template_id field is set and if one of the selected project_ids doesn't have the rating_status field set to true
- Project form view revamp
- rename the '% on tasks' stat button into 'Customer Satisfaction'
- Remove the 'no option' for the rating frequency field because it is required
- project form : Add a 'Go to Website' stat button
- Project dashboard: remove the 'Customer Ratings' menu item in more
- Ratings page: the 'Last 30 days' filter include ratings from today
- remove the Appointment / Helpdesk Customer Satisfaction / Live Support menu items
TASK ID : 1251
Diffstat (limited to 'addons/website_livechat')
5 files changed, 9 insertions, 13 deletions
diff --git a/addons/website_livechat/data/website_livechat_data.xml b/addons/website_livechat/data/website_livechat_data.xml index 556079a5970..46db5021300 100644 --- a/addons/website_livechat/data/website_livechat_data.xml +++ b/addons/website_livechat/data/website_livechat_data.xml @@ -4,9 +4,5 @@ <record id="website.default_website" model="website"> <field name="channel_id" ref="im_livechat.im_livechat_channel_data"></field> </record> - - <record id="im_livechat.im_livechat_channel_data" model="im_livechat.channel"> - <field name="is_published" eval="True"/> - </record> </data> </odoo> diff --git a/addons/website_livechat/static/tests/tours/website_livechat_common.js b/addons/website_livechat/static/tests/tours/website_livechat_common.js index 446b1fa8fc9..1ec61f700ec 100644 --- a/addons/website_livechat/static/tests/tours/website_livechat_common.js +++ b/addons/website_livechat/static/tests/tours/website_livechat_common.js @@ -132,7 +132,7 @@ var closeStep = [{ var goodRatingStep = [{ content: "Send Good Rating", - trigger: "div.o_livechat_rating_choices > img[data-value=10]", + trigger: "div.o_livechat_rating_choices > img[data-value=5]", }, { content: "Check if feedback has been sent", trigger: "div.o_thread_window_header.feedback_sent", @@ -143,7 +143,7 @@ var goodRatingStep = [{ var okRatingStep = [{ content: "Send ok Rating", - trigger: "div.o_livechat_rating_choices > img[data-value=5]", + trigger: "div.o_livechat_rating_choices > img[data-value=3]", }]; var sadRatingStep = [{ diff --git a/addons/website_livechat/tests/common.py b/addons/website_livechat/tests/common.py index 800dde98b4e..9cc162ff709 100644 --- a/addons/website_livechat/tests/common.py +++ b/addons/website_livechat/tests/common.py @@ -69,7 +69,7 @@ class TestLivechatCommon(tests.TransactionCase): def _send_rating(self, channel, visitor, rating_value, reason=False): channel_messages_count = len(channel.message_ids) - rating_to_emoji = {1: "😞", 5: "😐", 10: "😊"} + rating_to_emoji = {1: "😞", 3: "😐", 5: "😊"} self.opener.post(url=self.send_feedback_url, json={'params': { 'uuid': channel.uuid, 'rate': rating_value, diff --git a/addons/website_livechat/tests/test_livechat_request.py b/addons/website_livechat/tests/test_livechat_request.py index 3e4025e4524..f50780da6a6 100644 --- a/addons/website_livechat/tests/test_livechat_request.py +++ b/addons/website_livechat/tests/test_livechat_request.py @@ -13,7 +13,7 @@ class TestLivechatRequestHttpCase(tests.HttpCase, TestLivechatCommon): # Send first chat request - Open chat from operator side channel_1 = self._common_chat_request_flow() # Visitor Rates the conversation (Good) - self._send_rating(channel_1, self.visitor, 10) + self._send_rating(channel_1, self.visitor, 5) # Operator Re-Send a chat request channel_2 = self._common_chat_request_flow() diff --git a/addons/website_livechat/views/website_livechat.xml b/addons/website_livechat/views/website_livechat.xml index 23c27eadb10..f961e862679 100644 --- a/addons/website_livechat/views/website_livechat.xml +++ b/addons/website_livechat/views/website_livechat.xml @@ -80,7 +80,7 @@ <div class="col-lg-4 d-flex justify-content-end flex-column"> <div class="card bg-success text-white" t-attf-style="height: #{160 + int(percentage['great'])}px;"> <div class="card-body text-center"> - <img src="/rating/static/src/img/rating_10.png" style="height:40px" alt="Happy face"/> + <img src="/rating/static/src/img/rating_5.png" style="height:40px" alt="Happy face"/> </div> <div class="card-body text-center"> <h2 style="margin: 0"> @@ -95,7 +95,7 @@ <div class="col-lg-4 d-flex justify-content-end flex-column"> <div class="card bg-warning text-white" t-attf-style="height: #{160 + int(percentage['okay'])}px;"> <div class="card-body text-center"> - <img src="/rating/static/src/img/rating_5.png" style="height:40px" alt="Neutral face"/> + <img src="/rating/static/src/img/rating_3.png" style="height:40px" alt="Neutral face"/> </div> <div class="card-body text-center"> <h2 style="margin: 0"> @@ -131,7 +131,7 @@ <div> <t t-foreach="ratings" t-as="rating"> <img t-attf-src='/rating/static/src/img/rating_#{int(rating.rating)}.png' t-att-alt="rating.res_name" width="48px" height="48px"/> - <t t-if="(rating_index+1) % 10 == 0"> + <t t-if="(rating_index+1) % 5 == 0"> <br/> </t> </t> @@ -161,11 +161,11 @@ <div class="row"> <t t-if="user.partner_id.id in ratings_per_user"> <div class="col-lg-4 pl-0 pr-0"> - <img t-attf-src='/rating/static/src/img/rating_10.png' alt="Great" width="16px" height="16px"/> + <img t-attf-src='/rating/static/src/img/rating_5.png' alt="Great" width="16px" height="16px"/> <span class="align-middle"><t t-esc="ratings_per_user[user.partner_id.id]['great']"/>%</span> </div> <div class="col-lg-4 pl-0 pr-0"> - <img t-attf-src='/rating/static/src/img/rating_5.png' alt="Okay" width="16px" height="16px"/> + <img t-attf-src='/rating/static/src/img/rating_3.png' alt="Okay" width="16px" height="16px"/> <span class="align-middle"><t t-esc="ratings_per_user[user.partner_id.id]['okay']"/>%</span> </div> <div class="col-lg-4 pl-0 pr-0"> |
