diff --git a/addons/im_livechat/controllers/main.py b/addons/im_livechat/controllers/main.py
index c80630deff3..aa0e7a6a4f2 100644
--- a/addons/im_livechat/controllers/main.py
+++ b/addons/im_livechat/controllers/main.py
@@ -87,6 +87,7 @@ class LivechatController(http.Controller):
# limit the creation : only ONE rating per session
values = {
'rating': rate,
+ 'consumed': True
}
if not channel.rating_ids:
values.update({
diff --git a/addons/im_livechat/report/im_livechat_report_channel_views.xml b/addons/im_livechat/report/im_livechat_report_channel_views.xml
index 9df7cd8ec77..73c31f00299 100644
--- a/addons/im_livechat/report/im_livechat_report_channel_views.xml
+++ b/addons/im_livechat/report/im_livechat_report_channel_views.xml
@@ -58,13 +58,6 @@
Livechat Support Channel Statistics allows you to easily check and analyse your company livechat session performance. Extract information about the missed sessions, the audiance, the duration of a session, etc.
-
-
+
+
+
+ sequence="1"/>
+
+
diff --git a/addons/im_livechat/views/mail_channel_views.xml b/addons/im_livechat/views/mail_channel_views.xml
index edc085c80c8..fc86605a641 100644
--- a/addons/im_livechat/views/mail_channel_views.xml
+++ b/addons/im_livechat/views/mail_channel_views.xml
@@ -27,6 +27,7 @@
+
@@ -108,7 +109,7 @@
Sessions
mail.channel
- list,form
+ tree,form
[('livechat_channel_id', 'in', [active_id])]
{
'search_default_livechat_channel_id': [active_id],
@@ -116,6 +117,20 @@
}
+
+ 1
+ tree
+
+
+
+
+
+ 2
+ form
+
+
+
+
diff --git a/addons/rating/models/rating.py b/addons/rating/models/rating.py
index 9c87139d380..9df19846f77 100644
--- a/addons/rating/models/rating.py
+++ b/addons/rating/models/rating.py
@@ -31,7 +31,7 @@ class Rating(models.Model):
res_id = fields.Integer(string='Document ID', required=True, help="Identifier of the rated object", index=True)
rated_partner_id = fields.Many2one('res.partner', string="Rated Partner", help="Owner of the rated resource")
partner_id = fields.Many2one('res.partner', string='Customer', help="Author of the rating")
- rating = fields.Float(string="Rating", group_operator="avg", default=0, help="Rating value")
+ rating = fields.Float(string="Rating", group_operator="avg", default=0, help="Rating value: 0=Unhappy, 10=Happy")
feedback = fields.Text('Feedback reason', help="Reason of the rating")
message_id = fields.Many2one('mail.message', string="Linked message", help="Associated message when posting a review. Mainly used in website addons.", index=True)
access_token = fields.Char('Security Token', default=new_access_token, help="Access token to set the rating of the value")
@@ -52,7 +52,7 @@ class RatingMixin(models.AbstractModel):
_description = "Rating Mixin"
rating_ids = fields.One2many('rating.rating', 'res_id', string='Rating', domain=lambda self: [('res_model', '=', self._name)])
- rating_last_value = fields.Float('Last Value', related='rating_ids.rating', store=True)
+ rating_last_value = fields.Float('Rating Last Value', related='rating_ids.rating', store=True)
rating_count = fields.Integer('Rating count', compute="_compute_rating_count")
@api.multi