-
- Downloads
[FIX] crm_livechat: do not set public user partner as lead customer usign /lead command
When chatting with visitors, operator may use /lead command to directly create a lead from discussion. That way commercial discussion can follow visitors inquiries. Anonymous (public) users may be part of channels, notably since f5fe11cf. In that case we don't want new leads to be associated with those users. Indeed * they are not real users, just technical users for website / frontend; * merge processes may think all leads having public users as customer are duplicates and should be merged, which means loosing information and leads; We therefore set the following heuristics * if a public user is member of a channel -> consider this is a livechat with an anonymous and set customer_id to False; * otherwise try to find a share partner in channel members and link the lead to that partner; Task ID-2389564 closes odoo/odoo#62006 Signed-off-by:Thibault Delavallee (tde) <tde@openerp.com>
Showing
- addons/crm_livechat/models/mail_channel.py 19 additions, 3 deletionsaddons/crm_livechat/models/mail_channel.py
- addons/crm_livechat/tests/__init__.py 4 additions, 0 deletionsaddons/crm_livechat/tests/__init__.py
- addons/crm_livechat/tests/test_crm_lead.py 77 additions, 0 deletionsaddons/crm_livechat/tests/test_crm_lead.py
addons/crm_livechat/tests/__init__.py
0 → 100644
addons/crm_livechat/tests/test_crm_lead.py
0 → 100644
Please register or sign in to comment