Maintainers
+Maintainers
This module is maintained by the OCA.
diff --git a/web_remember_tree_column_width/static/src/js/list_renderer.esm.js b/web_remember_tree_column_width/static/src/js/list_renderer.esm.js
index ea516365ee1b..b3f4558102cc 100644
--- a/web_remember_tree_column_width/static/src/js/list_renderer.esm.js
+++ b/web_remember_tree_column_width/static/src/js/list_renderer.esm.js
@@ -22,13 +22,13 @@ 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;
@@ -36,7 +36,7 @@ export function useMagicColumnWidths(tableRef, getState, orig) {
evstop.preventDefault();
evstop.stopPropagation();
- const th = evstop.target.closest("th");
+ const th = evstart.target.closest("th");
if (th === null || th === undefined) {
return;
}
@@ -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;
}
diff --git a/web_widget_one2many_tree_line_duplicate/README.rst b/web_widget_one2many_tree_line_duplicate/README.rst
new file mode 100644
index 000000000000..52abe11a0966
--- /dev/null
+++ b/web_widget_one2many_tree_line_duplicate/README.rst
@@ -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
+
+ Web Widget One2many Tree Line Duplicate
+ + +Allow to add a icon to clone the line.
+Table of contents
+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
++<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. +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
+-
+
- Tecnativa +
Contributors
+-
+
- Tecnativa:
-
+
- Alexandre Díaz +
- Carlos Roca +
+
Maintainers
+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.
+




