diff --git a/README.md b/README.md index 105428c229b..fb08ae68e94 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ Available addons ---------------- addon | version | maintainers | summary --- | --- | --- | --- +[web_action_conditionable](web_action_conditionable/) | 18.0.1.0.0 | | web_action_conditionable [web_calendar_slot_duration](web_calendar_slot_duration/) | 18.0.1.0.0 | Yajo | Customizable calendar slot durations [web_chatter_position](web_chatter_position/) | 18.0.1.1.1 | trisdoan | Add an option to change the chatter position [web_company_color](web_company_color/) | 18.0.1.1.0 | | Web Company Color @@ -53,7 +54,7 @@ addon | version | maintainers | summary [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.1 | | Web Refresher [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.6 | Tardo SplashS | Responsive web client, community-supported +[web_responsive](web_responsive/) | 18.0.1.0.7 | Tardo SplashS | Responsive web client, community-supported [web_save_discard_button](web_save_discard_button/) | 18.0.1.0.1 | synconics | Save & Discard Buttons [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 @@ -69,8 +70,10 @@ addon | version | maintainers | summary [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 | LoisRForgeFlow JasminSForgeFlow | This widget allows to display charts using Bokeh library. +[web_widget_char_size](web_widget_char_size/) | 18.0.1.0.0 | | Add size option to Char widget [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_image_download](web_widget_image_download/) | 18.0.1.0.0 | | Allows to download any image from its 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_o2m_attachment_image_gallery](web_widget_o2m_attachment_image_gallery/) | 18.0.1.0.0 | victoralmau | Widget o2m Attachment Image Gallery Widget diff --git a/setup/_metapackage/pyproject.toml b/setup/_metapackage/pyproject.toml index ca27297d74c..769f771bc75 100644 --- a/setup/_metapackage/pyproject.toml +++ b/setup/_metapackage/pyproject.toml @@ -1,7 +1,8 @@ [project] name = "odoo-addons-oca-web" -version = "18.0.20260623.0" +version = "18.0.20260721.1" dependencies = [ + "odoo-addon-web_action_conditionable==18.0.*", "odoo-addon-web_calendar_slot_duration==18.0.*", "odoo-addon-web_chatter_position==18.0.*", "odoo-addon-web_company_color==18.0.*", @@ -49,8 +50,10 @@ dependencies = [ "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.*", + "odoo-addon-web_widget_char_size==18.0.*", "odoo-addon-web_widget_domain_editor_dialog==18.0.*", "odoo-addon-web_widget_dropdown_dynamic==18.0.*", + "odoo-addon-web_widget_image_download==18.0.*", "odoo-addon-web_widget_mpld3_chart==18.0.*", "odoo-addon-web_widget_numeric_step==18.0.*", "odoo-addon-web_widget_o2m_attachment_image_gallery==18.0.*", diff --git a/web_action_conditionable/README.rst b/web_action_conditionable/README.rst new file mode 100644 index 00000000000..ded2e5f1d9e --- /dev/null +++ b/web_action_conditionable/README.rst @@ -0,0 +1,117 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +======================== +web_action_conditionable +======================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:f1a4017aa1f0ea87fb4a1f2d6491d7c54e703bc35914374638e8fcdd018398fb + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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_action_conditionable + :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_action_conditionable + :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| + +Add support for conditions on create and delete actions on One2Many +fields. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +Odoo by default support: + +:: + + + +with this module you can: + +:: + + + +It works in any tree view, so you can use it in One2many. + +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 +------- + +* Cristian Salamea + +Contributors +------------ + +- Cristian Salamea + +- André Paramés (https://www.acsone.eu/) + +- Alexandre Díaz + +- Sudhir Arya + +- Jasper Jumelet + +- `Trobz `__: + + - Nguyễn Minh Chiến + - Tran Thanh Trai + +Other credits +------------- + +The migration of this module from 15.0 to 17.0 was financially supported +by Camptocamp + +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_action_conditionable/__init__.py b/web_action_conditionable/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/web_action_conditionable/__manifest__.py b/web_action_conditionable/__manifest__.py new file mode 100644 index 00000000000..7ae1abff446 --- /dev/null +++ b/web_action_conditionable/__manifest__.py @@ -0,0 +1,16 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +{ + "name": "web_action_conditionable", + "version": "18.0.1.0.0", + "depends": ["base", "web"], + "data": [], + "author": "Cristian Salamea,Odoo Community Association (OCA)", + "website": "https://github.com/OCA/web", + "license": "AGPL-3", + "assets": { + "web.assets_backend": [ + "web_action_conditionable/static/src/components/*", + ], + }, + "installable": True, +} diff --git a/web_action_conditionable/i18n/es.po b/web_action_conditionable/i18n/es.po new file mode 100644 index 00000000000..e69de29bb2d diff --git a/web_action_conditionable/i18n/hr.po b/web_action_conditionable/i18n/hr.po new file mode 100644 index 00000000000..e69de29bb2d diff --git a/web_action_conditionable/i18n/it.po b/web_action_conditionable/i18n/it.po new file mode 100644 index 00000000000..73388557f6d --- /dev/null +++ b/web_action_conditionable/i18n/it.po @@ -0,0 +1,14 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.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" diff --git a/web_action_conditionable/i18n/web_action_conditionable.pot b/web_action_conditionable/i18n/web_action_conditionable.pot new file mode 100644 index 00000000000..aadee09bfed --- /dev/null +++ b/web_action_conditionable/i18n/web_action_conditionable.pot @@ -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" diff --git a/web_action_conditionable/i18n/zh_CN.po b/web_action_conditionable/i18n/zh_CN.po new file mode 100644 index 00000000000..e69de29bb2d diff --git a/web_action_conditionable/pyproject.toml b/web_action_conditionable/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/web_action_conditionable/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/web_action_conditionable/readme/CONTRIBUTORS.md b/web_action_conditionable/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..5361a82e92a --- /dev/null +++ b/web_action_conditionable/readme/CONTRIBUTORS.md @@ -0,0 +1,13 @@ +- Cristian Salamea \<\> + +- André Paramés \<\> () + +- Alexandre Díaz \<\> + +- Sudhir Arya \<\> + +- Jasper Jumelet \<\> + +- [Trobz](https://trobz.com): + - Nguyễn Minh Chiến \<\> + - Tran Thanh Trai \<\> diff --git a/web_action_conditionable/readme/CREDITS.md b/web_action_conditionable/readme/CREDITS.md new file mode 100644 index 00000000000..42d9c02edad --- /dev/null +++ b/web_action_conditionable/readme/CREDITS.md @@ -0,0 +1,2 @@ +The migration of this module from 15.0 to 17.0 was financially supported +by Camptocamp diff --git a/web_action_conditionable/readme/DESCRIPTION.md b/web_action_conditionable/readme/DESCRIPTION.md new file mode 100644 index 00000000000..f2447e0a130 --- /dev/null +++ b/web_action_conditionable/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +Add support for conditions on create and delete actions on One2Many +fields. diff --git a/web_action_conditionable/readme/USAGE.md b/web_action_conditionable/readme/USAGE.md new file mode 100644 index 00000000000..1417112990b --- /dev/null +++ b/web_action_conditionable/readme/USAGE.md @@ -0,0 +1,9 @@ +Odoo by default support: + + + +with this module you can: + + + +It works in any tree view, so you can use it in One2many. diff --git a/web_action_conditionable/static/description/icon.png b/web_action_conditionable/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/web_action_conditionable/static/description/icon.png differ diff --git a/web_action_conditionable/static/description/index.html b/web_action_conditionable/static/description/index.html new file mode 100644 index 00000000000..606b6938c60 --- /dev/null +++ b/web_action_conditionable/static/description/index.html @@ -0,0 +1,458 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

web_action_conditionable

+ +

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

+

Add support for conditions on create and delete actions on One2Many +fields.

+

Table of contents

+ +
+

Usage

+

Odoo by default support:

+
+<tree delete="false" create="false">
+
+

with this module you can:

+
+<tree delete="state=='draft'" create="state!='sent'">
+
+

It works in any tree view, so you can use it in One2many.

+
+
+

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

+
    +
  • Cristian Salamea
  • +
+
+
+

Contributors

+ +
+
+

Other credits

+

The migration of this module from 15.0 to 17.0 was financially supported +by Camptocamp

+
+
+

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_action_conditionable/static/src/components/field_one2many.esm.js b/web_action_conditionable/static/src/components/field_one2many.esm.js new file mode 100644 index 00000000000..a4065fc17d7 --- /dev/null +++ b/web_action_conditionable/static/src/components/field_one2many.esm.js @@ -0,0 +1,41 @@ +/** @odoo-module **/ +/* global console */ +import {X2ManyField} from "@web/views/fields/x2many/x2many_field"; +import {evaluateExpr} from "@web/core/py_js/py"; +import {patch} from "@web/core/utils/patch"; + +patch(X2ManyField.prototype, { + get rendererProps() { + this.updateActiveActions(); + return super.rendererProps; + }, + updateActiveActions() { + if ( + this.props.viewMode === "list" && + this.activeActions.type === "one2many" && + !this.props.readonly + ) { + const self = this; + const archInfo = this.activeField.views[this.props.viewMode]; + const xmlDoc = archInfo.xmlDoc; + ["create", "delete"].forEach(function (item) { + if (item in self.activeActions && xmlDoc.hasAttribute(item)) { + const expr = xmlDoc.getAttribute(item); + try { + self.activeActions[item] = evaluateExpr( + expr, + self.props.record.data + ); + } catch (error) { + console.warn( + "[web_action_conditionable] unrecognized expr '" + + expr + + "', ignoring" + ); + console.warn(error); + } + } + }); + } + }, +}); diff --git a/web_responsive/README.rst b/web_responsive/README.rst index 8e3bacad0cc..a080dbd16a4 100644 --- a/web_responsive/README.rst +++ b/web_responsive/README.rst @@ -11,7 +11,7 @@ Web Responsive !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:4ee483316e5299e935ac7bd410c9380e10f9e22fd7301a9655fb0aeab3234c55 + !! source digest: sha256:ebe111b566ba52389e9ade067a40de491ca4da8f07eb96a66719d55c05d6fd58 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png diff --git a/web_responsive/__manifest__.py b/web_responsive/__manifest__.py index 9625ca92f9a..5fc2721b92b 100644 --- a/web_responsive/__manifest__.py +++ b/web_responsive/__manifest__.py @@ -9,7 +9,7 @@ { "name": "Web Responsive", "summary": "Responsive web client, community-supported", - "version": "18.0.1.0.6", + "version": "18.0.1.0.7", "category": "Website", "website": "https://github.com/OCA/web", "author": "LasLabs, Tecnativa, ITerra, Onestein, " diff --git a/web_responsive/static/description/index.html b/web_responsive/static/description/index.html index 189ff7b3871..61d5a9f83aa 100644 --- a/web_responsive/static/description/index.html +++ b/web_responsive/static/description/index.html @@ -372,7 +372,7 @@

Web Responsive

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:4ee483316e5299e935ac7bd410c9380e10f9e22fd7301a9655fb0aeab3234c55 +!! source digest: sha256:ebe111b566ba52389e9ade067a40de491ca4da8f07eb96a66719d55c05d6fd58 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

This module adds responsiveness to web backend.

diff --git a/web_responsive/static/src/components/apps_menu/apps_menu_preferences.esm.js b/web_responsive/static/src/components/apps_menu/apps_menu_preferences.esm.js index 7fa81c0060c..445f31ce9b9 100644 --- a/web_responsive/static/src/components/apps_menu/apps_menu_preferences.esm.js +++ b/web_responsive/static/src/components/apps_menu/apps_menu_preferences.esm.js @@ -7,6 +7,7 @@ import {useService} from "@web/core/utils/hooks"; import {user} from "@web/core/user"; class AppsMenuPreferences extends Component { + static props = {}; setup() { this.action = useService("action"); this.user = user; diff --git a/web_widget_char_size/README.rst b/web_widget_char_size/README.rst new file mode 100644 index 00000000000..a4ae3adf7a4 --- /dev/null +++ b/web_widget_char_size/README.rst @@ -0,0 +1,93 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +================ +Widget Char size +================ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:cca69429dd9e19c4b757301e24c056176a91f557c446a6e2b204f16119541684 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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_char_size + :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_char_size + :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 allows to add an option size to Char fields in web client: + +.. code:: XML + + + +that allows to enter only the specified number of characters in the +field. + +Adding "size" as a parameter while defining Char field is deprecated +officially. + +**Table of contents** + +.. contents:: + :local: + +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 +------- + +* Agile Business Group + +Contributors +------------ + +- Thanakrit Pintana +- `PyTech `__: + + - Simone Rubino + +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_char_size/__init__.py b/web_widget_char_size/__init__.py new file mode 100644 index 00000000000..7af42f99f86 --- /dev/null +++ b/web_widget_char_size/__init__.py @@ -0,0 +1 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/web_widget_char_size/__manifest__.py b/web_widget_char_size/__manifest__.py new file mode 100644 index 00000000000..026d3f7a06a --- /dev/null +++ b/web_widget_char_size/__manifest__.py @@ -0,0 +1,17 @@ +# Copyright 2021 Simone Rubino - Agile Business Group +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +{ + "name": "Widget Char size", + "summary": "Add size option to Char widget", + "version": "18.0.1.0.0", + "category": "Hidden", + "website": "https://github.com/OCA/web", + "author": "Agile Business Group, Odoo Community Association (OCA)", + "license": "AGPL-3", + "depends": [ + "web", + ], + "assets": { + "web.assets_backend": ["web_widget_char_size/static/src/js/char_widget.esm.js"] + }, +} diff --git a/web_widget_char_size/i18n/it.po b/web_widget_char_size/i18n/it.po new file mode 100644 index 00000000000..73388557f6d --- /dev/null +++ b/web_widget_char_size/i18n/it.po @@ -0,0 +1,14 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.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" diff --git a/web_widget_char_size/i18n/web_widget_char_size.pot b/web_widget_char_size/i18n/web_widget_char_size.pot new file mode 100644 index 00000000000..aadee09bfed --- /dev/null +++ b/web_widget_char_size/i18n/web_widget_char_size.pot @@ -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" diff --git a/web_widget_char_size/pyproject.toml b/web_widget_char_size/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/web_widget_char_size/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/web_widget_char_size/readme/CONTRIBUTORS.md b/web_widget_char_size/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..bf94081c03e --- /dev/null +++ b/web_widget_char_size/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +- Thanakrit Pintana +- [PyTech](https://www.pytech.it): + - Simone Rubino \ diff --git a/web_widget_char_size/readme/DESCRIPTION.md b/web_widget_char_size/readme/DESCRIPTION.md new file mode 100644 index 00000000000..36d1de3032b --- /dev/null +++ b/web_widget_char_size/readme/DESCRIPTION.md @@ -0,0 +1,11 @@ +This module allows to add an option size to Char fields in web client: + +``` XML + +``` + +that allows to enter only the specified number of characters in the +field. + +Adding "size" as a parameter while defining Char field is deprecated +officially. diff --git a/web_widget_char_size/static/description/icon.png b/web_widget_char_size/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/web_widget_char_size/static/description/icon.png differ diff --git a/web_widget_char_size/static/description/index.html b/web_widget_char_size/static/description/index.html new file mode 100644 index 00000000000..2c899413d19 --- /dev/null +++ b/web_widget_char_size/static/description/index.html @@ -0,0 +1,440 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Widget Char size

+ +

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

+

This module allows to add an option size to Char fields in web client:

+
+<field name="sized_5_field" options="{'size': 5}"/>
+
+

that allows to enter only the specified number of characters in the +field.

+

Adding “size” as a parameter while defining Char field is deprecated +officially.

+

Table of contents

+ +
+

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

+
    +
  • Agile Business Group
  • +
+
+
+

Contributors

+ +
+
+

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_char_size/static/src/js/char_widget.esm.js b/web_widget_char_size/static/src/js/char_widget.esm.js new file mode 100644 index 00000000000..82107ff09c1 --- /dev/null +++ b/web_widget_char_size/static/src/js/char_widget.esm.js @@ -0,0 +1,22 @@ +import {CharField, charField} from "@web/views/fields/char/char_field"; +import {patch} from "@web/core/utils/patch"; + +// Extract the new prop from field options +const _extractProps = charField.extractProps; +charField.extractProps = ({attrs, options}) => { + return Object.assign(_extractProps({attrs, options}), { + maxLength: options.size, + }); +}; + +// Let the CharField component know that there is a new prop +CharField.props = { + ...CharField.props, + maxLength: {type: Number, optional: true}, +}; + +patch(CharField.prototype, { + get maxLength() { + return this.props.maxLength || super.maxLength; + }, +}); diff --git a/web_widget_image_download/README.rst b/web_widget_image_download/README.rst new file mode 100644 index 00000000000..a9b6e3fa7f0 --- /dev/null +++ b/web_widget_image_download/README.rst @@ -0,0 +1,103 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +=========================== +Web Widget - Image Download +=========================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:7e3521abc4c6b0c4669b624dbc3f75d77554ea0141243f065f9efd1f5c91e647 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-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_image_download + :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_image_download + :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 was written to extend the functionality of the image widget +and allows to download it. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, an example path is: + +1. Go to the section Contacts. +2. Click on a contact. +3. Edit the contact. +4. Click the Download button (on the top left corner). + +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 +* Kaushal Prajapati + +Contributors +------------ + +- `Tecnativa `__: + + - Flavio Corpa + - Jairo Llopis + - Pedro M. Baeza + - Ernesto Tejeda + - Alexandre Díaz + +- Kaushal Prajapati +- Peerapong Supasompob +- Manuel Regidor +- ``Heliconia Solutions Pvt. Ltd. ``\ \_ + +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_image_download/__init__.py b/web_widget_image_download/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/web_widget_image_download/__manifest__.py b/web_widget_image_download/__manifest__.py new file mode 100644 index 00000000000..2db1c6b6662 --- /dev/null +++ b/web_widget_image_download/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2016 Flavio Corpa +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). +{ + "name": "Web Widget - Image Download", + "summary": "Allows to download any image from its widget", + "version": "18.0.1.0.0", + "category": "web", + "website": "https://github.com/OCA/web", + "author": "Tecnativa, Odoo Community Association (OCA), Kaushal Prajapati", + "license": "LGPL-3", + "application": False, + "installable": True, + "depends": ["web"], + "assets": { + "web.assets_backend": [ + "web_widget_image_download/static/src/components/*", + "web_widget_image_download/static/src/xml/*", + ], + }, +} diff --git a/web_widget_image_download/i18n/es.po b/web_widget_image_download/i18n/es.po new file mode 100644 index 00000000000..fb9f40bef12 --- /dev/null +++ b/web_widget_image_download/i18n/es.po @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_widget_image_download +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-02-17 14:45+0000\n" +"Last-Translator: claudiagn \n" +"Language-Team: none\n" +"Language: es\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.3.2\n" + +#. module: web_widget_image_download +#. odoo-javascript +#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:0 +#, python-format +msgid "Download" +msgstr "Descargar" diff --git a/web_widget_image_download/i18n/hr.po b/web_widget_image_download/i18n/hr.po new file mode 100644 index 00000000000..078def81568 --- /dev/null +++ b/web_widget_image_download/i18n/hr.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_widget_image_download +# +# Translators: +# Bole , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-13 16:07+0000\n" +"PO-Revision-Date: 2017-07-13 16:07+0000\n" +"Last-Translator: Bole , 2017\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: web_widget_image_download +#. odoo-javascript +#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:0 +#, python-format +msgid "Download" +msgstr "Preuzimanje" diff --git a/web_widget_image_download/i18n/it.po b/web_widget_image_download/i18n/it.po new file mode 100644 index 00000000000..9d4cd3e823c --- /dev/null +++ b/web_widget_image_download/i18n/it.po @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_widget_image_download +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-09-04 18:36+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_image_download +#. odoo-javascript +#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:0 +#, python-format +msgid "Download" +msgstr "Scarica" diff --git a/web_widget_image_download/i18n/lt.po b/web_widget_image_download/i18n/lt.po new file mode 100644 index 00000000000..923d4dba8f5 --- /dev/null +++ b/web_widget_image_download/i18n/lt.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_widget_image_download +# +# Translators: +# Viktoras Norkus , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-25 01:58+0000\n" +"PO-Revision-Date: 2018-01-25 01:58+0000\n" +"Last-Translator: Viktoras Norkus , 2018\n" +"Language-Team: Lithuanian (https://www.transifex.com/oca/teams/23907/lt/)\n" +"Language: lt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"(n%100<10 || n%100>=20) ? 1 : 2);\n" + +#. module: web_widget_image_download +#. odoo-javascript +#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:0 +#, python-format +msgid "Download" +msgstr "Atsisiūsti" diff --git a/web_widget_image_download/i18n/nl_NL.po b/web_widget_image_download/i18n/nl_NL.po new file mode 100644 index 00000000000..f15070b1258 --- /dev/null +++ b/web_widget_image_download/i18n/nl_NL.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_widget_image_download +# +# Translators: +# Peter Hageman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-01 03:35+0000\n" +"PO-Revision-Date: 2017-07-01 03:35+0000\n" +"Last-Translator: Peter Hageman , 2017\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" +"teams/23907/nl_NL/)\n" +"Language: nl_NL\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_widget_image_download +#. odoo-javascript +#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:0 +#, python-format +msgid "Download" +msgstr "Download" diff --git a/web_widget_image_download/i18n/pt.po b/web_widget_image_download/i18n/pt.po new file mode 100644 index 00000000000..0da3a27cad6 --- /dev/null +++ b/web_widget_image_download/i18n/pt.po @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_widget_image_download +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-11-17 14:35+0000\n" +"Last-Translator: Pedro Castro Silva \n" +"Language-Team: none\n" +"Language: pt\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 3.8\n" + +#. module: web_widget_image_download +#. odoo-javascript +#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:0 +#, python-format +msgid "Download" +msgstr "Descarregar" diff --git a/web_widget_image_download/i18n/web_widget_image_download.pot b/web_widget_image_download/i18n/web_widget_image_download.pot new file mode 100644 index 00000000000..872b8feaa12 --- /dev/null +++ b/web_widget_image_download/i18n/web_widget_image_download.pot @@ -0,0 +1,20 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_widget_image_download +# +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_image_download +#. odoo-javascript +#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:0 +msgid "Download" +msgstr "" diff --git a/web_widget_image_download/i18n/zh_CN.po b/web_widget_image_download/i18n/zh_CN.po new file mode 100644 index 00000000000..a29f615ed9a --- /dev/null +++ b/web_widget_image_download/i18n/zh_CN.po @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_widget_image_download +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-09-01 17:23+0000\n" +"Last-Translator: 黎伟杰 <674416404@qq.com>\n" +"Language-Team: none\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 3.8\n" + +#. module: web_widget_image_download +#. odoo-javascript +#: code:addons/web_widget_image_download/static/src/xml/web_widget_image_download.xml:0 +#, python-format +msgid "Download" +msgstr "下载" diff --git a/web_widget_image_download/pyproject.toml b/web_widget_image_download/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/web_widget_image_download/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/web_widget_image_download/readme/CONTRIBUTORS.md b/web_widget_image_download/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..dcf683d8d28 --- /dev/null +++ b/web_widget_image_download/readme/CONTRIBUTORS.md @@ -0,0 +1,10 @@ +- [Tecnativa](https://www.tecnativa.com): + - Flavio Corpa + - Jairo Llopis + - Pedro M. Baeza + - Ernesto Tejeda + - Alexandre Díaz +- Kaushal Prajapati \<\> +- Peerapong Supasompob \<\> +- Manuel Regidor \<\> +- `Heliconia Solutions Pvt. Ltd. `_ diff --git a/web_widget_image_download/readme/DESCRIPTION.md b/web_widget_image_download/readme/DESCRIPTION.md new file mode 100644 index 00000000000..e946b6d4872 --- /dev/null +++ b/web_widget_image_download/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module was written to extend the functionality of the image widget +and allows to download it. diff --git a/web_widget_image_download/readme/USAGE.md b/web_widget_image_download/readme/USAGE.md new file mode 100644 index 00000000000..d417fd70c79 --- /dev/null +++ b/web_widget_image_download/readme/USAGE.md @@ -0,0 +1,6 @@ +To use this module, an example path is: + +1. Go to the section Contacts. +2. Click on a contact. +3. Edit the contact. +4. Click the Download button (on the top left corner). diff --git a/web_widget_image_download/static/description/icon.png b/web_widget_image_download/static/description/icon.png new file mode 100644 index 00000000000..65dabfc969b Binary files /dev/null and b/web_widget_image_download/static/description/icon.png differ diff --git a/web_widget_image_download/static/description/index.html b/web_widget_image_download/static/description/index.html new file mode 100644 index 00000000000..60b90695de5 --- /dev/null +++ b/web_widget_image_download/static/description/index.html @@ -0,0 +1,453 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Web Widget - Image Download

+ +

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

+

This module was written to extend the functionality of the image widget +and allows to download it.

+

Table of contents

+ +
+

Usage

+

To use this module, an example path is:

+
    +
  1. Go to the section Contacts.
  2. +
  3. Click on a contact.
  4. +
  5. Edit the contact.
  6. +
  7. Click the Download button (on the top left corner).
  8. +
+
+
+

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
  • +
  • Kaushal Prajapati
  • +
+
+
+

Contributors

+ +
+
+

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_image_download/static/src/components/image_field.esm.js b/web_widget_image_download/static/src/components/image_field.esm.js new file mode 100644 index 00000000000..fcb57a4f8cf --- /dev/null +++ b/web_widget_image_download/static/src/components/image_field.esm.js @@ -0,0 +1,22 @@ +/** @odoo-module **/ + +/* Copyright 2016 Flavio Corpa + * Copyright 2016 Jairo Llopis + * Copyright 2024 Manuel Regidor + * License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */ + +import {patch} from "@web/core/utils/patch"; +import {ImageField} from "@web/views/fields/image/image_field"; +const {document} = globalThis; + +patch(ImageField.prototype, { + download() { + const downloadLink = document.createElement("a"); + downloadLink.setAttribute("href", this.getUrl(this.props.name)); + downloadLink.setAttribute("download", ""); + downloadLink.click(); + }, + onFileDownload() { + this.download(); + }, +}); diff --git a/web_widget_image_download/static/src/xml/web_widget_image_download.xml b/web_widget_image_download/static/src/xml/web_widget_image_download.xml new file mode 100644 index 00000000000..3d184c3dd9e --- /dev/null +++ b/web_widget_image_download/static/src/xml/web_widget_image_download.xml @@ -0,0 +1,27 @@ + + +