diff --git a/README.md b/README.md index 7edae0d695c..45d129a4cb7 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ addon | version | maintainers | summary [web_timeline](web_timeline/) | 19.0.1.0.0 | | Interactive visualization chart to show events in time [web_tree_many2one_clickable](web_tree_many2one_clickable/) | 19.0.1.0.0 | | Open the linked resource when clicking on their name [web_widget_bokeh_chart](web_widget_bokeh_chart/) | 19.0.1.0.1 | LoisRForgeFlow JasminSForgeFlow | This widget allows to display charts using Bokeh library. +[web_widget_one2many_tree_line_duplicate](web_widget_one2many_tree_line_duplicate/) | 19.0.1.0.0 | | Web Widget One2many Tree Line Duplicate [web_widget_product_label_section_and_note_full_label](web_widget_product_label_section_and_note_full_label/) | 19.0.1.0.0 | | Display the full label in the product_label_section_and_note widget. [web_widget_product_label_section_and_note_name_visibility](web_widget_product_label_section_and_note_name_visibility/) | 19.0.1.0.0 | carlos-lopez-tecnativa | Alternate the visibility of the product and description. diff --git a/setup/_metapackage/pyproject.toml b/setup/_metapackage/pyproject.toml index db89ac4c6e7..35ddd36e49a 100644 --- a/setup/_metapackage/pyproject.toml +++ b/setup/_metapackage/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "odoo-addons-oca-web" -version = "19.0.20260701.0" +version = "19.0.20260703.0" dependencies = [ "odoo-addon-web_calendar_slot_duration==19.0.*", "odoo-addon-web_chatter_position==19.0.*", @@ -25,6 +25,7 @@ dependencies = [ "odoo-addon-web_timeline==19.0.*", "odoo-addon-web_tree_many2one_clickable==19.0.*", "odoo-addon-web_widget_bokeh_chart==19.0.*", + "odoo-addon-web_widget_one2many_tree_line_duplicate==19.0.*", "odoo-addon-web_widget_product_label_section_and_note_full_label==19.0.*", "odoo-addon-web_widget_product_label_section_and_note_name_visibility==19.0.*", ] diff --git a/web_chatter_position/i18n/da.po b/web_chatter_position/i18n/da.po new file mode 100644 index 00000000000..9af5f0f43f7 --- /dev/null +++ b/web_chatter_position/i18n/da.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_chatter_position +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 19.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: da\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" + +#. module: web_chatter_position +#: model:ir.model.fields.selection,name:web_chatter_position.selection__res_users__chatter_position__bottom +msgid "Bottom" +msgstr "" + +#. module: web_chatter_position +#: model:ir.model.fields,field_description:web_chatter_position.field_res_users__chatter_position +msgid "Chatter Position" +msgstr "" + +#. module: web_chatter_position +#: model:ir.model.fields,field_description:web_chatter_position.field_res_users__display_name +msgid "Display Name" +msgstr "" + +#. module: web_chatter_position +#: model:ir.model.fields,field_description:web_chatter_position.field_res_users__id +msgid "ID" +msgstr "" + +#. module: web_chatter_position +#: model:ir.model.fields.selection,name:web_chatter_position.selection__res_users__chatter_position__auto +msgid "Responsive" +msgstr "" + +#. module: web_chatter_position +#: model:ir.model.fields.selection,name:web_chatter_position.selection__res_users__chatter_position__sided +msgid "Sided" +msgstr "" + +#. module: web_chatter_position +#: model:ir.model,name:web_chatter_position.model_res_users +msgid "User" +msgstr "" diff --git a/web_chatter_position/i18n/sv.po b/web_chatter_position/i18n/sv.po new file mode 100644 index 00000000000..c77ae7082ea --- /dev/null +++ b/web_chatter_position/i18n/sv.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_chatter_position +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 19.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: sv\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" + +#. module: web_chatter_position +#: model:ir.model.fields.selection,name:web_chatter_position.selection__res_users__chatter_position__bottom +msgid "Bottom" +msgstr "" + +#. module: web_chatter_position +#: model:ir.model.fields,field_description:web_chatter_position.field_res_users__chatter_position +msgid "Chatter Position" +msgstr "" + +#. module: web_chatter_position +#: model:ir.model.fields,field_description:web_chatter_position.field_res_users__display_name +msgid "Display Name" +msgstr "" + +#. module: web_chatter_position +#: model:ir.model.fields,field_description:web_chatter_position.field_res_users__id +msgid "ID" +msgstr "" + +#. module: web_chatter_position +#: model:ir.model.fields.selection,name:web_chatter_position.selection__res_users__chatter_position__auto +msgid "Responsive" +msgstr "" + +#. module: web_chatter_position +#: model:ir.model.fields.selection,name:web_chatter_position.selection__res_users__chatter_position__sided +msgid "Sided" +msgstr "" + +#. module: web_chatter_position +#: model:ir.model,name:web_chatter_position.model_res_users +msgid "User" +msgstr "" diff --git a/web_environment_ribbon/i18n/da.po b/web_environment_ribbon/i18n/da.po new file mode 100644 index 00000000000..e3b2ef39143 --- /dev/null +++ b/web_environment_ribbon/i18n/da.po @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_environment_ribbon +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 19.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2026-07-06 16:46+0000\n" +"Last-Translator: Laura V \n" +"Language-Team: none\n" +"Language: da\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 5.15.2\n" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__display_name +msgid "Display Name" +msgstr "Vis navn" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__id +msgid "ID" +msgstr "ID" + +#. module: web_environment_ribbon +#: model:ir.model,name:web_environment_ribbon.model_web_environment_ribbon_backend +msgid "Web Environment Ribbon Backend" +msgstr "Web-miljøbånd backend" diff --git a/web_environment_ribbon/i18n/sv.po b/web_environment_ribbon/i18n/sv.po new file mode 100644 index 00000000000..e283676df7a --- /dev/null +++ b/web_environment_ribbon/i18n/sv.po @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_environment_ribbon +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 19.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2026-07-06 16:46+0000\n" +"Last-Translator: Laura V \n" +"Language-Team: none\n" +"Language: sv\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 5.15.2\n" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__display_name +msgid "Display Name" +msgstr "Visningsnamn" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__id +msgid "ID" +msgstr "ID" + +#. module: web_environment_ribbon +#: model:ir.model,name:web_environment_ribbon.model_web_environment_ribbon_backend +msgid "Web Environment Ribbon Backend" +msgstr "Webbmiljöband backend" diff --git a/web_m2x_options/i18n/da.po b/web_m2x_options/i18n/da.po new file mode 100644 index 00000000000..00ab7c6f772 --- /dev/null +++ b/web_m2x_options/i18n/da.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_m2x_options +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 19.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2026-07-06 16:46+0000\n" +"Last-Translator: Laura V \n" +"Language-Team: none\n" +"Language: da\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 5.15.2\n" + +#. module: web_m2x_options +#: model:ir.model.fields,field_description:web_m2x_options.field_ir_config_parameter__display_name +#: model:ir.model.fields,field_description:web_m2x_options.field_ir_http__display_name +msgid "Display Name" +msgstr "Vis navn" + +#. module: web_m2x_options +#: model:ir.model,name:web_m2x_options.model_ir_http +msgid "HTTP Routing" +msgstr "HTTP Routing" + +#. module: web_m2x_options +#: model:ir.model.fields,field_description:web_m2x_options.field_ir_config_parameter__id +#: model:ir.model.fields,field_description:web_m2x_options.field_ir_http__id +msgid "ID" +msgstr "ID" + +#. module: web_m2x_options +#: model:ir.model,name:web_m2x_options.model_ir_config_parameter +msgid "System Parameter" +msgstr "Systemparameter" diff --git a/web_m2x_options/i18n/sv.po b/web_m2x_options/i18n/sv.po new file mode 100644 index 00000000000..5a753d5a4e2 --- /dev/null +++ b/web_m2x_options/i18n/sv.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_m2x_options +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 19.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2026-07-06 16:46+0000\n" +"Last-Translator: Laura V \n" +"Language-Team: none\n" +"Language: sv\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 5.15.2\n" + +#. module: web_m2x_options +#: model:ir.model.fields,field_description:web_m2x_options.field_ir_config_parameter__display_name +#: model:ir.model.fields,field_description:web_m2x_options.field_ir_http__display_name +msgid "Display Name" +msgstr "Visningsnamn" + +#. module: web_m2x_options +#: model:ir.model,name:web_m2x_options.model_ir_http +msgid "HTTP Routing" +msgstr "HTTP-routing" + +#. module: web_m2x_options +#: model:ir.model.fields,field_description:web_m2x_options.field_ir_config_parameter__id +#: model:ir.model.fields,field_description:web_m2x_options.field_ir_http__id +msgid "ID" +msgstr "ID" + +#. module: web_m2x_options +#: model:ir.model,name:web_m2x_options.model_ir_config_parameter +msgid "System Parameter" +msgstr "Systemparameter" diff --git a/web_no_bubble/i18n/da.po b/web_no_bubble/i18n/da.po new file mode 100644 index 00000000000..f6d47ee2b92 --- /dev/null +++ b/web_no_bubble/i18n/da.po @@ -0,0 +1,16 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-07-09 07:37+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: da\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Translate Toolkit 3.18.1\n" + +# No translations. diff --git a/web_no_bubble/i18n/sv.po b/web_no_bubble/i18n/sv.po new file mode 100644 index 00000000000..19b5be29aa5 --- /dev/null +++ b/web_no_bubble/i18n/sv.po @@ -0,0 +1,16 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-07-09 07:37+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Translate Toolkit 3.18.1\n" + +# No translations. diff --git a/web_widget_bokeh_chart/i18n/da.po b/web_widget_bokeh_chart/i18n/da.po new file mode 100644 index 00000000000..9d5edb36972 --- /dev/null +++ b/web_widget_bokeh_chart/i18n/da.po @@ -0,0 +1,16 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-07-09 07:39+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: da\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Translate Toolkit 3.18.1\n" + +# No translations. diff --git a/web_widget_bokeh_chart/i18n/sv.po b/web_widget_bokeh_chart/i18n/sv.po new file mode 100644 index 00000000000..a81ee9e672c --- /dev/null +++ b/web_widget_bokeh_chart/i18n/sv.po @@ -0,0 +1,16 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-07-09 07:39+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Translate Toolkit 3.18.1\n" + +# No translations. 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 00000000000..1bb82515397 --- /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:e5b95135142c797c5a7addebf73d134f9acbec555ff441d0c2baf718accd04f0 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/19.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-19-0/web-19-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=19.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 00000000000..f0b902299fc --- /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 00000000000..7389a638daf --- /dev/null +++ b/web_widget_one2many_tree_line_duplicate/__manifest__.py @@ -0,0 +1,23 @@ +# 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": "19.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": [ + ( + "after", + "/web/static/src/views/list/list_renderer.xml", + "/web_widget_one2many_tree_line_duplicate/static/src/**/*", + ), + ], + }, +} 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 00000000000..2513af1eaa2 --- /dev/null +++ b/web_widget_one2many_tree_line_duplicate/i18n/it.po @@ -0,0 +1,29 @@ +# 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: 2026-01-19 13:50+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 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 +msgid "Duplicate row" +msgstr "Duplica riga" diff --git a/web_widget_one2many_tree_line_duplicate/i18n/sl.po b/web_widget_one2many_tree_line_duplicate/i18n/sl.po new file mode 100644 index 00000000000..92f1a4ff109 --- /dev/null +++ b/web_widget_one2many_tree_line_duplicate/i18n/sl.po @@ -0,0 +1,30 @@ +# 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" +"PO-Revision-Date: 2026-06-06 11:50+0000\n" +"Last-Translator: Matjaz Mozetic \n" +"Language-Team: none\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || " +"n%100==4 ? 2 : 3;\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 "Gumb za podvajanje vrstice" + +#. 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 "Podvoji vrstico" 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 00000000000..280e6e17811 --- /dev/null +++ b/web_widget_one2many_tree_line_duplicate/i18n/web_widget_one2many_tree_line_duplicate.pot @@ -0,0 +1,26 @@ +# 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 19.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 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 +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 00000000000..4231d0cccb3 --- /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 00000000000..ea158ed4942 --- /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 00000000000..a8a1fbfbfc2 --- /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 00000000000..5f4ab781d28 --- /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 00000000000..6b496858a88 --- /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 00000000000..3a0328b516c 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 00000000000..ab0938d05c1 --- /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 00000000000..5ffd8ba6355 --- /dev/null +++ b/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.esm.js @@ -0,0 +1,107 @@ +/* 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 {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; + const key = this.createViewKey(); + this.keyDuplicateLineColumn = `duplicate_line_column,${key}`; + this.duplicateLineAllowed = Boolean( + parent && + parent.props && + parent.props.fieldInfo && + parent.props.fieldInfo.options && + parent.props.fieldInfo.options.allow_clone + ); + this.duplicateLineColumn = exprToBoolean( + browser.localStorage.getItem(this.keyDuplicateLineColumn), + true + ); + }, + get hasDuplicateLineColumn() { + return this.duplicateLineAllowed && this.duplicateLineColumn; + }, + isDuplicableLine(record) { + return !["line_section", "line_subsection", "line_note"].includes( + record.data.display_type + ); + }, + toggleDuplicateLineColumn() { + this.duplicateLineColumn = !this.duplicateLineColumn; + browser.localStorage.setItem( + this.keyDuplicateLineColumn, + this.duplicateLineColumn + ); + this.render(); + }, + get nbCols() { + let nbCols = super.nbCols; + if (this.hasDuplicateLineColumn) { + nbCols++; + } + return nbCols; + }, + async onCloneIconClick(record) { + const list = this.props.list; + const left = await list.leaveEditMode(); + if (!left) { + return; + } + // Snapshot of the source's scalar values, including the readonly computed + // ones (subtotals...), so the copy is exact. duplicateRecords creates the + // line running its onchanges, which recompute editable fields (e.g. + // price_unit from the product) and discard the manual values. We re-apply + // this snapshot with withoutOnchange so those values are kept. + const scalarTypes = [ + "integer", + "float", + "monetary", + "char", + "text", + "boolean", + "selection", + "date", + "datetime", + ]; + const snapshot = {}; + for (const [name, value] of Object.entries(record.data)) { + const field = record.fields[name]; + if ( + field && + name !== "display_name" && + name !== list.handleField && + scalarTypes.includes(field.type) + ) { + snapshot[name] = value; + } + } + // Run everything in a single model transaction and notify only once, at + // the end, so the intermediate (onchange-recomputed) values are never + // rendered: the line appears directly with the original values, without + // the flicker of a second render. + await list.model.mutex.exec(async () => { + const sourceIndex = list.records.indexOf(record); + await list._duplicateRecords([record], {}); + // The duplicate is inserted right after the source line; identify it + // by position (references aren't stable across the re-wrapping). + const newRecord = list.records[sourceIndex + 1]; + if ( + newRecord && + newRecord.id !== record.id && + Object.keys(snapshot).length + ) { + await newRecord._update(snapshot, { + withoutOnchange: true, + withoutParentUpdate: true, + }); + } + await list._onUpdate(); + }); + }, +}); diff --git a/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.scss b/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.scss new file mode 100644 index 00000000000..9336c2fb852 --- /dev/null +++ b/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.scss @@ -0,0 +1,13 @@ +.o_list_renderer { + .o_list_duplicate_line { + width: 1px; // keep the column from expanding + } + + .o_list_duplicate_line button { + padding: 0; + background: none; + border-style: none; + display: table-cell; + cursor: pointer; + } +} 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 00000000000..844c15d03a9 --- /dev/null +++ b/web_widget_one2many_tree_line_duplicate/static/src/list/list_renderer.xml @@ -0,0 +1,79 @@ + + + + + + +