Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ addon | version | maintainers | summary
[web_pivot_computed_measure](web_pivot_computed_measure/) | 18.0.1.0.5 | <a href='https://github.com/CarlosRoca13'><img src='https://github.com/CarlosRoca13.png' width='32' height='32' style='border-radius:50%;' alt='CarlosRoca13'/></a> | Web Pivot Computed Measure
[web_quick_start_screen](web_quick_start_screen/) | 18.0.1.0.0 | | Configurable start screen for quick actions
[web_refresher](web_refresher/) | 18.0.1.0.0 | | Web Refresher
[web_remember_tree_column_width](web_remember_tree_column_width/) | 18.0.1.0.1 | <a href='https://github.com/frahikLV'><img src='https://github.com/frahikLV.png' width='32' height='32' style='border-radius:50%;' alt='frahikLV'/></a> <a href='https://github.com/luisg123v'><img src='https://github.com/luisg123v.png' width='32' height='32' style='border-radius:50%;' alt='luisg123v'/></a> <a href='https://github.com/cuongnmtm'><img src='https://github.com/cuongnmtm.png' width='32' height='32' style='border-radius:50%;' alt='cuongnmtm'/></a> | Remember the tree columns' widths across sessions.
[web_remember_tree_column_width](web_remember_tree_column_width/) | 18.0.1.0.2 | <a href='https://github.com/frahikLV'><img src='https://github.com/frahikLV.png' width='32' height='32' style='border-radius:50%;' alt='frahikLV'/></a> <a href='https://github.com/luisg123v'><img src='https://github.com/luisg123v.png' width='32' height='32' style='border-radius:50%;' alt='luisg123v'/></a> <a href='https://github.com/cuongnmtm'><img src='https://github.com/cuongnmtm.png' width='32' height='32' style='border-radius:50%;' alt='cuongnmtm'/></a> | Remember the tree columns' widths across sessions.
[web_responsive](web_responsive/) | 18.0.1.0.2 | <a href='https://github.com/Tardo'><img src='https://github.com/Tardo.png' width='32' height='32' style='border-radius:50%;' alt='Tardo'/></a> <a href='https://github.com/SplashS'><img src='https://github.com/SplashS.png' width='32' height='32' style='border-radius:50%;' alt='SplashS'/></a> | Responsive web client, community-supported
[web_search_with_and](web_search_with_and/) | 18.0.1.0.1 | | Use AND conditions on omnibar search
[web_send_message_popup](web_send_message_popup/) | 18.0.1.0.0 | | Web Send Message as Popup
Expand All @@ -58,6 +58,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 | <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_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_product_label_section_and_note_name_visibility](web_widget_product_label_section_and_note_name_visibility/) | 18.0.1.0.0 | <a href='https://github.com/carlos-lopez-tecnativa'><img src='https://github.com/carlos-lopez-tecnativa.png' width='32' height='32' style='border-radius:50%;' alt='carlos-lopez-tecnativa'/></a> | Alternate the visibility of the product and description.
[web_widget_url_advanced](web_widget_url_advanced/) | 18.0.1.0.0 | | This module extends URL widget for displaying anchors with custom labels.
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.20250917.0"
version = "18.0.20250918.0"
dependencies = [
"odoo-addon-web_calendar_slot_duration==18.0.*",
"odoo-addon-web_chatter_position==18.0.*",
Expand Down Expand Up @@ -39,6 +39,7 @@ dependencies = [
"odoo-addon-web_widget_dropdown_dynamic==18.0.*",
"odoo-addon-web_widget_mpld3_chart==18.0.*",
"odoo-addon-web_widget_numeric_step==18.0.*",
"odoo-addon-web_widget_one2many_tree_line_duplicate==18.0.*",
"odoo-addon-web_widget_open_tab==18.0.*",
"odoo-addon-web_widget_product_label_section_and_note_name_visibility==18.0.*",
"odoo-addon-web_widget_url_advanced==18.0.*",
Expand Down
10 changes: 2 additions & 8 deletions web_remember_tree_column_width/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Web Remember Tree Column Width
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:082687e46f2cb2a39450813df9674f487ee64fbdd3ca2533cabe0c56098e26a0
!! source digest: sha256:2874382b3a4f89b2df9f4ca22b52f7fef48e08f11dc73041667f959ac76c328a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -40,13 +40,6 @@ grouping, or reordering.
.. contents::
:local:

Known issues / Roadmap
======================

In certain cases, an event may pass a th element that cannot be used to
retrieve the corresponding td element. When this happens, the modified
column width is not stored.

Bug Tracker
===========

Expand Down Expand Up @@ -75,6 +68,7 @@ Contributors
- Cuong Nguyen Mtm <cuong.nmtm@komit-consulting.com>

- Jasmin Solanki <jasmin.solanki@forgeflow.com>
- Stefan Rijnhart <stefan@opener.amsterdam>

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion web_remember_tree_column_width/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"website": "https://github.com/OCA/web",
"license": "LGPL-3",
"category": "Extra Tools",
"version": "18.0.1.0.1",
"version": "18.0.1.0.2",
"maintainers": [
"frahikLV",
"luisg123v",
Expand Down
3 changes: 2 additions & 1 deletion web_remember_tree_column_width/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
- Tomás Álvarez \<<tomas@vauxoo.com>\>
- [Komit](https://komit-consulting.com/):
- Cuong Nguyen Mtm \<<cuong.nmtm@komit-consulting.com>\>
- Jasmin Solanki \<<jasmin.solanki@forgeflow.com>\>
- Jasmin Solanki \<<jasmin.solanki@forgeflow.com>\>
- Stefan Rijnhart \<<stefan@opener.amsterdam>\>
1 change: 0 additions & 1 deletion web_remember_tree_column_width/readme/ROADMAP.md

This file was deleted.

30 changes: 12 additions & 18 deletions web_remember_tree_column_width/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,48 +372,41 @@ <h1>Web Remember Tree Column Width</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:082687e46f2cb2a39450813df9674f487ee64fbdd3ca2533cabe0c56098e26a0
!! source digest: sha256:2874382b3a4f89b2df9f4ca22b52f7fef48e08f11dc73041667f959ac76c328a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/license-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/18.0/web_remember_tree_column_width"><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_remember_tree_column_width"><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>Remember the tree columns’ widths across sessions, and after filtering,
grouping, or reordering.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-1">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="known-issues-roadmap">
<h2><a class="toc-backref" href="#toc-entry-1">Known issues / Roadmap</a></h2>
<p>In certain cases, an event may pass a th element that cannot be used to
retrieve the corresponding td element. When this happens, the modified
column width is not stored.</p>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h2>
<h2><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_remember_tree_column_width%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h2><a class="toc-backref" href="#toc-entry-3">Credits</a></h2>
<h2><a class="toc-backref" href="#toc-entry-2">Credits</a></h2>
<div class="section" id="authors">
<h3><a class="toc-backref" href="#toc-entry-4">Authors</a></h3>
<h3><a class="toc-backref" href="#toc-entry-3">Authors</a></h3>
<ul class="simple">
<li>Vauxoo</li>
</ul>
</div>
<div class="section" id="contributors">
<h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
<h3><a class="toc-backref" href="#toc-entry-4">Contributors</a></h3>
<ul class="simple">
<li>Francisco Javier Luna Vázquez &lt;<a class="reference external" href="mailto:fluna&#64;vauxoo.com">fluna&#64;vauxoo.com</a>&gt;</li>
<li>Tomás Álvarez &lt;<a class="reference external" href="mailto:tomas&#64;vauxoo.com">tomas&#64;vauxoo.com</a>&gt;</li>
Expand All @@ -422,10 +415,11 @@ <h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
</ul>
</li>
<li>Jasmin Solanki &lt;<a class="reference external" href="mailto:jasmin.solanki&#64;forgeflow.com">jasmin.solanki&#64;forgeflow.com</a>&gt;</li>
<li>Stefan Rijnhart &lt;<a class="reference external" href="mailto:stefan&#64;opener.amsterdam">stefan&#64;opener.amsterdam</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h3><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h3>
<h3><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h3>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ export function useMagicColumnWidths(tableRef, getState, orig) {
* We call super, then add event listeners for our own stopResize handler
* which stores column widths in the brower's localstorage.
*/
function onStartResize(evstart) {
function onStartResize(ev) {
// Call original method
const res = this.columnWidths.onStartResizeOrig(evstart);
const res = this.columnWidths.onStartResizeOrig(ev);
const resizeStoppingEvents = ["keydown", "pointerdown", "pointerup"];

// Mouse or keyboard events : stop resize
const stopResize = (evstop) => {
const stopResize = (evstart) => (evstop) => {
// Ignores the 'left mouse button down' event as it used to start resizing
if (evstop.type === "pointerdown" && evstop.button === 0) {
return;
}
evstop.preventDefault();
evstop.stopPropagation();

const th = evstop.target.closest("th");
const th = evstart.target.closest("th");
if (th === null || th === undefined) {
return;
}
Expand All @@ -51,11 +51,14 @@ export function useMagicColumnWidths(tableRef, getState, orig) {
);
}
for (const eventType of resizeStoppingEvents) {
window.removeEventListener(eventType, stopResize);
window.removeEventListener(eventType, evstart.stopResizeWrapper);
}
};
// Patch the event listener method onto the event that is being passed
// to it, so that we can remove it from within the method.
ev.stopResizeWrapper = stopResize(ev);
for (const eventType of resizeStoppingEvents) {
window.addEventListener(eventType, stopResize);
window.addEventListener(eventType, ev.stopResizeWrapper);
}
return res;
}
Expand Down
104 changes: 104 additions & 0 deletions web_widget_one2many_tree_line_duplicate/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=======================================
Web Widget One2many Tree Line Duplicate
=======================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1bfdccb56bb56a23188875b884b3ed7f8eaff71397d72a1f8f26e5b270c4a1a1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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_widget_one2many_tree_line_duplicate
: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_widget_one2many_tree_line_duplicate
: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|

Allow to add a icon to clone the line.

**Table of contents**

.. contents::
:local:

Usage
=====

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**

.. code:: xml

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

Known issues / Roadmap
======================

- Add an option to control which columns are copied

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_widget_one2many_tree_line_duplicate%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
-------

* Tecnativa

Contributors
------------

- `Tecnativa <https://www.tecnativa.com/>`__:

- Alexandre Díaz
- Carlos Roca

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_widget_one2many_tree_line_duplicate>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions web_widget_one2many_tree_line_duplicate/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
24 changes: 24 additions & 0 deletions web_widget_one2many_tree_line_duplicate/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2021 Tecnativa - Alexandre Díaz
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)

{
"name": "Web Widget One2many Tree Line Duplicate",
"category": "web",
"version": "18.0.1.0.0",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/web",
"depends": ["web"],
"auto_install": False,
"installable": True,
"assets": {
"web.assets_backend": [
"/web_widget_one2many_tree_line_duplicate/static/src/**/*.esm.js",
(
"after",
"/web/static/src/views/list/list_renderer.xml",
"/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.xml",
),
],
},
}
24 changes: 24 additions & 0 deletions web_widget_one2many_tree_line_duplicate/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_widget_one2many_tree_line_duplicate
#
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"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\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"
"X-Generator: Weblate 4.17\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
#, python-format
msgid "Duplicate row"
msgstr "Duplica riga"
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_widget_one2many_tree_line_duplicate
#
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"

#. 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 row"
msgstr ""
3 changes: 3 additions & 0 deletions web_widget_one2many_tree_line_duplicate/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
Loading
Loading