Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -60,14 +60,15 @@ addon | version | maintainers | summary
[web_theme_classic](web_theme_classic/) | 18.0.1.1.0 | <a href='https://github.com/legalsylvain'><img src='https://github.com/legalsylvain.png' width='32' height='32' style='border-radius:50%;' alt='legalsylvain'/></a> | Contrasted style on fields to improve the UI.
[web_timeline](web_timeline/) | 18.0.1.0.1 | <a href='https://github.com/tarteo'><img src='https://github.com/tarteo.png' width='32' height='32' style='border-radius:50%;' alt='tarteo'/></a> | Interactive visualization chart to show events in time
[web_touchscreen](web_touchscreen/) | 18.0.1.0.0 | <a href='https://github.com/yajo'><img src='https://github.com/yajo.png' width='32' height='32' style='border-radius:50%;' alt='yajo'/></a> <a href='https://github.com/rafaelbn'><img src='https://github.com/rafaelbn.png' width='32' height='32' style='border-radius:50%;' alt='rafaelbn'/></a> | 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 | <a href='https://github.com/LoisRForgeFlow'><img src='https://github.com/LoisRForgeFlow.png' width='32' height='32' style='border-radius:50%;' alt='LoisRForgeFlow'/></a> <a href='https://github.com/JasminSForgeFlow'><img src='https://github.com/JasminSForgeFlow.png' width='32' height='32' style='border-radius:50%;' alt='JasminSForgeFlow'/></a> | This widget allows to display charts using Bokeh library.
[web_widget_domain_editor_dialog](web_widget_domain_editor_dialog/) | 18.0.1.0.0 | | Recovers the Domain Editor Dialog functionality
[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 | <a href='https://github.com/JordiBForgeFlow'><img src='https://github.com/JordiBForgeFlow.png' width='32' height='32' style='border-radius:50%;' alt='JordiBForgeFlow'/></a> <a href='https://github.com/ThiagoMForgeFlow'><img src='https://github.com/ThiagoMForgeFlow.png' width='32' height='32' style='border-radius:50%;' alt='ThiagoMForgeFlow'/></a> | This widget allows to display charts using MPLD3 library.
[web_widget_numeric_step](web_widget_numeric_step/) | 18.0.1.0.2 | <a href='https://github.com/rafaelbn'><img src='https://github.com/rafaelbn.png' width='32' height='32' style='border-radius:50%;' alt='rafaelbn'/></a> <a href='https://github.com/yajo'><img src='https://github.com/yajo.png' width='32' height='32' style='border-radius:50%;' alt='yajo'/></a> | 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 | <a href='https://github.com/ivantodorovich'><img src='https://github.com/ivantodorovich.png' width='32' height='32' style='border-radius:50%;' alt='ivantodorovich'/></a> | 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.
Expand Down
3 changes: 2 additions & 1 deletion setup/_metapackage/pyproject.toml
Original file line number Diff line number Diff line change
@@ -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.*",
Expand Down Expand Up @@ -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.*",
Expand Down
2 changes: 1 addition & 1 deletion web_form_banner/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion web_form_banner/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion web_form_banner/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ <h1>Web Form Banner</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1906dbf6835e99a279704d8927db5c2e74b3583721880d44069dc0e1f9cfe84c
!! source digest: sha256:e717dbf8e121cc9ae1a93ad095f7d6a3d3a0219dbbb41e7292c39b58cb2eb653
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/18.0/web_form_banner"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_form_banner"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>The module adds configurable banners for backend <strong>form</strong> views. Define
Expand Down
40 changes: 27 additions & 13 deletions web_form_banner/static/src/js/web_form_banner.esm.js
Original file line number Diff line number Diff line change
@@ -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;
};
Expand All @@ -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 = {};
Expand Down Expand Up @@ -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);
Expand All @@ -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) {
Expand Down Expand Up @@ -164,7 +176,9 @@ patch(Record.prototype, {
const ctrl = this.model.__controller;
if (ctrl) tick(ctrl);
}
} catch {}
} catch {
// Ignore
}
return res;
},
});
95 changes: 95 additions & 0 deletions web_tree_column_keyboard_resize/README.rst
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/OCA/web/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 <https://github.com/OCA/web/issues/new?body=module:%20web_tree_column_keyboard_resize%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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 <https://github.com/OCA/web/tree/18.0/web_tree_column_keyboard_resize>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions web_tree_column_keyboard_resize/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright 2026 ForgeFlow (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
18 changes: 18 additions & 0 deletions web_tree_column_keyboard_resize/__manifest__.py
Original file line number Diff line number Diff line change
@@ -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",
],
},
}
14 changes: 14 additions & 0 deletions web_tree_column_keyboard_resize/i18n/it.po
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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"
3 changes: 3 additions & 0 deletions web_tree_column_keyboard_resize/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions web_tree_column_keyboard_resize/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Laura Cazorla <laura.cazorla@forgeflow.com>
14 changes: 14 additions & 0 deletions web_tree_column_keyboard_resize/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading