Task #1919871 Purpose ======= The method 'get_mail_channel' in the 'im_livechat.channel' model used a simple random.choice in the available users to select the operator. It was improved to select the operator that has the lowest number of active livechats. If multiple operators share the same number (lowest) of active livechats, it selects randomly between those. A livechat is considered 'active' if it has at least one message within the last hour. Spec ======= The assignation method should always give the new conversation to the operator who has the less active conversation. If two operators have the same amout of active conversation, it should chose one of them randomly.
5 lines
136 B
Python
5 lines
136 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from . import test_get_mail_channel
|