Skip to main content
iVentureTeam

chatbot_steps_one2many

The steps list in Odoo's chatbot builder. Saving the whole script after every step sounds heavy-handed until you try building a script without it.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 27, 2026Updated September 2, 20265 min read
Technical namechatbot_steps_one2many
Field typesone2many
Viewsform, with an embedded list
Moduleim_livechat, Live Chat and chatbots
Used in core1 occurrence, the chatbot script form in im_livechat
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0
No-code setupNo. It is a builder-specific list widget
Alternativesone2many, question_page_one2many, chatbot_triggering_answers_widget, handle

What the chatbot steps list does

A chatbot script is built one step at a time, and steps refer to each other: a later step can be conditional on an answer given in an earlier one. That only works if the earlier step exists in the database, which means the script has to be saved before the next step can reference it.

Left to the standard behavior, that would mean saving the form between every step, which is tedious and easy to forget. This widget removes the step by saving the whole script itself every time a step is saved.

It also freezes the ordering. The list is meaningful only in sequence order, so sorting by any column is switched off rather than left available to confuse the builder.

What this means for your team

Chatbot builders live or die on how quickly a script can be assembled. Every extra click between steps is multiplied by the number of steps, and a fifteen step script is not unusual. Removing the save is the difference between building one in a sitting and abandoning it half done.

The trade is that the script is committed continuously, so there is no version of the form you can discard wholesale. In a builder that is the right choice, because the work is additive and nobody expects to throw away an hour of it, but it is worth telling a team who expect a draft.

The frozen ordering is a small thing with the same intent. A sorted view of a sequence is not a useful view of it, and offering the sort only invites someone to break their own mental model of the script.

Supported options in Odoo 19

The widget declares no supported options, and neither does the x2many descriptor it spreads: the options dictionary is forwarded to the embedded list as CRUD settings. The controls that matter are attributes on the inner list, shown below and verified against the Odoo 19.0 source.

OptionTypeWhat it does
editablestring (list attribute)Set on the embedded list. Governs inline editing, independently of the forced save on step creation.
createboolean (list attribute)Set on the embedded list. Turning it off removes the add action and with it the forced save.(default: true)
deleteboolean (list attribute)Set on the embedded list. Deletion is untouched by the widget.(default: true)

Neither behavior is configurable. The forced save on each step and the disabled sorting are both written into the widget, with no option to switch either off. If a screen needs one without the other, it needs its own widget.

Working examples

The core usage, trimmed

<field name="script_step_ids"
       widget="chatbot_steps_one2many" nolabel="1">
  <list>
    <field name="sequence" widget="handle"/>
    ...
  </list>
</field>

The handle column is how steps are reordered, since sorting by any column is disabled.

What happens on each step save

# the step is written, then
props.record.save()   # the whole script

Which is what lets the next step reference the one just added.

The ordinary child list

<field name="script_step_ids">
  <list> ... </list>
</field>

Sortable columns and no automatic save, which means saving the script by hand between steps.

Saving the script so the next step can reference this one

The widget has two parts and each is small.

The renderer subclass walks the field definitions when it starts and switches off sorting on every one, with a comment explaining that the list must remain sorted on its sequence at all times. That is a blunter approach than declaring the columns unsortable in the view, and it has the advantage of covering columns added by other modules.

The field component rebuilds the open-record helper so that the save of a step is followed by a save of the enclosing record. It does this by taking the standard create and update helpers, wrapping the create one, and constructing the dialog opener on top of the wrapped pair. The comment above it names the benefit: the user can chain steps without saving the form in between.

Note the asymmetry: the wrapping is applied to the save path and not to the update path, so editing an existing step does not force a script save the same way creating one does.

The last touch is focus. The widget remembers which element had focus before the dialog opened and restores it when the dialog closes, which keeps keyboard-driven building working across a long script.

Version compatibility

VersionStatusNotes
Odoo 20.0Partial / changedNot released. Byte-identical to Odoo 19, though the companion answers widget on the step form is removed.
Odoo 19.0VerifiedVerified against the shipped source. Identical to Odoo 18.
Odoo 18.0VerifiedSame forced save and same disabled sorting.
Odoo 17.0VerifiedSame behavior with older component conventions.
Odoo 16.0VerifiedSame behavior with older component conventions.

Upgrade note. No view change is needed. The widget has existed since Odoo 16 and the Odoo 18 and Odoo 19 files are identical; the earlier versions differ only in component conventions. The companion answers widget on the step form, however, does not survive into the next version, so re-check the step form as a whole.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The development branch is unstable and this may still change; we re-verify the page after release.

Byte-identical. The file on the development branch matches Odoo 19 exactly, including the forced save and the disabled sorting.

Worth knowing alongside it: the answers widget used on the step form is removed on that branch, so the builder as a whole changes even though this widget does not.

Common problems and fixes

SymptomCause and fix
The script saves itself while I am buildingIntended. Saving a step saves the whole script so the next step can reference it. Expected. There is no option to disable it.
Column headers do not sortIntended. Sorting is switched off on every column so the list stays in sequence order. Reorder with the drag handle instead.
Editing an existing step does not save the scriptOnly the create path is wrapped; the update path is not. Save the form if a later step needs the change.
Focus is lost after closing the step dialogThe widget restores it, so a customization has probably overridden the open handler. Keep the focus restoration when overriding.
A step cannot reference an earlier oneThat step was never saved, which normally cannot happen through this widget. Save the script and reopen the step.
Missing widget errorThe live chat module is not installed in that database. Install Live Chat, or use a plain child list.

Chatbot steps list vs the alternatives

WidgetBest forKey difference
chatbot_steps_one2manyChild lists whose rows reference each other and must stay in sequenceSaves the whole parent after each new child, and disables sorting on every column
one2manyChild rows that do not reference each otherSortable columns and no automatic parent save
question_page_one2manyThe same problem in the Survey appAlso forces a parent save, and adds section rendering
chatbot_triggering_answers_widgetThe answers field on a stepA tags field beside this list, not a list itself
handleReordering rowsA single column widget rather than a list

Use a plain child list wherever the rows do not reference each other. The survey questions widget solves the same problem in the same way for a different app, and comparing the two is instructive: both force a parent save, and both do it because their child records form a chain rather than a set.

Frequently asked questions

Why does the whole script save when I add a step?+
So the next step can reference the one you just added. The source comment says exactly that: otherwise the user would have to save the enclosing form between each step addition.
Why can I not sort the columns?+
The renderer switches sorting off on every field when it starts, because the list is only meaningful in its sequence order. Reorder with the drag handle instead.
Does editing a step also save the script?+
No. Only the create path is wrapped, so editing an existing step behaves like an ordinary child list.
Does it support options?+
None of its own. It spreads the x2many descriptor and forwards the options dictionary to the embedded list as CRUD settings.
Does it change in Odoo 20?+
The file is byte-identical on the development branch. What does change is the companion answers widget on the step form, which is removed there.

Chatbot scripts you can build in one sitting

A chatbot only saves work if the script matches how your customers actually ask. We design and build Odoo Live Chat chatbot flows, and the handover rules behind them, on versions 16 through 19.

Book a free consultation

How this page was produced

The disabled sorting with its source comment, the wrapped save path and its comment, and the focus restoration were read from im_livechat_chatbot_steps_one2many.js on the Odoo 19.0 branch, with the usage taken from im_livechat/views/chatbot_script_views.xml. Version coverage comes from comparing the file across the 16.0, 17.0 and 18.0 branches and a byte comparison against the public development branch. Spotted an error? Tell us and we will correct the page.