3
0
Fork 0

[MIG] web_widget_open_tab: Migration to 13.0

15.0-ocabot-merge-pr-2789-by-pedrobaeza-bump-patch
Raf Ven 2020-12-07 10:14:21 +01:00
parent c2d559d017
commit 4393c4f405
7 changed files with 27 additions and 18 deletions

View File

@ -14,18 +14,20 @@ Widget Open on new Tab
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-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_open_tab :target: https://github.com/OCA/web/tree/13.0/web_widget_open_tab
: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_open_tab :target: https://translation.odoo-community.org/projects/web-13-0/web-13-0-web_widget_open_tab
: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|
This addon creates a new widget that can be used to open on a new tab a record from a tree. This addon introduces a new widget.
When added to a field in a tree view, the field appears as a button which opens the record in a new tab.
When clicking on the line (but not on the button), the record is opened in the same window (as in native Odoo).
**Table of contents** **Table of contents**
@ -40,7 +42,7 @@ Edit the tree view and add the widget as the first field, usually, we should use
<field name="id" widget="open_tab"/> <field name="id" widget="open_tab"/>
Now, we can open when clicking with the mouse wheel over the eye. You can open the record in a new tab when clicking with the mouse wheel on the external link icon.
On a usual click the record will be opened without changes (keeping the breadcrumbs). On a usual click the record will be opened without changes (keeping the breadcrumbs).
Bug Tracker Bug Tracker
@ -49,7 +51,7 @@ 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_open_tab%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_open_tab%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.
@ -65,6 +67,7 @@ Contributors
~~~~~~~~~~~~ ~~~~~~~~~~~~
* Enric Tobella <etobella@creublanca.es> * Enric Tobella <etobella@creublanca.es>
* Raf Ven <raf.ven@dynapps.be>
Maintainers Maintainers
~~~~~~~~~~~ ~~~~~~~~~~~
@ -79,6 +82,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_open_tab>`_ project on GitHub. This module is part of the `OCA/web <https://github.com/OCA/web/tree/13.0/web_widget_open_tab>`_ 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

@ -5,7 +5,7 @@
"name": "Widget Open on new Tab", "name": "Widget Open on new Tab",
"summary": """ "summary": """
Allow to open record from trees on new tab from tree views""", Allow to open record from trees on new tab from tree views""",
"version": "12.0.1.0.1", "version": "13.0.1.0.0",
"license": "AGPL-3", "license": "AGPL-3",
"author": "Creu Blanca,Odoo Community Association (OCA)", "author": "Creu Blanca,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web", "website": "https://github.com/OCA/web",

View File

@ -1 +1,2 @@
* Enric Tobella <etobella@creublanca.es> * Enric Tobella <etobella@creublanca.es>
* Raf Ven <raf.ven@dynapps.be>

View File

@ -1 +1,3 @@
This addon creates a new widget that can be used to open on a new tab a record from a tree. This addon introduces a new widget.
When added to a field in a tree view, the field appears as a button which opens the record in a new tab.
When clicking on the line (but not on the button), the record is opened in the same window (as in native Odoo).

View File

@ -3,5 +3,5 @@ Edit the tree view and add the widget as the first field, usually, we should use
<field name="id" widget="open_tab"/> <field name="id" widget="open_tab"/>
Now, we can open when clicking with the mouse wheel over the eye. You can open the record in a new tab when clicking with the mouse wheel on the external link icon.
On a usual click the record will be opened without changes (keeping the breadcrumbs). On a usual click the record will be opened without changes (keeping the breadcrumbs).

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" /> <meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
<title>Widget Open on new Tab</title> <title>Widget Open on new Tab</title>
<style type="text/css"> <style type="text/css">
@ -367,8 +367,10 @@ 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/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/web/tree/12.0/web_widget_open_tab"><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_open_tab"><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/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/web/tree/13.0/web_widget_open_tab"><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_open_tab"><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>This addon creates a new widget that can be used to open on a new tab a record from a tree.</p> <p>This addon introduces a new widget.
When added to a field in a tree view, the field appears as a button which opens the record in a new tab.
When clicking on the line (but not on the button), the record is opened in the same window (as in native Odoo).</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">
@ -388,7 +390,7 @@ ul.auto-toc {
.. code-block:: xml</p> .. code-block:: xml</p>
<blockquote> <blockquote>
&lt;field name=”id” widget=”open_tab”/&gt;</blockquote> &lt;field name=”id” widget=”open_tab”/&gt;</blockquote>
<p>Now, we can open when clicking with the mouse wheel over the eye. <p>You can open the record in a new tab when clicking with the mouse wheel on the external link icon.
On a usual click the record will be opened without changes (keeping the breadcrumbs).</p> On a usual click the record will be opened without changes (keeping the breadcrumbs).</p>
</div> </div>
<div class="section" id="bug-tracker"> <div class="section" id="bug-tracker">
@ -396,7 +398,7 @@ On a usual click the record will be opened without changes (keeping the breadcru
<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_open_tab%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_open_tab%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">
@ -411,6 +413,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<h2><a class="toc-backref" href="#id5">Contributors</a></h2> <h2><a class="toc-backref" href="#id5">Contributors</a></h2>
<ul class="simple"> <ul class="simple">
<li>Enric Tobella &lt;<a class="reference external" href="mailto:etobella&#64;creublanca.es">etobella&#64;creublanca.es</a>&gt;</li> <li>Enric Tobella &lt;<a class="reference external" href="mailto:etobella&#64;creublanca.es">etobella&#64;creublanca.es</a>&gt;</li>
<li>Raf Ven &lt;<a class="reference external" href="mailto:raf.ven&#64;dynapps.be">raf.ven&#64;dynapps.be</a>&gt;</li>
</ul> </ul>
</div> </div>
<div class="section" id="maintainers"> <div class="section" id="maintainers">
@ -420,7 +423,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_open_tab">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_open_tab">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>

View File

@ -36,7 +36,7 @@ odoo.define("web_widget_open_tab.FieldOpenTab", function(require) {
_renderReadonly: function() { _renderReadonly: function() {
var $content = $("<a/>", { var $content = $("<a/>", {
href: this._getReference(), href: this._getReference(),
class: "open_tab_widget fa fa-eye", class: "open_tab_widget fa fa-external-link",
}); });
var self = this; var self = this;
$content.tooltip({ $content.tooltip({
@ -60,7 +60,7 @@ odoo.define("web_widget_open_tab.FieldOpenTab", function(require) {
ev.preventDefault(); ev.preventDefault();
ev.stopPropagation(); ev.stopPropagation();
var element = $(ev.currentTarget).find("a"); var element = $(ev.currentTarget).find("a");
if (element != null && element[0].href != null) { if (element !== null && element[0].href !== null) {
window.open(this._getReference()); window.open(this._getReference());
} }
}, },