Skip to content

Commit

Permalink
Merge PR #2671 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by dreispt
  • Loading branch information
OCA-git-bot committed May 18, 2024
2 parents 768e23c + 5ab1cf6 commit d3a8f98
Show file tree
Hide file tree
Showing 25 changed files with 1,077 additions and 0 deletions.
106 changes: 106 additions & 0 deletions web_widget_open_tab/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
======================
Widget Open on new Tab
======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a14f7a08311efe9efc5c2e59a089a3adfe9f4a41cafd1c7c4c8bf9aac5db6706
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/licence-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/17.0/web_widget_open_tab
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_widget_open_tab
: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=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

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**

.. contents::
:local:

Usage
=====

Edit the tree view and add the widget as the first field, usually, we
should use: .. code-block:: xml

<field name="id" widget="open_tab"/>

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).

You can also add open-tab field in tree views by selecting "Add Open Tab
Field" field in the ir.model record. When you do this, the open-tab
field is added right after the name field in the tree if the field
exists, otherwise at the beginning of the tree.

Known issues / Roadmap
======================

- Add many2one fields support.

Bug Tracker
===========

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.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_widget_open_tab%0Aversion:%2017.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.

Credits
=======

Authors
-------

* Creu Blanca

Contributors
------------

- Enric Tobella <[email protected]>
- Raf Ven <[email protected]>
- Dhara Solanki <[email protected]>
- `Quartile <https://www.quartile.co>`__:

- Aung Ko Ko Lin

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 <https://github.com/OCA/web/tree/17.0/web_widget_open_tab>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions web_widget_open_tab/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
23 changes: 23 additions & 0 deletions web_widget_open_tab/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2019-2020 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Widget Open on new Tab",
"summary": """
Allow to open record from trees on new tab from tree views""",
"version": "17.0.1.0.0",
"license": "AGPL-3",
"author": "Creu Blanca,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web",
"depends": ["web"],
"demo": ["demo/res_users_view.xml"],
"data": [
"views/ir_model_views.xml",
],
"assets": {
"web.assets_backend": [
"web_widget_open_tab/static/src/xml/open_tab_widget.xml",
"web_widget_open_tab/static/src/js/open_tab_widget.esm.js",
],
},
}
12 changes: 12 additions & 0 deletions web_widget_open_tab/demo/res_users_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_users_tree" model="ir.ui.view">
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_tree" />
<field name="arch" type="xml">
<field name="name" position="before">
<field name="id" widget="open_tab" />
</field>
</field>
</record>
</odoo>
59 changes: 59 additions & 0 deletions web_widget_open_tab/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_widget_open_tab
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-02-17 13:45+0000\n"
"Last-Translator: claudiagn <[email protected]>\n"
"Language-Team: none\n"
"Language: ca\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_open_tab
#: model:ir.model.fields,field_description:web_widget_open_tab.field_ir_model__add_open_tab_field
msgid "Add Open Tab Field"
msgstr ""

#. module: web_widget_open_tab
#: model:ir.model.fields,help:web_widget_open_tab.field_ir_model__add_open_tab_field
msgid "Adds open-tab field in list views."
msgstr ""

#. module: web_widget_open_tab
#: model:ir.model,name:web_widget_open_tab.model_base
msgid "Base"
msgstr ""

#. module: web_widget_open_tab
#. odoo-javascript
#: code:addons/web_widget_open_tab/static/src/js/open_tab_widget.esm.js:0
#, python-format
msgid "Click to open on new tab"
msgstr ""

#. module: web_widget_open_tab
#: model:ir.model,name:web_widget_open_tab.model_ir_model
msgid "Models"
msgstr ""

#. module: web_widget_open_tab
#. odoo-javascript
#: code:addons/web_widget_open_tab/static/src/js/open_tab_widget.esm.js:0
#, python-format
msgid "Open Tab"
msgstr ""

#, python-format
#~ msgid "Click in order to open on new tab"
#~ msgstr "Feu clic per obrir la pestanya nova"

#, python-format
#~ msgid "Widget"
#~ msgstr "Widget"
59 changes: 59 additions & 0 deletions web_widget_open_tab/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_widget_open_tab
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-10-13 20:46+0000\n"
"Last-Translator: Corneliuus <[email protected]>\n"
"Language-Team: none\n"
"Language: de\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_open_tab
#: model:ir.model.fields,field_description:web_widget_open_tab.field_ir_model__add_open_tab_field
msgid "Add Open Tab Field"
msgstr ""

#. module: web_widget_open_tab
#: model:ir.model.fields,help:web_widget_open_tab.field_ir_model__add_open_tab_field
msgid "Adds open-tab field in list views."
msgstr ""

#. module: web_widget_open_tab
#: model:ir.model,name:web_widget_open_tab.model_base
msgid "Base"
msgstr ""

#. module: web_widget_open_tab
#. odoo-javascript
#: code:addons/web_widget_open_tab/static/src/js/open_tab_widget.esm.js:0
#, python-format
msgid "Click to open on new tab"
msgstr ""

#. module: web_widget_open_tab
#: model:ir.model,name:web_widget_open_tab.model_ir_model
msgid "Models"
msgstr ""

#. module: web_widget_open_tab
#. odoo-javascript
#: code:addons/web_widget_open_tab/static/src/js/open_tab_widget.esm.js:0
#, python-format
msgid "Open Tab"
msgstr ""

#, python-format
#~ msgid "Click in order to open on new tab"
#~ msgstr "Anklicken, um in einem neuen Tab zu öffnen"

#, python-format
#~ msgid "Widget"
#~ msgstr "Widget"
59 changes: 59 additions & 0 deletions web_widget_open_tab/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_widget_open_tab
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-09-20 17:50+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\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.17\n"

#. module: web_widget_open_tab
#: model:ir.model.fields,field_description:web_widget_open_tab.field_ir_model__add_open_tab_field
msgid "Add Open Tab Field"
msgstr "Añadir campo de pestaña abierta"

#. module: web_widget_open_tab
#: model:ir.model.fields,help:web_widget_open_tab.field_ir_model__add_open_tab_field
msgid "Adds open-tab field in list views."
msgstr "Añade un campo de pestaña abierta en las vistas de lista."

#. module: web_widget_open_tab
#: model:ir.model,name:web_widget_open_tab.model_base
msgid "Base"
msgstr "Base"

#. module: web_widget_open_tab
#. odoo-javascript
#: code:addons/web_widget_open_tab/static/src/js/open_tab_widget.esm.js:0
#, python-format
msgid "Click to open on new tab"
msgstr "Haga clic para abrir en una nueva pestaña"

#. module: web_widget_open_tab
#: model:ir.model,name:web_widget_open_tab.model_ir_model
msgid "Models"
msgstr "Modelos"

#. module: web_widget_open_tab
#. odoo-javascript
#: code:addons/web_widget_open_tab/static/src/js/open_tab_widget.esm.js:0
#, python-format
msgid "Open Tab"
msgstr "Abrir pestaña"

#, python-format
#~ msgid "Click in order to open on new tab"
#~ msgstr "Clica para poder abrir una nueva pestaña"

#, python-format
#~ msgid "Widget"
#~ msgstr "Widget"
51 changes: 51 additions & 0 deletions web_widget_open_tab/i18n/ja.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_widget_open_tab
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-27 08:24+0000\n"
"PO-Revision-Date: 2023-05-27 08:24+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: web_widget_open_tab
#: model:ir.model.fields,field_description:web_widget_open_tab.field_ir_model__add_open_tab_field
msgid "Add Open Tab Field"
msgstr "別タブ表示ボタン追加"

#. module: web_widget_open_tab
#: model:ir.model.fields,help:web_widget_open_tab.field_ir_model__add_open_tab_field
msgid "Adds open-tab field in list views."
msgstr "リストビューに別タブ表示ボタンを追加。"

#. module: web_widget_open_tab
#: model:ir.model,name:web_widget_open_tab.model_base
msgid "Base"
msgstr "ベース"

#. module: web_widget_open_tab
#. odoo-javascript
#: code:addons/web_widget_open_tab/static/src/js/open_tab_widget.esm.js:0
#, python-format
msgid "Click to open on new tab"
msgstr "クリックして別タブを開く"

#. module: web_widget_open_tab
#: model:ir.model,name:web_widget_open_tab.model_ir_model
msgid "Models"
msgstr "モデル"

#. module: web_widget_open_tab
#. odoo-javascript
#: code:addons/web_widget_open_tab/static/src/js/open_tab_widget.esm.js:0
#, python-format
msgid "Open Tab"
msgstr "別タブを開く"
Loading

0 comments on commit d3a8f98

Please sign in to comment.