Skip to content
Permalink
Browse files

[FIX] website_livechat: fix error when no ratings

  • Loading branch information...
pka-odoo committed Apr 9, 2019
1 parent 7887dd8 commit 8ae49605a974ab3c1e3a27445159abe00eb837be
Showing with 15 additions and 13 deletions.
  1. +15 −13 addons/website_livechat/views/website_livechat.xml
@@ -167,19 +167,21 @@
</h5>
<div class="col-lg-12">
<div class="row">
<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"/>
<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"/>
<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">
<img t-attf-src='/rating/static/src/img/rating_1.png' alt="Bad" width="16px" height="16px"/>
<span class="align-middle"><t t-esc="ratings_per_user[user.partner_id.id]['bad']"/>%</span>
</div>
<t t-if="user.partner_id.id not in ratings_per_user">
<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"/>
<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"/>
<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">
<img t-attf-src='/rating/static/src/img/rating_1.png' alt="Bad" width="16px" height="16px"/>
<span class="align-middle"><t t-esc="ratings_per_user[user.partner_id.id]['bad']"/>%</span>
</div>
</t>
<t t-else="">
<div class="col-lg-12 pl-0 pr-0 o_livechat_no_rating">Not rated yet</div>
</t>
</div>

0 comments on commit 8ae4960

Please sign in to comment.
You can’t perform that action at this time.