From 9e415ab1a11806f41f0fb16cca2ed0079cc153b0 Mon Sep 17 00:00:00 2001 From: Carlos Roca Date: Mon, 12 Aug 2024 08:48:45 +0200 Subject: [PATCH] [IMP] web_widget_dropdown_dynamic: pre-commit auto fixes --- web_widget_dropdown_dynamic/README.rst | 90 ++++++++--------- web_widget_dropdown_dynamic/pyproject.toml | 3 + .../readme/CONTRIBUTORS.md | 13 +++ .../readme/CONTRIBUTORS.rst | 12 --- .../readme/{CREDITS.rst => CREDITS.md} | 3 +- .../readme/DESCRIPTION.md | 9 ++ .../readme/DESCRIPTION.rst | 9 -- web_widget_dropdown_dynamic/readme/USAGE.md | 24 +++++ web_widget_dropdown_dynamic/readme/USAGE.rst | 24 ----- .../static/description/index.html | 97 ++++++++++--------- 10 files changed, 147 insertions(+), 137 deletions(-) create mode 100644 web_widget_dropdown_dynamic/pyproject.toml create mode 100644 web_widget_dropdown_dynamic/readme/CONTRIBUTORS.md delete mode 100644 web_widget_dropdown_dynamic/readme/CONTRIBUTORS.rst rename web_widget_dropdown_dynamic/readme/{CREDITS.rst => CREDITS.md} (73%) create mode 100644 web_widget_dropdown_dynamic/readme/DESCRIPTION.md delete mode 100644 web_widget_dropdown_dynamic/readme/DESCRIPTION.rst create mode 100644 web_widget_dropdown_dynamic/readme/USAGE.md delete mode 100644 web_widget_dropdown_dynamic/readme/USAGE.rst diff --git a/web_widget_dropdown_dynamic/README.rst b/web_widget_dropdown_dynamic/README.rst index 6abcf43e0..6777712b9 100644 --- a/web_widget_dropdown_dynamic/README.rst +++ b/web_widget_dropdown_dynamic/README.rst @@ -17,26 +17,26 @@ Dynamic Dropdown Widget :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/16.0/web_widget_dropdown_dynamic + :target: https://github.com/OCA/web/tree/17.0/web_widget_dropdown_dynamic :alt: OCA/web .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_widget_dropdown_dynamic + :target: https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_widget_dropdown_dynamic :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=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=17.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| Dynamic dropdown widget that supports resolving options from backend of: - * ``fields.Char`` - * ``fields.Integer`` - * ``fields.Selection`` + - ``fields.Char`` + - ``fields.Integer`` + - ``fields.Selection`` -**NOTE:** This widget is not intended to *extend* ``fields.Selection``, but to -filter selection values. For fully-dynamic set of options, use ``fields.Char`` -instead. +**NOTE:** This widget is not intended to *extend* ``fields.Selection``, +but to filter selection values. For fully-dynamic set of options, use +``fields.Char`` instead. **Table of contents** @@ -46,30 +46,30 @@ instead. Usage ===== -.. code-block:: python +.. code:: python - @api.model - def method_name(self): - values = [ - ('value_a', 'Title A'), - ] - if self.env.context.get('depending_on') == True: - values += [ - ('value_b', 'Title B'), - ] - return values + @api.model + def method_name(self): + values = [ + ('value_a', 'Title A'), + ] + if self.env.context.get('depending_on') == True: + values += [ + ('value_b', 'Title B'), + ] + return values -.. code-block:: xml +.. code:: xml - - + + Bug Tracker =========== @@ -77,7 +77,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -85,33 +85,35 @@ Credits ======= Authors -~~~~~~~ +------- * CorporateHub Contributors -~~~~~~~~~~~~ +------------ -* `CorporateHub `__ +- `CorporateHub `__ - * Alexey Pelykh + - Alexey Pelykh -* `Therp BV `__ +- `Therp BV `__ - * Ronald Portier + - Ronald Portier -* Thanakrit Pintana -* `Trobz `_: +- Thanakrit Pintana - * Son Ho +- `Trobz `__: + + - Son Ho Other credits -~~~~~~~~~~~~~ +------------- -The migration of this module from 15.0 to 16.0 was financially supported by Camptocamp +The migration of this module from 15.0 to 16.0 was financially supported +by Camptocamp Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -123,6 +125,6 @@ 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. +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_dropdown_dynamic/pyproject.toml b/web_widget_dropdown_dynamic/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/web_widget_dropdown_dynamic/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/web_widget_dropdown_dynamic/readme/CONTRIBUTORS.md b/web_widget_dropdown_dynamic/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..82d63ce62 --- /dev/null +++ b/web_widget_dropdown_dynamic/readme/CONTRIBUTORS.md @@ -0,0 +1,13 @@ +- [CorporateHub](https://corporatehub.eu/) + + - Alexey Pelykh \<\> + +- [Therp BV](https://therp.nl/) + + - Ronald Portier \<\> + +- Thanakrit Pintana \<\> + +- [Trobz](https://trobz.com): + + > - Son Ho \<\> diff --git a/web_widget_dropdown_dynamic/readme/CONTRIBUTORS.rst b/web_widget_dropdown_dynamic/readme/CONTRIBUTORS.rst deleted file mode 100644 index 081566b1c..000000000 --- a/web_widget_dropdown_dynamic/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,12 +0,0 @@ -* `CorporateHub `__ - - * Alexey Pelykh - -* `Therp BV `__ - - * Ronald Portier - -* Thanakrit Pintana -* `Trobz `_: - - * Son Ho diff --git a/web_widget_dropdown_dynamic/readme/CREDITS.rst b/web_widget_dropdown_dynamic/readme/CREDITS.md similarity index 73% rename from web_widget_dropdown_dynamic/readme/CREDITS.rst rename to web_widget_dropdown_dynamic/readme/CREDITS.md index 70bc307ad..291e14c81 100644 --- a/web_widget_dropdown_dynamic/readme/CREDITS.rst +++ b/web_widget_dropdown_dynamic/readme/CREDITS.md @@ -1 +1,2 @@ -The migration of this module from 15.0 to 16.0 was financially supported by Camptocamp +The migration of this module from 15.0 to 16.0 was financially supported +by Camptocamp diff --git a/web_widget_dropdown_dynamic/readme/DESCRIPTION.md b/web_widget_dropdown_dynamic/readme/DESCRIPTION.md new file mode 100644 index 000000000..e48e2f574 --- /dev/null +++ b/web_widget_dropdown_dynamic/readme/DESCRIPTION.md @@ -0,0 +1,9 @@ +Dynamic dropdown widget that supports resolving options from backend of: + +> - `fields.Char` +> - `fields.Integer` +> - `fields.Selection` + +**NOTE:** This widget is not intended to *extend* `fields.Selection`, +but to filter selection values. For fully-dynamic set of options, use +`fields.Char` instead. diff --git a/web_widget_dropdown_dynamic/readme/DESCRIPTION.rst b/web_widget_dropdown_dynamic/readme/DESCRIPTION.rst deleted file mode 100644 index 1ce39c5f7..000000000 --- a/web_widget_dropdown_dynamic/readme/DESCRIPTION.rst +++ /dev/null @@ -1,9 +0,0 @@ -Dynamic dropdown widget that supports resolving options from backend of: - - * ``fields.Char`` - * ``fields.Integer`` - * ``fields.Selection`` - -**NOTE:** This widget is not intended to *extend* ``fields.Selection``, but to -filter selection values. For fully-dynamic set of options, use ``fields.Char`` -instead. diff --git a/web_widget_dropdown_dynamic/readme/USAGE.md b/web_widget_dropdown_dynamic/readme/USAGE.md new file mode 100644 index 000000000..3f2522b1d --- /dev/null +++ b/web_widget_dropdown_dynamic/readme/USAGE.md @@ -0,0 +1,24 @@ +``` python +@api.model +def method_name(self): + values = [ + ('value_a', 'Title A'), + ] + if self.env.context.get('depending_on') == True: + values += [ + ('value_b', 'Title B'), + ] + return values +``` + +``` xml + + +``` diff --git a/web_widget_dropdown_dynamic/readme/USAGE.rst b/web_widget_dropdown_dynamic/readme/USAGE.rst deleted file mode 100644 index 0d74a1ece..000000000 --- a/web_widget_dropdown_dynamic/readme/USAGE.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. code-block:: python - - @api.model - def method_name(self): - values = [ - ('value_a', 'Title A'), - ] - if self.env.context.get('depending_on') == True: - values += [ - ('value_b', 'Title B'), - ] - return values - -.. code-block:: xml - - - diff --git a/web_widget_dropdown_dynamic/static/description/index.html b/web_widget_dropdown_dynamic/static/description/index.html index 99d63ad65..8cb1a5085 100644 --- a/web_widget_dropdown_dynamic/static/description/index.html +++ b/web_widget_dropdown_dynamic/static/description/index.html @@ -1,20 +1,20 @@ - - + Dynamic Dropdown Widget