3
0
Fork 0

[UPD] README.rst

13.0
OCA-git-bot 2020-03-09 07:36:38 +00:00
parent c2d65118cc
commit c395dbb074
2 changed files with 53 additions and 19 deletions

View File

@ -14,23 +14,28 @@ Web URL widget advanced
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3 :alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
:target: https://github.com/OCA/web/tree/12.0/web_widget_url_advanced :target: https://github.com/OCA/web/tree/13.0/web_widget_url_advanced
:alt: OCA/web :alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_widget_url_advanced :target: https://translation.odoo-community.org/projects/web-13-0/web-13-0-web_widget_url_advanced
:alt: Translate me on Weblate :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/162/12.0 :target: https://runbot.odoo-community.org/runbot/162/13.0
:alt: Try me on Runbot :alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
Extend URL widget features to ease customization of anchor's text. Extend URL widget features to ease customization of anchor's text.
By default the URL widget will show the plain URL. By default, the URL widget will show the plain URL.
You can specify an attribute `text` to provide a static label too. You can specify an attribute to provide a static label too.
With this module you can use a field for link's inner text. 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** **Table of contents**
@ -61,26 +66,37 @@ if you want to display the website link with partner's name as anchor you can do
This is going to change the rendering from This is going to change the rendering from
.. figure:: https://raw.githubusercontent.com/OCA/web/12.0/web_widget_url_advanced/static/description/before.png .. figure:: https://raw.githubusercontent.com/OCA/web/13.0/web_widget_url_advanced/static/description/before.png
to to
.. figure:: https://raw.githubusercontent.com/OCA/web/12.0/web_widget_url_advanced/static/description/after.png .. figure:: https://raw.githubusercontent.com/OCA/web/13.0/web_widget_url_advanced/static/description/after.png
Or user can add any hyperlink text using 'prefix_name' attribute
.. code-block:: xml
<field name="skype_name" widget="url" 'prefix_name': 'skype'/>
both can be applied inside the options attribute too:
.. code-block:: xml
<field name="skype_name" widget="url" options="{'prefix_name': 'skype'}"/>
Known issues / Roadmap Known issues / Roadmap
====================== ======================
* ``<field text_field="foo"/>`` is not supported in tree views. * ``<field text_field="foo"/>`` is not supported in tree views.
Bug Tracker Bug Tracker
=========== ===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_. Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
In case of trouble, please check there if your issue has already been reported. In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_widget_url_advanced%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. `feedback <https://github.com/OCA/web/issues/new?body=module:%20web_widget_url_advanced%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues. Do not contact contributors directly about support or help with technical issues.
@ -97,6 +113,9 @@ Contributors
* Simone Orsi <simone.orsi@camptocamp.com> * Simone Orsi <simone.orsi@camptocamp.com>
* Alexey Pelykh <alexey.pelykh@brainbeanapps.com> * Alexey Pelykh <alexey.pelykh@brainbeanapps.com>
* Jay Vora <jay.vora@serpentcs.com>
* Swapnesh Shah <s.shah.serpentcs@gmail.com>
* Joan Sisquella <joan.sisquella@forgeflow.com>
Maintainers Maintainers
~~~~~~~~~~~ ~~~~~~~~~~~
@ -111,6 +130,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use. promote its widespread use.
This module is part of the `OCA/web <https://github.com/OCA/web/tree/12.0/web_widget_url_advanced>`_ project on GitHub. This module is part of the `OCA/web <https://github.com/OCA/web/tree/13.0/web_widget_url_advanced>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@ -367,11 +367,15 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/web/tree/12.0/web_widget_url_advanced"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_widget_url_advanced"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/162/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/web/tree/13.0/web_widget_url_advanced"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/web-13-0/web-13-0-web_widget_url_advanced"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/162/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>Extend URL widget features to ease customization of anchors text.</p> <p>Extend URL widget features to ease customization of anchors text.</p>
<p>By default the URL widget will show the plain URL. <p>By default, the URL widget will show the plain URL.
You can specify an attribute <cite>text</cite> to provide a static label too.</p> You can specify an attribute to provide a static label too.</p>
<p>With this module you can use a field for links inner text.</p> <p>With this module, you can use a field for links inner text using attribute
text_field. You can also add a prefix to the link using attribute
prefix_name.</p>
<p>Until 13.0 this functionality was separated in modules web_widget_url_advanced
and web_widget_prefixed_url</p>
<p><strong>Table of contents</strong></p> <p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents"> <div class="contents local topic" id="contents">
<ul class="simple"> <ul class="simple">
@ -401,12 +405,20 @@ if you want to display the website link with partners name as anchor you can
</pre> </pre>
<p>This is going to change the rendering from</p> <p>This is going to change the rendering from</p>
<div class="figure"> <div class="figure">
<img alt="https://raw.githubusercontent.com/OCA/web/12.0/web_widget_url_advanced/static/description/before.png" src="https://raw.githubusercontent.com/OCA/web/12.0/web_widget_url_advanced/static/description/before.png" /> <img alt="https://raw.githubusercontent.com/OCA/web/13.0/web_widget_url_advanced/static/description/before.png" src="https://raw.githubusercontent.com/OCA/web/13.0/web_widget_url_advanced/static/description/before.png" />
</div> </div>
<p>to</p> <p>to</p>
<div class="figure"> <div class="figure">
<img alt="https://raw.githubusercontent.com/OCA/web/12.0/web_widget_url_advanced/static/description/after.png" src="https://raw.githubusercontent.com/OCA/web/12.0/web_widget_url_advanced/static/description/after.png" /> <img alt="https://raw.githubusercontent.com/OCA/web/13.0/web_widget_url_advanced/static/description/after.png" src="https://raw.githubusercontent.com/OCA/web/13.0/web_widget_url_advanced/static/description/after.png" />
</div> </div>
<p>Or user can add any hyperlink text using prefix_name attribute</p>
<pre class="code xml literal-block">
<span class="nt">&lt;field</span> <span class="na">name=</span><span class="s">&quot;skype_name&quot;</span> <span class="na">widget=</span><span class="s">&quot;url&quot;</span> <span class="err">'prefix_name':</span> <span class="err">'skype'</span><span class="nt">/&gt;</span>
</pre>
<p>both can be applied inside the options attribute too:</p>
<pre class="code xml literal-block">
<span class="nt">&lt;field</span> <span class="na">name=</span><span class="s">&quot;skype_name&quot;</span> <span class="na">widget=</span><span class="s">&quot;url&quot;</span> <span class="na">options=</span><span class="s">&quot;{'prefix_name': 'skype'}&quot;</span><span class="nt">/&gt;</span>
</pre>
</div> </div>
<div class="section" id="known-issues-roadmap"> <div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#id2">Known issues / Roadmap</a></h1> <h1><a class="toc-backref" href="#id2">Known issues / Roadmap</a></h1>
@ -419,7 +431,7 @@ if you want to display the website link with partners name as anchor you can
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>. <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported. In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_widget_url_advanced%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_widget_url_advanced%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
@ -435,6 +447,9 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<ul class="simple"> <ul class="simple">
<li>Simone Orsi &lt;<a class="reference external" href="mailto:simone.orsi&#64;camptocamp.com">simone.orsi&#64;camptocamp.com</a>&gt;</li> <li>Simone Orsi &lt;<a class="reference external" href="mailto:simone.orsi&#64;camptocamp.com">simone.orsi&#64;camptocamp.com</a>&gt;</li>
<li>Alexey Pelykh &lt;<a class="reference external" href="mailto:alexey.pelykh&#64;brainbeanapps.com">alexey.pelykh&#64;brainbeanapps.com</a>&gt;</li> <li>Alexey Pelykh &lt;<a class="reference external" href="mailto:alexey.pelykh&#64;brainbeanapps.com">alexey.pelykh&#64;brainbeanapps.com</a>&gt;</li>
<li>Jay Vora &lt;<a class="reference external" href="mailto:jay.vora&#64;serpentcs.com">jay.vora&#64;serpentcs.com</a>&gt;</li>
<li>Swapnesh Shah &lt;<a class="reference external" href="mailto:s.shah.serpentcs&#64;gmail.com">s.shah.serpentcs&#64;gmail.com</a>&gt;</li>
<li>Joan Sisquella &lt;<a class="reference external" href="mailto:joan.sisquella&#64;forgeflow.com">joan.sisquella&#64;forgeflow.com</a>&gt;</li>
</ul> </ul>
</div> </div>
<div class="section" id="maintainers"> <div class="section" id="maintainers">
@ -444,7 +459,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use.</p> promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/12.0/web_widget_url_advanced">OCA/web</a> project on GitHub.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/13.0/web_widget_url_advanced">OCA/web</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div> </div>
</div> </div>