From c85c6ed415c4dadd51f2728f1e01ebaaa1a40610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nedas=20=C5=BDilinskas?= Date: Mon, 27 May 2024 14:51:00 +0300 Subject: [PATCH] [IMP] web_widget_url_advanced: pre-commit auto fixes --- web_widget_url_advanced/README.rst | 84 +++++++++---------- web_widget_url_advanced/pyproject.toml | 3 + .../readme/CONTRIBUTORS.md | 7 ++ .../readme/CONTRIBUTORS.rst | 9 -- web_widget_url_advanced/readme/DESCRIPTION.md | 11 +++ .../readme/DESCRIPTION.rst | 11 --- web_widget_url_advanced/readme/ROADMAP.md | 1 + web_widget_url_advanced/readme/ROADMAP.rst | 1 - web_widget_url_advanced/readme/USAGE.md | 36 ++++++++ web_widget_url_advanced/readme/USAGE.rst | 39 --------- .../static/description/index.html | 40 ++++----- 11 files changed, 118 insertions(+), 124 deletions(-) create mode 100644 web_widget_url_advanced/pyproject.toml create mode 100644 web_widget_url_advanced/readme/CONTRIBUTORS.md delete mode 100644 web_widget_url_advanced/readme/CONTRIBUTORS.rst create mode 100644 web_widget_url_advanced/readme/DESCRIPTION.md delete mode 100644 web_widget_url_advanced/readme/DESCRIPTION.rst create mode 100644 web_widget_url_advanced/readme/ROADMAP.md delete mode 100644 web_widget_url_advanced/readme/ROADMAP.rst create mode 100644 web_widget_url_advanced/readme/USAGE.md delete mode 100644 web_widget_url_advanced/readme/USAGE.rst diff --git a/web_widget_url_advanced/README.rst b/web_widget_url_advanced/README.rst index a85489859..242ef3146 100644 --- a/web_widget_url_advanced/README.rst +++ b/web_widget_url_advanced/README.rst @@ -17,28 +17,28 @@ Web URL widget advanced :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/15.0/web_widget_url_advanced + :target: https://github.com/OCA/web/tree/17.0/web_widget_url_advanced :alt: OCA/web .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_widget_url_advanced + :target: https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_widget_url_advanced :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=15.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| Extend URL widget features to ease customization of anchor's text. -By default, the URL widget will show the plain URL. -You can specify an attribute to provide a static label too. +By default, the URL widget will show the plain URL. You can specify an +attribute to provide a static label too. -With this module, you can use a field for link's inner text using attribute -'text_field'. You can also add a prefix to the link using attribute -'prefix_name'. +With this module, you can use a field for link's inner text using +attribute 'text_field'. You can also add a prefix to the link using +attribute 'prefix_name'. -Until 13.0 this functionality was separated in modules 'web_widget_url_advanced' -and 'web_widget_prefixed_url' +Until 13.0 this functionality was separated in modules +'web_widget_url_advanced' and 'web_widget_prefixed_url' **Table of contents** @@ -48,50 +48,50 @@ and 'web_widget_prefixed_url' Usage ===== -Use `url` widget as you do usually, then add an extra parameter `text_field` -to indicate which field (present in the view already) must be used for the anchor text. +Use url widget as you do usually, then add an extra parameter text_field +to indicate which field (present in the view already) must be used for +the anchor text. +.. code:: xml -.. code-block:: xml + - +M2O fields are supported: display_name is used automatically. -M2O fields are supported: `display_name` is used automatically. +For example, in the partner form, if you want to display the website +link with partner's name as anchor you can do: +.. code:: xml -For example, in the partner form, -if you want to display the website link with partner's name as anchor you can do: - - -.. code-block:: xml - - + This is going to change the rendering from -.. figure:: https://raw.githubusercontent.com/OCA/web/15.0/web_widget_url_advanced/static/description/before.png - +|image1| to -.. figure:: https://raw.githubusercontent.com/OCA/web/15.0/web_widget_url_advanced/static/description/after.png +|image2| Or user can add any hyperlink text using 'prefix_name' attribute -.. code-block:: xml +.. code:: xml - + both can be applied inside the options attribute too: -.. code-block:: xml +.. code:: xml - + + +.. |image1| image:: https://raw.githubusercontent.com/OCA/web/17.0/web_widget_url_advanced/static/description/before.png +.. |image2| image:: https://raw.githubusercontent.com/OCA/web/17.0/web_widget_url_advanced/static/description/after.png Known issues / Roadmap ====================== -* ```` is not supported in tree views. +- ```` is not supported in tree views. Bug Tracker =========== @@ -99,7 +99,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. @@ -107,25 +107,25 @@ Credits ======= Authors -~~~~~~~ +------- * Camptocamp Contributors -~~~~~~~~~~~~ +------------ -* Simone Orsi -* `CorporateHub `__ +- Simone Orsi +- `CorporateHub `__ - * Alexey Pelykh + - Alexey Pelykh -* Jay Vora -* Swapnesh Shah -* Joan Sisquella -* Peerapong Supasompob +- Jay Vora +- Swapnesh Shah +- Joan Sisquella +- Peerapong Supasompob Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -137,6 +137,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_url_advanced/pyproject.toml b/web_widget_url_advanced/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/web_widget_url_advanced/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/web_widget_url_advanced/readme/CONTRIBUTORS.md b/web_widget_url_advanced/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..af152415b --- /dev/null +++ b/web_widget_url_advanced/readme/CONTRIBUTORS.md @@ -0,0 +1,7 @@ +- Simone Orsi \<\> +- [CorporateHub](https://corporatehub.eu/) + - Alexey Pelykh \<\> +- Jay Vora \<\> +- Swapnesh Shah \<\> +- Joan Sisquella \<\> +- Peerapong Supasompob \<\> diff --git a/web_widget_url_advanced/readme/CONTRIBUTORS.rst b/web_widget_url_advanced/readme/CONTRIBUTORS.rst deleted file mode 100644 index eaab2758a..000000000 --- a/web_widget_url_advanced/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,9 +0,0 @@ -* Simone Orsi -* `CorporateHub `__ - - * Alexey Pelykh - -* Jay Vora -* Swapnesh Shah -* Joan Sisquella -* Peerapong Supasompob diff --git a/web_widget_url_advanced/readme/DESCRIPTION.md b/web_widget_url_advanced/readme/DESCRIPTION.md new file mode 100644 index 000000000..af45385be --- /dev/null +++ b/web_widget_url_advanced/readme/DESCRIPTION.md @@ -0,0 +1,11 @@ +Extend URL widget features to ease customization of anchor's text. + +By default, the URL widget will show the plain URL. You can specify an +attribute to provide a static label too. + +With this module, you can use a field for link's inner text using +attribute 'text_field'. You can also add a prefix to the link using +attribute 'prefix_name'. + +Until 13.0 this functionality was separated in modules +'web_widget_url_advanced' and 'web_widget_prefixed_url' diff --git a/web_widget_url_advanced/readme/DESCRIPTION.rst b/web_widget_url_advanced/readme/DESCRIPTION.rst deleted file mode 100644 index 880e48a64..000000000 --- a/web_widget_url_advanced/readme/DESCRIPTION.rst +++ /dev/null @@ -1,11 +0,0 @@ -Extend URL widget features to ease customization of anchor's text. - -By default, the URL widget will show the plain URL. -You can specify an attribute to provide a static label too. - -With this module, you can use a field for link's inner text using attribute -'text_field'. You can also add a prefix to the link using attribute -'prefix_name'. - -Until 13.0 this functionality was separated in modules 'web_widget_url_advanced' -and 'web_widget_prefixed_url' diff --git a/web_widget_url_advanced/readme/ROADMAP.md b/web_widget_url_advanced/readme/ROADMAP.md new file mode 100644 index 000000000..29709154a --- /dev/null +++ b/web_widget_url_advanced/readme/ROADMAP.md @@ -0,0 +1 @@ +- `` is not supported in tree views. diff --git a/web_widget_url_advanced/readme/ROADMAP.rst b/web_widget_url_advanced/readme/ROADMAP.rst deleted file mode 100644 index 200b385d5..000000000 --- a/web_widget_url_advanced/readme/ROADMAP.rst +++ /dev/null @@ -1 +0,0 @@ -* ```` is not supported in tree views. diff --git a/web_widget_url_advanced/readme/USAGE.md b/web_widget_url_advanced/readme/USAGE.md new file mode 100644 index 000000000..c035778d5 --- /dev/null +++ b/web_widget_url_advanced/readme/USAGE.md @@ -0,0 +1,36 @@ +Use url widget as you do usually, then add an extra parameter text_field +to indicate which field (present in the view already) must be used for +the anchor text. + +``` xml + +``` + +M2O fields are supported: display_name is used automatically. + +For example, in the partner form, if you want to display the website +link with partner's name as anchor you can do: + +``` xml + +``` + +This is going to change the rendering from + +![](../static/description/before.png) + +to + +![](../static/description/after.png) + +Or user can add any hyperlink text using 'prefix_name' attribute + +``` xml + +``` + +both can be applied inside the options attribute too: + +``` xml + +``` diff --git a/web_widget_url_advanced/readme/USAGE.rst b/web_widget_url_advanced/readme/USAGE.rst deleted file mode 100644 index fbd872911..000000000 --- a/web_widget_url_advanced/readme/USAGE.rst +++ /dev/null @@ -1,39 +0,0 @@ -Use `url` widget as you do usually, then add an extra parameter `text_field` -to indicate which field (present in the view already) must be used for the anchor text. - - -.. code-block:: xml - - - -M2O fields are supported: `display_name` is used automatically. - - -For example, in the partner form, -if you want to display the website link with partner's name as anchor you can do: - - -.. code-block:: xml - - - -This is going to change the rendering from - -.. figure:: ../static/description/before.png - - -to - -.. figure:: ../static/description/after.png - -Or user can add any hyperlink text using 'prefix_name' attribute - -.. code-block:: xml - - - -both can be applied inside the options attribute too: - -.. code-block:: xml - - diff --git a/web_widget_url_advanced/static/description/index.html b/web_widget_url_advanced/static/description/index.html index 784491d78..178c36307 100644 --- a/web_widget_url_advanced/static/description/index.html +++ b/web_widget_url_advanced/static/description/index.html @@ -1,4 +1,3 @@ - @@ -369,15 +368,15 @@ ul.auto-toc { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:c59446ba9b925182f7f539451bdc856f54709cb1c575d33698658f497c8872ba !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

Extend URL widget features to ease customization of anchor’s text.

-

By default, the URL widget will show the plain URL. -You can specify an attribute to provide a static label too.

-

With this module, you can use a field for link’s inner text using attribute -‘text_field’. You can also add a prefix to the link using attribute -‘prefix_name’.

-

Until 13.0 this functionality was separated in modules ‘web_widget_url_advanced’ -and ‘web_widget_prefixed_url’

+

By default, the URL widget will show the plain URL. You can specify an +attribute to provide a static label too.

+

With this module, you can use a field for link’s inner text using +attribute ‘text_field’. You can also add a prefix to the link using +attribute ‘prefix_name’.

+

Until 13.0 this functionality was separated in modules +‘web_widget_url_advanced’ and ‘web_widget_prefixed_url’

Table of contents

    @@ -394,25 +393,22 @@ and ‘web_widget_prefixed_url’

Usage

-

Use url widget as you do usually, then add an extra parameter text_field -to indicate which field (present in the view already) must be used for the anchor text.

+

Use url widget as you do usually, then add an extra parameter text_field +to indicate which field (present in the view already) must be used for +the anchor text.

 <field name="some_url" widget="url" text_field="another_field" />
 
-

M2O fields are supported: display_name is used automatically.

-

For example, in the partner form, -if you want to display the website link with partner’s name as anchor you can do:

+

M2O fields are supported: display_name is used automatically.

+

For example, in the partner form, if you want to display the website +link with partner’s name as anchor you can do:

 <field name="website" widget="url" text_field="name" placeholder="e.g. www.odoo.com"/>
 

This is going to change the rendering from

-
-https://raw.githubusercontent.com/OCA/web/15.0/web_widget_url_advanced/static/description/before.png -
+

image1

to

-
-https://raw.githubusercontent.com/OCA/web/15.0/web_widget_url_advanced/static/description/after.png -
+

image2

Or user can add any hyperlink text using ‘prefix_name’ attribute

 <field name="skype_name" widget="url" 'prefix_name': 'skype'/>
@@ -433,7 +429,7 @@ if you want to display the website link with partner’s name as anchor you can
 

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.

@@ -465,7 +461,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome

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.