so_line_create_button
On a billable project task, the Sales Order Item field carries a small plus button. That is so_line_create_button: a many2one that can spawn a whole sales order in a dialog and wire the task to its first service line automatically.
August 24, 2026Updated August 24, 20264 min read
| Technical name | so_line_create_button |
|---|---|
| Field types | many2one (sale.order.line) |
| Views | form (project task and timesheet related forms) |
| Module | sale_project |
| Used in core | 3 occurrences across 2 modules: project task forms in sale_project and sale_timesheet |
| Versions | Odoo 20.0, Odoo 19.0 |
| No-code setup | No. Applied via the widget attribute in view XML |
| Alternatives | so_line_field, many2one, x2many_buttons |
What the SO Line Create button does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
no_open | boolean | Inherited from many2one. Removes the internal link that opens the linked sale order line's form. |
no_create | boolean | Inherited from many2one. Disables creating order lines from the autocomplete. Does not affect the plus button, which creates an order, not a line, through its own dialog. |
no_quick_create | boolean | Inherited from many2one. Removes the type-to-create shortcut in the autocomplete while keeping the create and edit dialog. |
no_create_edit | boolean | Inherited from many2one. Removes the create and edit dialog from the autocomplete. |
search_threshold | integer | Inherited from many2one, new in 19.0. Minimum typed characters before the line search runs.(since Odoo 19.0) |
placeholder_field | field name | Inherited from many2one, new in 19.0. Char field on the task whose value becomes the placeholder text.(since Odoo 19.0) |
can_scan_barcode | boolean | Inherited and undocumented: read in the many2one extractProps only. Enables barcode based lookup on mobile. |
create_name_field | field name | Inherited and undocumented: read in the many2one extractProps only. Redirects typed text on quick create to another field. |
The plus button cannot be disabled by an option. It hides itself only when the record is readonly or once sale_line_id is set. To suppress it entirely, use the plain many2one widget instead.
Working examples
The first service line contract and the naming quirk
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. The file moves to the new sale_service module on the development branch; see below. |
| Odoo 19.0 | Verified | Introduced here. Verified against the shipped sale_project source. |
| Odoo 18.0 | Not available | Does not exist. sale_line_id used a plain many2one. |
| Odoo 17.0 | Not available | Does not exist. |
| Odoo 16.0 | Not available | Does not exist. |
New in Odoo 19. On 18 and earlier the task form used a plain many2one for sale_line_id and orders had to be created in the Sales app.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| The plus button is not visible | The record is readonly, or sale_line_id already holds a value; the button renders only for editable empty fields. Clear the field or make the record editable. There is no option to force the button. |
| The order was created but the task field stayed empty | get_first_service_line found no service line: the order built in the dialog contains no service products. Add at least one service product to the order, then set the Sales Order Item manually, or recreate the order with a service line. |
| The dialog opens the wrong sales order form layout | The so_form_view_ref context key on the field decides which form view the dialog loads. Pass the intended view's XML id in so_form_view_ref, as the core task form does. |
| Widget missing after an upgrade to Odoo 20 | The component moved from sale_project to the sale_service module on the development branch. Update custom imports and asset bundles to the new module path once Odoo 20 ships. |
SO Line Create button vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
so_line_create_button | Linking a task to a billable order line, creating the order on the spot | Plus button opens a sale order dialog and auto links the first service line |
| so_line_field | Referencing an existing order line with edit tracking | Flags the record as edited on change instead of creating orders |
| many2one | A plain reference to an order line | No creation flow beyond the standard quick create |
| x2many_buttons | Jumping to a handful of related documents | Renders links to existing records, creates nothing |
Frequently asked questions
What exactly does the plus button on the Sales Order Item field create?+
Why is the new order's salesperson me?+
Can I use so_line_create_button on my own model?+
Is so_line_create_button available on Odoo 18?+
Billing services from projects still a copy paste job?
Task to order linking, timesheet billing rules and service products that invoice correctly need the sale, project and timesheet apps wired together properly. We implement end to end services billing on Odoo, from quote templates to the exact widgets your PMs click.
Automate your services billing