This commit ports the custom implementation of the view form for the chatbot
scripts to the new OWL framework.
The goal is the same as the base customization, which is mainly to correctly
assign a sequence to every step and save the form in-between every new steps.
This is necessary to allow the end-user to easily configure its script, since
steps can depend on each other.
More details in https://github.com/odoo/odoo/pull/84000
In addition, we slightly adapt the CRM bridge to enable no_open for the sales
team field.
This avoids issues when the user tries to open modals on top of modals.
Task-2981969
closesodoo/odoo#100940
X-original-commit: 68d5da02642d22551603e4c6b5583755b2f4fc2d
Related: odoo/enterprise#31688
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
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>