PURPOSE This commits adds a special step_type on the chatbot.script.steps that allows creating a crm.lead when reaching it. SPECS In addition, we let the end user configure in which crm.team that lead will land upon being created, making it possible to sort your leads based on previous questions. e.g: "In which country do you live" And based on the answer, you assign to a different sales.team. This commit comes with the necessary business code to make this feature work as well as some extra testing methods that ensure it is correctly implemented. Task-2030386 Part-of: odoo/odoo#84000 Co-authored-by: Patrick Hoste <pko@odoo.com> Co-authored-by: Aurélien Warnon <awa@odoo.com>
19 lines
766 B
XML
19 lines
766 B
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo><data>
|
|
|
|
<record id="chatbot_script_view_form" model="ir.ui.view">
|
|
<field name="name">chatbot.script.view.form.inherit.crm.livechat</field>
|
|
<field name="model">chatbot.script</field>
|
|
<field name="inherit_id" ref="im_livechat.chatbot_script_view_form"/>
|
|
<field name="arch" type="xml">
|
|
<div name="button_box" position="inside">
|
|
<button name="action_view_leads" type="object" class="oe_stat_button"
|
|
icon="fa-star" attrs="{'invisible': [('lead_count', '=', 0)]}">
|
|
<field string="Leads" name="lead_count" widget="statinfo" />
|
|
</button>
|
|
</div>
|
|
</field>
|
|
</record>
|
|
|
|
</data></odoo>
|