Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Live Chat

Entity: im_livechat.channel.member.history

Compute Method: _compute_rating_id

Inputs Method Outputs
agent_histories = self.filtered(lambda h: h.livechat_member_type in ("agent", "bot"))
(self - agent_histories).rating_id = None
for history in agent_histories:
            history.rating_id = history.channel_id.rating_ids.filtered(
                lambda r: r.rated_partner_id == history.partner_id
            )[:1]

Back to entity