OdooWiki OCA HUB

Web Widget One2many Tree Line Duplicate

web_widget_one2many_tree_line_duplicate folder_open OCA/web open_in_new
web License: AGPL-3

Allow to add a icon to clone the line.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Adds a clone button to lines in editable list views (including embedded one2many lists) so users can duplicate a line with all its values, including its sub-lines.

This module adds an optional "Duplicate Line Button" column to list views. It is available when the list is an embedded one2many list that allows creating records and the field is configured with the allow_clone option.

  • A clone icon appears on each line; clicking it copies that line and inserts the copy right after the original.
  • Section, subsection and note lines are not duplicable, so no clone icon is shown for them.
  • The copy keeps the original values exactly, including computed values such as subtotals, and also copies the sub-lines of any nested one2many fields, recursively.
  • Values that Odoo would normally recalculate when creating a line (for example a price coming from a product) are preserved as they were on the source line.
  • Users can show or hide the clone column from the optional columns dropdown; the choice is remembered in the browser.

It works purely in the web client and does not add menus, reports, server models or scheduled actions. It only changes how list views behave, so it can be used on any editable list, such as order lines or invoice lines.

Depends on

web

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 6 confirmed, 3 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 19.0

This module works on all one2many tree views. The cloning process doesn't trigger onchange/default calls.

Available Options

  • allow_clone \> Add the icon to clone the line (default: false)

Examples

<field name="order_line" widget="section_and_note_one2many" mode="tree,kanban" options="{'allow_clone': True}" attrs="{'readonly': [('state', 'in', ('done','cancel'))]}">

No verified information in OCA: Installation, Configuration.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.