diff --git a/README.md b/README.md index 10bf57c091ee..91df777ad946 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ addon | version | maintainers | summary [web_pivot_computed_measure](web_pivot_computed_measure/) | 18.0.1.0.5 | CarlosRoca13 | 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 | frahikLV luisg123v cuongnmtm | Remember the tree columns' widths across sessions. +[web_remember_tree_column_width](web_remember_tree_column_width/) | 18.0.1.0.2 | frahikLV luisg123v cuongnmtm | Remember the tree columns' widths across sessions. [web_responsive](web_responsive/) | 18.0.1.0.2 | Tardo SplashS | 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 @@ -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 | JordiBForgeFlow ThiagoMForgeFlow | This widget allows to display charts using MPLD3 library. [web_widget_numeric_step](web_widget_numeric_step/) | 18.0.1.0.2 | rafaelbn yajo | 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 | carlos-lopez-tecnativa | 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. diff --git a/setup/_metapackage/pyproject.toml b/setup/_metapackage/pyproject.toml index afba3a6d0826..d8318e07bf8d 100644 --- a/setup/_metapackage/pyproject.toml +++ b/setup/_metapackage/pyproject.toml @@ -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.*", @@ -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.*", diff --git a/web_remember_tree_column_width/README.rst b/web_remember_tree_column_width/README.rst index 0e253255723e..bd44adaa3e83 100644 --- a/web_remember_tree_column_width/README.rst +++ b/web_remember_tree_column_width/README.rst @@ -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 @@ -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 =========== @@ -75,6 +68,7 @@ Contributors - Cuong Nguyen Mtm - Jasmin Solanki +- Stefan Rijnhart Maintainers ----------- diff --git a/web_remember_tree_column_width/__manifest__.py b/web_remember_tree_column_width/__manifest__.py index 0b68c3840d29..ceebf3d349c5 100644 --- a/web_remember_tree_column_width/__manifest__.py +++ b/web_remember_tree_column_width/__manifest__.py @@ -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", diff --git a/web_remember_tree_column_width/readme/CONTRIBUTORS.md b/web_remember_tree_column_width/readme/CONTRIBUTORS.md index 763d20923a59..66e456860db4 100644 --- a/web_remember_tree_column_width/readme/CONTRIBUTORS.md +++ b/web_remember_tree_column_width/readme/CONTRIBUTORS.md @@ -2,4 +2,5 @@ - Tomás Álvarez \<\> - [Komit](https://komit-consulting.com/): - Cuong Nguyen Mtm \<\> -- Jasmin Solanki \<\> \ No newline at end of file +- Jasmin Solanki \<\> +- Stefan Rijnhart \<\> diff --git a/web_remember_tree_column_width/readme/ROADMAP.md b/web_remember_tree_column_width/readme/ROADMAP.md deleted file mode 100644 index 081cf202f00a..000000000000 --- a/web_remember_tree_column_width/readme/ROADMAP.md +++ /dev/null @@ -1 +0,0 @@ -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. \ No newline at end of file diff --git a/web_remember_tree_column_width/static/description/index.html b/web_remember_tree_column_width/static/description/index.html index bde23fadb781..1bddb9e3de89 100644 --- a/web_remember_tree_column_width/static/description/index.html +++ b/web_remember_tree_column_width/static/description/index.html @@ -372,7 +372,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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/web Translate me on Weblate Try me on Runboat

Remember the tree columns’ widths across sessions, and after filtering, @@ -380,24 +380,17 @@

Web Remember Tree Column Width

Table of contents

-
-

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

+

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 @@ -405,15 +398,15 @@

Bug Tracker

Do not contact contributors directly about support or help with technical issues.

-

Credits

+

Credits

-

Authors

+

Authors

  • Vauxoo
-

Contributors

+

Contributors

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

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association 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 + + + +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. + +.. 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_widget_one2many_tree_line_duplicate/__init__.py b/web_widget_one2many_tree_line_duplicate/__init__.py new file mode 100644 index 000000000000..f0b902299fca --- /dev/null +++ b/web_widget_one2many_tree_line_duplicate/__init__.py @@ -0,0 +1 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) diff --git a/web_widget_one2many_tree_line_duplicate/__manifest__.py b/web_widget_one2many_tree_line_duplicate/__manifest__.py new file mode 100644 index 000000000000..1c71612be5a4 --- /dev/null +++ b/web_widget_one2many_tree_line_duplicate/__manifest__.py @@ -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", + ), + ], + }, +} diff --git a/web_widget_one2many_tree_line_duplicate/i18n/it.po b/web_widget_one2many_tree_line_duplicate/i18n/it.po new file mode 100644 index 000000000000..3e034b36a20d --- /dev/null +++ b/web_widget_one2many_tree_line_duplicate/i18n/it.po @@ -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 \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" 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 new file mode 100644 index 000000000000..9ac8535e0781 --- /dev/null +++ b/web_widget_one2many_tree_line_duplicate/i18n/web_widget_one2many_tree_line_duplicate.pot @@ -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 "" diff --git a/web_widget_one2many_tree_line_duplicate/pyproject.toml b/web_widget_one2many_tree_line_duplicate/pyproject.toml new file mode 100644 index 000000000000..4231d0cccb3d --- /dev/null +++ b/web_widget_one2many_tree_line_duplicate/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/web_widget_one2many_tree_line_duplicate/readme/CONTRIBUTORS.md b/web_widget_one2many_tree_line_duplicate/readme/CONTRIBUTORS.md new file mode 100644 index 000000000000..ea158ed4942f --- /dev/null +++ b/web_widget_one2many_tree_line_duplicate/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +- [Tecnativa](https://www.tecnativa.com/): + - Alexandre Díaz + - Carlos Roca diff --git a/web_widget_one2many_tree_line_duplicate/readme/DESCRIPTION.md b/web_widget_one2many_tree_line_duplicate/readme/DESCRIPTION.md new file mode 100644 index 000000000000..a8a1fbfbfc2b --- /dev/null +++ b/web_widget_one2many_tree_line_duplicate/readme/DESCRIPTION.md @@ -0,0 +1 @@ +Allow to add a icon to clone the line. diff --git a/web_widget_one2many_tree_line_duplicate/readme/ROADMAP.md b/web_widget_one2many_tree_line_duplicate/readme/ROADMAP.md new file mode 100644 index 000000000000..5f4ab781d28a --- /dev/null +++ b/web_widget_one2many_tree_line_duplicate/readme/ROADMAP.md @@ -0,0 +1 @@ +- Add an option to control which columns are copied diff --git a/web_widget_one2many_tree_line_duplicate/readme/USAGE.md b/web_widget_one2many_tree_line_duplicate/readme/USAGE.md new file mode 100644 index 000000000000..6b496858a88d --- /dev/null +++ b/web_widget_one2many_tree_line_duplicate/readme/USAGE.md @@ -0,0 +1,12 @@ +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** + +``` xml + +``` diff --git a/web_widget_one2many_tree_line_duplicate/static/description/icon.png b/web_widget_one2many_tree_line_duplicate/static/description/icon.png new file mode 100644 index 000000000000..3a0328b516c4 Binary files /dev/null and b/web_widget_one2many_tree_line_duplicate/static/description/icon.png differ diff --git a/web_widget_one2many_tree_line_duplicate/static/description/index.html b/web_widget_one2many_tree_line_duplicate/static/description/index.html new file mode 100644 index 000000000000..fa7d993f979f --- /dev/null +++ b/web_widget_one2many_tree_line_duplicate/static/description/index.html @@ -0,0 +1,454 @@ + + + + + +README.rst + + + +
    + + + +Odoo Community Association + +
    +

    Web Widget One2many Tree Line Duplicate

    + +

    Beta License: AGPL-3 OCA/web Translate me on Weblate Try me on Runboat

    +

    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.

    + +Odoo Community Association + +

    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_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 new file mode 100644 index 000000000000..34083c4b9425 --- /dev/null +++ b/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.esm.js @@ -0,0 +1,67 @@ +/** @odoo-module **/ +/* Copyright 2024 Tecnativa - Carlos Roca + * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */ + +import {ListRenderer} from "@web/views/list/list_renderer"; +import {patch} from "@web/core/utils/patch"; +import {serializeDate, serializeDateTime} from "@web/core/l10n/dates"; + +patch(ListRenderer.prototype, { + setup() { + super.setup(...arguments); + const parent = this.__owl__.parent.parent; + this.displayDuplicateLine = + parent && + parent.props && + parent.props.fieldInfo && + parent.props.fieldInfo.options && + parent.props.fieldInfo.options.allow_clone; + }, + async onCloneIconClick(record) { + const toSkip = this.getFieldsToSkip(); + const vals = {}; + + for (const [name, value] of Object.entries(record.data)) { + const fieldDef = this.props.list.fields[name]; + if (toSkip.has(name) || !fieldDef) { + continue; + } + if (fieldDef.type === "many2one" && Array.isArray(value)) { + vals[name] = value[0]; + } else if (fieldDef.type === "many2many" || fieldDef.type === "one2many") { + const m2mRecords = Array.isArray(value) ? value : value?.records || []; + const ids = m2mRecords + .map((r) => { + if (typeof r.id === "number") return r.id; + if (Array.isArray(r._config?.resIds)) return r._config.resIds; + return null; + }) + .flat() + .filter((id) => typeof id === "number"); + + vals[name] = [[6, 0, ids]]; + } else if (fieldDef.type === "datetime" && value) { + vals[name] = serializeDateTime(value); + } else if (fieldDef.type === "date" && value) { + vals[name] = serializeDate(value); + } else { + vals[name] = value; + } + } + await record.model.orm.call( + record._config.resModel, + "copy", + [[record._config.resId], vals], + {context: record._config.context} + ); + await record.model.load(); + }, + getFieldsToSkip() { + return new Set([ + "id", + "display_name", + "__last_update", + this.props.list.handleField, + ]); + }, +}); 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 new file mode 100644 index 000000000000..daa56a33ce54 --- /dev/null +++ b/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.xml @@ -0,0 +1,43 @@ + + + + + + + + + + +