diff --git a/README.md b/README.md
index 5dc5004599de..a7b76e81c36f 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@ addon | version | maintainers | summary
[web_excel_export_dynamic_expand](web_excel_export_dynamic_expand/) | 18.0.1.0.0 | | Export collapsed groups or the full tree, based on its view.
[web_favicon](web_favicon/) | 18.0.1.0.0 | | Allows to set a custom shortcut icon (aka favicon)
[web_filter_header_button](web_filter_header_button/) | 18.0.1.0.0 | | Show selected filters as buttons in the control panel
-[web_form_banner](web_form_banner/) | 18.0.1.0.0 | | Web Form Banner
+[web_form_banner](web_form_banner/) | 18.0.1.0.1 | | Web Form Banner
[web_group_expand](web_group_expand/) | 18.0.1.0.1 | | Group Expand Buttons
[web_ir_actions_act_multi](web_ir_actions_act_multi/) | 18.0.1.0.0 | | Enables triggering of more than one action on ActionManager
[web_ir_actions_act_window_message](web_ir_actions_act_window_message/) | 18.0.1.0.1 | | Show a message box to users
@@ -60,6 +60,7 @@ addon | version | maintainers | summary
[web_theme_classic](web_theme_classic/) | 18.0.1.1.0 |
| Contrasted style on fields to improve the UI.
[web_timeline](web_timeline/) | 18.0.1.0.1 |
| Interactive visualization chart to show events in time
[web_touchscreen](web_touchscreen/) | 18.0.1.0.0 |
| UX improvements for touch screens
+[web_tree_column_keyboard_resize](web_tree_column_keyboard_resize/) | 18.0.1.0.0 | | Allow resizing tree view columns using keyboard shortcuts
[web_tree_dynamic_colored_field](web_tree_dynamic_colored_field/) | 18.0.1.0.1 | | Allows you to dynamically color fields on tree views
[web_tree_many2one_clickable](web_tree_many2one_clickable/) | 18.0.1.0.1 | | Open the linked resource when clicking on their name
[web_widget_bokeh_chart](web_widget_bokeh_chart/) | 18.0.1.0.1 |
| This widget allows to display charts using Bokeh library.
@@ -67,7 +68,7 @@ addon | version | maintainers | summary
[web_widget_dropdown_dynamic](web_widget_dropdown_dynamic/) | 18.0.2.0.0 | | This module adds support for dynamic dropdown widget
[web_widget_mpld3_chart](web_widget_mpld3_chart/) | 18.0.1.0.0 |
| This widget allows to display charts using MPLD3 library.
[web_widget_numeric_step](web_widget_numeric_step/) | 18.0.1.0.2 |
| Web Widget Numeric Step
-[web_widget_one2many_tree_line_duplicate](web_widget_one2many_tree_line_duplicate/) | 18.0.1.0.0 | | Web Widget One2many Tree Line Duplicate
+[web_widget_one2many_tree_line_duplicate](web_widget_one2many_tree_line_duplicate/) | 18.0.1.0.1 | | Web Widget One2many Tree Line Duplicate
[web_widget_open_tab](web_widget_open_tab/) | 18.0.1.0.0 | | Allow to open record from trees on new tab from tree views
[web_widget_popover](web_widget_popover/) | 18.0.1.0.0 |
| Render an icon that displays the field content in a popover
[web_widget_product_label_section_and_note_full_label](web_widget_product_label_section_and_note_full_label/) | 18.0.1.0.0 | | Display the full label in the product_label_section_and_note widget.
diff --git a/setup/_metapackage/pyproject.toml b/setup/_metapackage/pyproject.toml
index 07bd0e740027..903daa751720 100644
--- a/setup/_metapackage/pyproject.toml
+++ b/setup/_metapackage/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "odoo-addons-oca-web"
-version = "18.0.20251230.1"
+version = "18.0.20260115.0"
dependencies = [
"odoo-addon-web_calendar_slot_duration==18.0.*",
"odoo-addon-web_chatter_position==18.0.*",
@@ -41,6 +41,7 @@ dependencies = [
"odoo-addon-web_theme_classic==18.0.*",
"odoo-addon-web_timeline==18.0.*",
"odoo-addon-web_touchscreen==18.0.*",
+ "odoo-addon-web_tree_column_keyboard_resize==18.0.*",
"odoo-addon-web_tree_dynamic_colored_field==18.0.*",
"odoo-addon-web_tree_many2one_clickable==18.0.*",
"odoo-addon-web_widget_bokeh_chart==18.0.*",
diff --git a/web_form_banner/README.rst b/web_form_banner/README.rst
index 54d2f8e456ba..0475d62dffa7 100644
--- a/web_form_banner/README.rst
+++ b/web_form_banner/README.rst
@@ -11,7 +11,7 @@ Web Form Banner
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !! source digest: sha256:1906dbf6835e99a279704d8927db5c2e74b3583721880d44069dc0e1f9cfe84c
+ !! source digest: sha256:e717dbf8e121cc9ae1a93ad095f7d6a3d3a0219dbbb41e7292c39b58cb2eb653
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
diff --git a/web_form_banner/__manifest__.py b/web_form_banner/__manifest__.py
index 5b070aa4ab15..b3e4647c0d58 100644
--- a/web_form_banner/__manifest__.py
+++ b/web_form_banner/__manifest__.py
@@ -2,7 +2,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Web Form Banner",
- "version": "18.0.1.0.0",
+ "version": "18.0.1.0.1",
"category": "Web",
"author": "Quartile, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web",
diff --git a/web_form_banner/static/description/index.html b/web_form_banner/static/description/index.html
index 457e0339ace8..5cca12293168 100644
--- a/web_form_banner/static/description/index.html
+++ b/web_form_banner/static/description/index.html
@@ -372,7 +372,7 @@
Web Form Banner
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!! source digest: sha256:1906dbf6835e99a279704d8927db5c2e74b3583721880d44069dc0e1f9cfe84c
+!! source digest: sha256:e717dbf8e121cc9ae1a93ad095f7d6a3d3a0219dbbb41e7292c39b58cb2eb653
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

The module adds configurable banners for backend form views. Define
diff --git a/web_form_banner/static/src/js/web_form_banner.esm.js b/web_form_banner/static/src/js/web_form_banner.esm.js
index c51144cd2476..8cc076082afc 100644
--- a/web_form_banner/static/src/js/web_form_banner.esm.js
+++ b/web_form_banner/static/src/js/web_form_banner.esm.js
@@ -1,17 +1,18 @@
-/** @odoo-module **/
// Copyright 2025 Quartile (https://www.quartile.co)
// License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-import {patch} from "@web/core/utils/patch";
import {onMounted, onWillUnmount} from "@odoo/owl";
import {FormController} from "@web/views/form/form_controller";
import {Record} from "@web/model/relational_model/record";
+import {patch} from "@web/core/utils/patch";
const recRoot = (c) => (c && c.model && c.model.root) || null;
const childSpan = (el) => {
try {
return (el && el.querySelector(":scope > span")) || null;
- } catch {}
+ } catch {
+ // Ignore
+ }
const f = el && el.firstElementChild;
return f && f.tagName === "SPAN" ? f : null;
};
@@ -22,22 +23,30 @@ const setHtml = (el, html) => {
const safe = async (fn, fb) => {
try {
return await fn();
- } catch {}
+ } catch {
+ // Ignore
+ }
return fb;
};
function normalizeValue(v) {
- if (v === null || v === undefined) return v; // Null/undefined
+ // Null/undefined
+ if (v === null || v === undefined) return v;
const t = typeof v;
if (t === "string" || t === "number" || t === "boolean") return v;
if (Array.isArray(v))
- return v.length === 2 && typeof v[1] === "string" ? v[0] : [...v]; // M2o id or cloned m2m ids
+ // M2o id or cloned m2m ids
+ return v.length === 2 && typeof v[1] === "string" ? v[0] : [...v];
if (t === "object") {
- if (typeof v.res_id === "number") return v.res_id; // M2o snapshot
- if (typeof v.id === "number") return v.id; // M2o env
- if (Array.isArray(v._currentIds)) return [...v._currentIds]; // M2m
+ // M2o snapshot
+ if (typeof v.res_id === "number") return v.res_id;
+ // M2o env
+ if (typeof v.id === "number") return v.id;
+ // M2m
+ if (Array.isArray(v._currentIds)) return [...v._currentIds];
}
- return undefined; // Ignore others (e.g., command lists)
+ // Ignore others (e.g., command lists)
+ return undefined;
}
function shrink(data) {
const out = {};
@@ -77,7 +86,7 @@ async function refreshBanners(ctrl, extraChanges) {
if (!nodes.length) return;
const snap = {...shrink(rec.data), ...shrink(extraChanges)};
const names = triggerNames(ctrl);
- const vals = !rec.resId ? snap : names.length ? sliceBy(snap, names) : {};
+ const vals = rec.resId ? (names.length ? sliceBy(snap, names) : {}) : snap;
const orm = ctrl.env.services.orm;
for (const el of nodes) {
const ruleId = parseInt(el.dataset.ruleId, 10);
@@ -98,7 +107,10 @@ async function refreshBanners(ctrl, extraChanges) {
function scheduleRefresh(ctrl) {
if (ctrl.__wfbSched) return;
ctrl.__wfbSched = true;
- requestAnimationFrame(() => ((ctrl.__wfbSched = false), refreshBanners(ctrl)));
+ requestAnimationFrame(() => {
+ ctrl.__wfbSched = false;
+ refreshBanners(ctrl);
+ });
}
function tick(ctrl) {
@@ -164,7 +176,9 @@ patch(Record.prototype, {
const ctrl = this.model.__controller;
if (ctrl) tick(ctrl);
}
- } catch {}
+ } catch {
+ // Ignore
+ }
return res;
},
});
diff --git a/web_tree_column_keyboard_resize/README.rst b/web_tree_column_keyboard_resize/README.rst
new file mode 100644
index 000000000000..6ca219b39243
--- /dev/null
+++ b/web_tree_column_keyboard_resize/README.rst
@@ -0,0 +1,95 @@
+.. image:: https://odoo-community.org/readme-banner-image
+ :target: https://odoo-community.org/get-involved?utm_source=readme
+ :alt: Odoo Community Association
+
+===============================
+Web Tree Column Keyboard Resize
+===============================
+
+..
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! This file is generated by oca-gen-addon-readme !!
+ !! changes will be overwritten. !!
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! source digest: sha256:04cc56d665b0bc1a36d941d4cc0b1be77a79ed78a7112d861157b2d28ef1afbe
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
+ :target: https://odoo-community.org/page/development-status
+ :alt: Beta
+.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
+ :alt: License: AGPL-3
+.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
+ :target: https://github.com/OCA/web/tree/18.0/web_tree_column_keyboard_resize
+ :alt: OCA/web
+.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
+ :target: https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_tree_column_keyboard_resize
+ :alt: Translate me on Weblate
+.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=18.0
+ :alt: Try me on Runboat
+
+|badge1| |badge2| |badge3| |badge4| |badge5|
+
+This module creates some keyboard shortcuts to allow resizing tree view
+columns when having some cell in the column focused (in edit mode for
+that cell / row). This can improve efficiency, since users don't need to
+reach for the mouse when wanting to resize columns.
+
+The following shortcuts are added:
+
+- By default, the width is adjusted in steps of 20 pixels per key press.
+- ``Shift + Down Arrow``: Decrease the width of the focused column.
+- ``Shift + Up Arrow``: Increase the width of the focused column.
+
+The changed width of columns is reset back to the original once focusing
+out of the current row, since this functionality is designed for
+temporary visibility enhancement during editing sessions and not for
+permanent layout changes. Users can use the standard mouse drag resizing
+for permanent width adjustments.
+
+**Table of contents**
+
+.. contents::
+ :local:
+
+Bug Tracker
+===========
+
+Bugs are tracked on `GitHub Issues `_.
+In case of trouble, please check there if your issue has already been reported.
+If you spotted it first, help us to smash it by providing a detailed and welcomed
+`feedback `_.
+
+Do not contact contributors directly about support or help with technical issues.
+
+Credits
+=======
+
+Authors
+-------
+
+* ForgeFlow
+
+Contributors
+------------
+
+- Laura Cazorla laura.cazorla@forgeflow.com
+
+Maintainers
+-----------
+
+This module is maintained by the OCA.
+
+.. image:: https://odoo-community.org/logo.png
+ :alt: Odoo Community Association
+ :target: https://odoo-community.org
+
+OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
+
+This module is part of the `OCA/web `_ project on GitHub.
+
+You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/web_tree_column_keyboard_resize/__init__.py b/web_tree_column_keyboard_resize/__init__.py
new file mode 100644
index 000000000000..cd4049c1352a
--- /dev/null
+++ b/web_tree_column_keyboard_resize/__init__.py
@@ -0,0 +1,2 @@
+# Copyright 2026 ForgeFlow (https://www.forgeflow.com)
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
diff --git a/web_tree_column_keyboard_resize/__manifest__.py b/web_tree_column_keyboard_resize/__manifest__.py
new file mode 100644
index 000000000000..e0a5e4f0f175
--- /dev/null
+++ b/web_tree_column_keyboard_resize/__manifest__.py
@@ -0,0 +1,18 @@
+# Copyright 2026 ForgeFlow (https://www.forgeflow.com)
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
+
+{
+ "name": "Web Tree Column Keyboard Resize",
+ "summary": "Allow resizing tree view columns using keyboard shortcuts",
+ "version": "18.0.1.0.0",
+ "category": "Extra Tools",
+ "website": "https://github.com/OCA/web",
+ "author": "ForgeFlow, Odoo Community Association (OCA)",
+ "license": "AGPL-3",
+ "depends": ["web"],
+ "assets": {
+ "web.assets_backend": [
+ "web_tree_column_keyboard_resize/static/src/js/list_renderer.esm.js",
+ ],
+ },
+}
diff --git a/web_tree_column_keyboard_resize/i18n/it.po b/web_tree_column_keyboard_resize/i18n/it.po
new file mode 100644
index 000000000000..c0d5085374bd
--- /dev/null
+++ b/web_tree_column_keyboard_resize/i18n/it.po
@@ -0,0 +1,14 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 18.0\n"
+"Report-Msgid-Bugs-To: \n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
diff --git a/web_tree_column_keyboard_resize/i18n/web_tree_column_keyboard_resize.pot b/web_tree_column_keyboard_resize/i18n/web_tree_column_keyboard_resize.pot
new file mode 100644
index 000000000000..aadee09bfeda
--- /dev/null
+++ b/web_tree_column_keyboard_resize/i18n/web_tree_column_keyboard_resize.pot
@@ -0,0 +1,13 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 18.0\n"
+"Report-Msgid-Bugs-To: \n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
diff --git a/web_tree_column_keyboard_resize/pyproject.toml b/web_tree_column_keyboard_resize/pyproject.toml
new file mode 100644
index 000000000000..4231d0cccb3d
--- /dev/null
+++ b/web_tree_column_keyboard_resize/pyproject.toml
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["whool"]
+build-backend = "whool.buildapi"
diff --git a/web_tree_column_keyboard_resize/readme/CONTRIBUTORS.md b/web_tree_column_keyboard_resize/readme/CONTRIBUTORS.md
new file mode 100644
index 000000000000..8510a90fdd21
--- /dev/null
+++ b/web_tree_column_keyboard_resize/readme/CONTRIBUTORS.md
@@ -0,0 +1 @@
+- Laura Cazorla
diff --git a/web_tree_column_keyboard_resize/readme/DESCRIPTION.md b/web_tree_column_keyboard_resize/readme/DESCRIPTION.md
new file mode 100644
index 000000000000..5272a92df78d
--- /dev/null
+++ b/web_tree_column_keyboard_resize/readme/DESCRIPTION.md
@@ -0,0 +1,14 @@
+This module creates some keyboard shortcuts to allow resizing tree view columns
+when having some cell in the column focused (in edit mode for that cell / row).
+This can improve efficiency, since users don't need to reach for the mouse when
+wanting to resize columns.
+
+The following shortcuts are added:
+- By default, the width is adjusted in steps of 20 pixels per key press.
+- `Shift + Down Arrow`: Decrease the width of the focused column.
+- `Shift + Up Arrow`: Increase the width of the focused column.
+
+The changed width of columns is reset back to the original once focusing out of
+the current row, since this functionality is designed for temporary visibility
+enhancement during editing sessions and not for permanent layout changes. Users
+can use the standard mouse drag resizing for permanent width adjustments.
diff --git a/web_tree_column_keyboard_resize/static/description/icon.png b/web_tree_column_keyboard_resize/static/description/icon.png
new file mode 100644
index 000000000000..1dcc49c24f36
Binary files /dev/null and b/web_tree_column_keyboard_resize/static/description/icon.png differ
diff --git a/web_tree_column_keyboard_resize/static/description/index.html b/web_tree_column_keyboard_resize/static/description/index.html
new file mode 100644
index 000000000000..4de1fc63b469
--- /dev/null
+++ b/web_tree_column_keyboard_resize/static/description/index.html
@@ -0,0 +1,443 @@
+
+
+
+
+
+README.rst
+
+
+
+
+
+
+
+
+
+
+
Web Tree Column Keyboard Resize
+
+

+
This module creates some keyboard shortcuts to allow resizing tree view
+columns when having some cell in the column focused (in edit mode for
+that cell / row). This can improve efficiency, since users don’t need to
+reach for the mouse when wanting to resize columns.
+
The following shortcuts are added:
+
+- By default, the width is adjusted in steps of 20 pixels per key press.
+- Shift + Down Arrow: Decrease the width of the focused column.
+- Shift + Up Arrow: Increase the width of the focused column.
+
+
The changed width of columns is reset back to the original once focusing
+out of the current row, since this functionality is designed for
+temporary visibility enhancement during editing sessions and not for
+permanent layout changes. Users can use the standard mouse drag resizing
+for permanent width adjustments.
+
Table of contents
+
+
+
+
Bugs are tracked on GitHub Issues.
+In case of trouble, please check there if your issue has already been reported.
+If you spotted it first, help us to smash it by providing a detailed and welcomed
+feedback.
+
Do not contact contributors directly about support or help with technical issues.
+
+
+
+
+
+
+
+
This module is maintained by the OCA.
+
+
+
+
OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
+
This module is part of the OCA/web project on GitHub.
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
+
+
+
+
+
+
diff --git a/web_tree_column_keyboard_resize/static/src/js/list_renderer.esm.js b/web_tree_column_keyboard_resize/static/src/js/list_renderer.esm.js
new file mode 100644
index 000000000000..da520220e7a5
--- /dev/null
+++ b/web_tree_column_keyboard_resize/static/src/js/list_renderer.esm.js
@@ -0,0 +1,42 @@
+import {ListRenderer} from "@web/views/list/list_renderer";
+import {patch} from "@web/core/utils/patch";
+
+const RESIZE_PIXEL_STEP = 20;
+
+patch(ListRenderer.prototype, {
+ // Handle Shift+Arrow keyboard shortcuts for column resizing
+ onCellKeydownEditMode(hotkey, cell, group, record) {
+ if (hotkey === "shift+arrowup" || hotkey === "shift+arrowdown") {
+ const column = this._getColumnFromCell(cell);
+ if (column?.name && hotkey === "shift+arrowup") {
+ this._expandColumnToContent(column.name, true);
+ return true;
+ } else if (column?.name && hotkey === "shift+arrowdown") {
+ this._expandColumnToContent(column.name, false);
+ return true;
+ }
+ }
+ return super.onCellKeydownEditMode(hotkey, cell, group, record);
+ },
+ // Get column definition from table cell index
+ _getColumnFromCell(cell) {
+ if (!cell || cell.cellIndex === null) {
+ return null;
+ }
+ return this.columns[cell.cellIndex];
+ },
+ // Resize column: expand=true increases width, expand=false decreases width
+ _expandColumnToContent(columnName, expand) {
+ requestAnimationFrame(() => {
+ const table = this.tableRef.el;
+ if (!table) return;
+ // Find the column header by data-name attribute
+ const th = table.querySelector(`th[data-name="${columnName}"]`);
+ if (!th) return;
+ // Calculate new width and apply it to the header
+ const delta = expand ? RESIZE_PIXEL_STEP : -RESIZE_PIXEL_STEP;
+ const width = `${Math.max(th.scrollWidth + delta)}px`;
+ th.style.width = width;
+ });
+ },
+});
diff --git a/web_widget_one2many_tree_line_duplicate/README.rst b/web_widget_one2many_tree_line_duplicate/README.rst
index 52abe11a0966..87c791ca31fa 100644
--- a/web_widget_one2many_tree_line_duplicate/README.rst
+++ b/web_widget_one2many_tree_line_duplicate/README.rst
@@ -11,7 +11,7 @@ Web Widget One2many Tree Line Duplicate
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !! source digest: sha256:1bfdccb56bb56a23188875b884b3ed7f8eaff71397d72a1f8f26e5b270c4a1a1
+ !! source digest: sha256:527e210da9b601737c6f57af72f6a61613789f8ebfd8d8cb3ba43c87a76ec273
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
diff --git a/web_widget_one2many_tree_line_duplicate/__manifest__.py b/web_widget_one2many_tree_line_duplicate/__manifest__.py
index 1c71612be5a4..885ae04fc12d 100644
--- a/web_widget_one2many_tree_line_duplicate/__manifest__.py
+++ b/web_widget_one2many_tree_line_duplicate/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Web Widget One2many Tree Line Duplicate",
"category": "web",
- "version": "18.0.1.0.0",
+ "version": "18.0.1.0.1",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/web",
diff --git a/web_widget_one2many_tree_line_duplicate/i18n/it.po b/web_widget_one2many_tree_line_duplicate/i18n/it.po
index 3e034b36a20d..2513af1eaa2d 100644
--- a/web_widget_one2many_tree_line_duplicate/i18n/it.po
+++ b/web_widget_one2many_tree_line_duplicate/i18n/it.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2024-06-14 17:42+0000\n"
+"PO-Revision-Date: 2026-01-19 13:50+0000\n"
"Last-Translator: mymage \n"
"Language-Team: none\n"
"Language: it\n"
@@ -14,11 +14,16 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.17\n"
+"X-Generator: Weblate 5.15.2\n"
+
+#. module: web_widget_one2many_tree_line_duplicate
+#. odoo-javascript
+#: code:addons/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.xml:0
+msgid "Duplicate Line Button"
+msgstr "Pulsante duplica riga"
#. module: web_widget_one2many_tree_line_duplicate
#. odoo-javascript
#: code:addons/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.xml:0
-#, python-format
msgid "Duplicate row"
msgstr "Duplica riga"
diff --git a/web_widget_one2many_tree_line_duplicate/i18n/web_widget_one2many_tree_line_duplicate.pot b/web_widget_one2many_tree_line_duplicate/i18n/web_widget_one2many_tree_line_duplicate.pot
index 9ac8535e0781..b32b9b24d3c4 100644
--- a/web_widget_one2many_tree_line_duplicate/i18n/web_widget_one2many_tree_line_duplicate.pot
+++ b/web_widget_one2many_tree_line_duplicate/i18n/web_widget_one2many_tree_line_duplicate.pot
@@ -13,6 +13,12 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
+#. module: web_widget_one2many_tree_line_duplicate
+#. odoo-javascript
+#: code:addons/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.xml:0
+msgid "Duplicate Line Button"
+msgstr ""
+
#. module: web_widget_one2many_tree_line_duplicate
#. odoo-javascript
#: code:addons/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.xml:0
diff --git a/web_widget_one2many_tree_line_duplicate/static/description/index.html b/web_widget_one2many_tree_line_duplicate/static/description/index.html
index fa7d993f979f..6de9c1b659bd 100644
--- a/web_widget_one2many_tree_line_duplicate/static/description/index.html
+++ b/web_widget_one2many_tree_line_duplicate/static/description/index.html
@@ -372,7 +372,7 @@ Web Widget One2many Tree Line Duplicate
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!! source digest: sha256:1bfdccb56bb56a23188875b884b3ed7f8eaff71397d72a1f8f26e5b270c4a1a1
+!! source digest: sha256:527e210da9b601737c6f57af72f6a61613789f8ebfd8d8cb3ba43c87a76ec273
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Allow to add a icon to clone the line.
diff --git a/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.esm.js b/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.esm.js
index 34083c4b9425..8311a470df75 100644
--- a/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.esm.js
+++ b/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.esm.js
@@ -3,19 +3,47 @@
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
import {ListRenderer} from "@web/views/list/list_renderer";
+import {onWillRender} from "@odoo/owl";
import {patch} from "@web/core/utils/patch";
import {serializeDate, serializeDateTime} from "@web/core/l10n/dates";
+import {exprToBoolean} from "@web/core/utils/strings";
+import {browser} from "@web/core/browser/browser";
patch(ListRenderer.prototype, {
setup() {
super.setup(...arguments);
const parent = this.__owl__.parent.parent;
- this.displayDuplicateLine =
+ const key = this.createViewKey();
+ this.keyDuplicateLineColumn = `duplicate_line_column,${key}`;
+ this.duplicateLineAllowed =
parent &&
parent.props &&
parent.props.fieldInfo &&
parent.props.fieldInfo.options &&
parent.props.fieldInfo.options.allow_clone;
+ this.displayDuplicateLine =
+ this.duplicateLineAllowed && this.duplicateLineColumn;
+ onWillRender(() => {
+ this.duplicateLineColumn = exprToBoolean(
+ browser.localStorage.getItem(this.keyDuplicateLineColumn),
+ false
+ );
+ this.displayDuplicateLine =
+ this.duplicateLineAllowed && this.duplicateLineColumn;
+ });
+ },
+ toggleDuplicateLineColumn() {
+ this.duplicateLineColumn = !this.duplicateLineColumn;
+ browser.localStorage.setItem(
+ this.keyDuplicateLineColumn,
+ this.duplicateLineColumn
+ );
+ this.displayDuplicateLine =
+ this.duplicateLineAllowed && this.duplicateLineColumn;
+ this.render();
+ },
+ get hasActionsColumn() {
+ return super.hasActionsColumn || Boolean(this.duplicateLineAllowed);
},
async onCloneIconClick(record) {
const toSkip = this.getFieldsToSkip();
diff --git a/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.xml b/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.xml
index daa56a33ce54..7ad14dbc4aa2 100644
--- a/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.xml
+++ b/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.xml
@@ -16,6 +16,33 @@
style="width: 32px; min-width: 32px"
/>
+
+
+
+
+
+
+
+ Duplicate Line Button
+
+
+
+
+
-