Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

13.0 mig web export view #2278

Closed
wants to merge 56 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
b441317
[add] module web_export_view copied from 6.1
Jun 4, 2013
7b74e4a
[add] port web_export_view to OpenERP 7
Jun 4, 2013
aa817f1
[FIX] Convert number string to number
tafaRU Jun 19, 2013
402ba3d
[FIX] web_export_view: Several things:
Jul 23, 2013
8e68d50
[FIX] don't show export format for current view in export list
hbrunn Oct 21, 2013
3d7e3b1
[ADD] pot file + Dutch and German translation
hbrunn Oct 21, 2013
894d596
[ADD] Add FR translation for 'web_export_view' module
legalsylvain Feb 18, 2014
452d27e
[FIX] now export only selected items.
legalsylvain Feb 18, 2014
86b879e
Launchpad automatic translations update.
Dec 8, 2013
2d3e37b
[web_export_view]: fixes export boolean fields
angedras Apr 9, 2014
eb3245e
Migrate web_export_view to v 8.0
Jul 26, 2014
de75b98
Small fix to allow integers to be parsed correctly when a locate with…
bringsvor Feb 7, 2015
a9583e7
[FIX] web_export_view: Handler method renamed to avoid name collision…
pablocm-aserti Mar 5, 2015
22189cb
Handle the thousands separator, even multiple ones.
bringsvor Mar 26, 2015
03b52fa
Slovene translations and translation template
sysadminmatmoz Apr 24, 2015
ad6ba1f
[MIG 10.0] web_export_view (#444)
jlzhou Nov 21, 2016
4033a73
OCA Transbot updated translations from Transifex
oca-transbot Dec 24, 2016
8ebfa00
[FIX][web_export_view] Remove monetary formatting (#594)
yajo Mar 31, 2017
c5b243f
[MIG] web_export_view: Migration to 11.0
Nov 14, 2017
3e69b5e
[FIX] web_export_view: Several things:
benwillig May 17, 2018
0b0698c
[ADD] Crash Manager
Jul 9, 2018
4b010c1
[UPD] Update web_export_view.pot
oca-travis Aug 15, 2018
fa39061
Added translation using Weblate (Danish)
hhgabelgaard Sep 1, 2018
8be5037
[11.0] web_export_view: add security group
chienandalu Jan 21, 2019
34d4382
[UPD] Update web_export_view.pot
oca-travis Jan 22, 2019
8abd3b0
Update translation files
oca-transbot Jan 22, 2019
8710987
[11.0][FIX] web_export_view: Issue #1099
Tardo Apr 9, 2019
d076218
[11.0][IMP] web_export_view: Split readme
Tardo Apr 9, 2019
128f170
[11.0][IMP] web_export_view: Linter
Tardo Apr 9, 2019
fefe0ba
[UPD] Update web_export_view.pot
oca-travis Apr 25, 2019
1686412
Update translation files
oca-transbot Apr 25, 2019
3ed9817
[MIG] web_export_view: Migration to 12.0
valtterilattu Apr 3, 2019
8dc7528
[UPD] README.rst
OCA-git-bot May 7, 2019
2d1472f
[UPD] Update web_export_view.pot
oca-travis May 7, 2019
b1c27f1
Update translation files
oca-transbot May 20, 2019
b9cda98
[UPD] README.rst
OCA-git-bot Jul 29, 2019
984d248
Translated using Weblate (Spanish)
eduardgm Aug 4, 2019
5a3fa8d
Added translation using Weblate (Portuguese)
pedrocs-exo Aug 12, 2019
428de60
Translated using Weblate (Portuguese)
pedrocs-exo Aug 12, 2019
72f83d5
Translated using Weblate (Portuguese (Brazil))
Aug 26, 2019
575efd3
Translated using Weblate (Chinese (Simplified))
liweijie0812 Sep 1, 2019
731e438
Translated using Weblate (Croatian)
badbole Nov 14, 2019
53a3fd1
Translated using Weblate (Danish)
hhgabelgaard Feb 12, 2020
1718066
[FIX] web_export_view: Proper trailing line in RST
pedrobaeza Apr 23, 2020
1982325
Added translation using Weblate (Catalan)
claudiagn Jul 9, 2020
c30af0b
Translated using Weblate (Catalan)
claudiagn Jul 9, 2020
2d92653
[UPD] README.rst
OCA-git-bot Jul 13, 2020
158b493
[UPD] README.rst
OCA-git-bot Jul 14, 2020
8540277
Added translation using Weblate (French)
ypapouin Dec 14, 2020
8e8aca4
Translated using Weblate (French)
ypapouin Dec 14, 2020
90d7dd5
[FIX] web_export_view: Remove newlines from fields having many2many_tags
SimoRubi Sep 9, 2021
40ff484
Added translation using Weblate (Turkish)
yavuzavci Jan 6, 2022
4d9f9b1
Translated using Weblate (Turkish)
yavuzavci Jan 6, 2022
8b7fd07
web_export_view 12.0.1.0.1
OCA-git-bot Feb 16, 2022
7505a52
[IMP] web_export_view: black, isort, prettier
vancouver29 Aug 18, 2022
b2a713e
[MIG] web_export_view: Migration to 13.0
vancouver29 Aug 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions setup/web_export_view/odoo/addons/web_export_view
6 changes: 6 additions & 0 deletions setup/web_export_view/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
122 changes: 122 additions & 0 deletions web_export_view/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
=======================
Web Export Current View
=======================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/12.0/web_export_view
:alt: OCA/web
.. |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_export_view
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/162/12.0
:alt: Try me on Runbot

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

One of the best Odoo's features is exporting custom data to CSV/XLS. You can
do it by clicking on the export link in the sidebar. The export action allows
us to configure what to be exported by selecting fields, etc, and allows you
to save your export as a template so that you can export it once again without
having to configure it again.

That feature is as great and advanced as limited for an everyday experience.
A lot of customers want simply to export the tree view they are looking to.

If you miss this feature as us, probably you'll find an answer into our
web_export_view module.

**Table of contents**

.. contents::
:local:

Configuration
=============

If we wanted to disallow users to use the features provided by this module, we
can add them to the group *Disallow Export View Data to Excel*.

Usage
=====

After you installed it, you'll find an additional link 'Export current view'
right on the sidebar. By clicking on it you'll get a XLS file contains
the same data of the tree view you are looking at, headers included.

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

Pedro M. Baeza ([email protected]):
When you have groups, they are not exported to Excel. It would be desirable to have this option.
One of the problems with this module is that you can't export data from a view with mode="tree".
Changing the approach to have the button always visible (we should relocate it also to another place,
as the current location is not visible for these views), and digging correctly in the DOM elements
for this view (very similar to the normal tree view one) will do the trick. This will also help users
to locate the feature, as it's hidden now by default and users don't think about selecting records.
The behavior will be: nothing selected > you export all (including groups).
Something or all selected: export the selection.

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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_export_view%0Aversion:%2012.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
~~~~~~~

* Henry Zhou
* Agile Business Group

Contributors
~~~~~~~~~~~~

* Henry Zhou (MAXodoo) <[email protected]>
* Rodney <https://github.com/rv-clearcorp>
* Simone Orsi <[email protected]>
* Lorenzo Battistini <[email protected]>
* Stefan Rijnhart <[email protected]>
* Leonardo Pistone <[email protected]>
* Jose Maria Bernet <[email protected]>
* Alexandre Díaz <[email protected]>
* Valtteri Lattu <[email protected]>
* `Tecnativa <https://www.tecnativa.com>`_:

* David Vidal
* Ernesto Tejeda

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/12.0/web_export_view>`_ 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_export_view/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import controllers
22 changes: 22 additions & 0 deletions web_export_view/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2012 Agile Business Group
# Copyright 2012 Domsense srl (<http://www.domsense.com>)
# Copyright 2012 Therp BV
# Copyright 2016 Henry Zhou (http://www.maxodoo.com)
# Copyright 2016 Rodney (http://clearcorp.cr/)
# Copyright 2019 Tecnativa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Web Export Current View",
"version": "13.0.1.0.0",
"category": "Web",
"author": "Henry Zhou, Agile Business Group, \
Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web",
"license": "AGPL-3",
"depends": ["web"],
"data": ["security/groups.xml", "views/web_export_view_view.xml"],
"qweb": ["static/src/xml/web_export_view_template.xml"],
"installable": True,
"auto_install": False,
}
1 change: 1 addition & 0 deletions web_export_view/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import controllers
38 changes: 38 additions & 0 deletions web_export_view/controllers/controllers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright 2016 Henry Zhou (http://www.maxodoo.com)
# Copyright 2016 Rodney (http://clearcorp.cr/)
# Copyright 2012 Agile Business Group
# Copyright 2012 Therp BV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

import json

import odoo.http as http
from odoo.http import request

from odoo.addons.web.controllers.main import ExcelExport


class ExcelExportView(ExcelExport):
def __getattribute__(self, name):
if name == "fmt":
return super(ExcelExportView, self).__getattribute__(name)
raise AttributeError()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you change origin function like this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yweng8111 It is just for the purpose of improving Test coverage. The logic stays untouched.


@http.route("/web/export/xls_view", type="http", auth="user")
def export_xls_view(self, data, token):
data = json.loads(data)
# model = data.get("model", [])
# columns_headers = data.get("headers", [])
# rows = data.get("rows", [])

return request.make_response(
self.from_data(data.get("headers", []), data.get("rows", [])),
headers=[
(
"Content-Disposition",
'attachment; filename="%s"' % self.filename(data.get("model", [])),
),
("Content-Type", self.content_type),
],
cookies={"fileToken": token},
)
43 changes: 43 additions & 0 deletions web_export_view/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_export_view
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-07-09 18:19+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 3.10\n"

#. module: web_export_view
#: model:res.groups,name:web_export_view.group_disallow_export_view_data_excel
msgid "Disallow Export View Data to Excel"
msgstr "Inhabiliteu l'exportació de les dades de visualització a Excel"

#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:6
#, python-format
msgid "Export xls"
msgstr "Exportar xls"

#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/js/web_export_view.js:88
#, python-format
msgid "False"
msgstr "Fals"

#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/js/web_export_view.js:88
#, python-format
msgid "True"
msgstr "Verdader"
43 changes: 43 additions & 0 deletions web_export_view/i18n/da.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_export_view
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-02-12 17:13+0000\n"
"Last-Translator: Hans Henrik Gabelgaard <[email protected]>\n"
"Language-Team: none\n"
"Language: da\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 3.10\n"

#. module: web_export_view
#: model:res.groups,name:web_export_view.group_disallow_export_view_data_excel
msgid "Disallow Export View Data to Excel"
msgstr "De-aktiver Export view data til Excel"

#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:6
#, python-format
msgid "Export xls"
msgstr ""

#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/js/web_export_view.js:88
#, python-format
msgid "False"
msgstr ""

#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/js/web_export_view.js:88
#, python-format
msgid "True"
msgstr ""
42 changes: 42 additions & 0 deletions web_export_view/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_export_view
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-24 10:00+0000\n"
"PO-Revision-Date: 2022-08-24 10:00+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: web_export_view
#: model:res.groups,name:web_export_view.group_disallow_export_view_data_excel
msgid "Disallow Export View Data to Excel"
msgstr "Exportieren von Anzeigedaten nach Excel verbieten"

#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:0
#, python-format
msgid "Export xls"
msgstr "Exportiere xls"

#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/js/web_export_view.js:0
#, python-format
msgid "False"
msgstr "Falsch"

#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/js/web_export_view.js:0
#, python-format
msgid "True"
msgstr "Richtig"
46 changes: 46 additions & 0 deletions web_export_view/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_export_view
#
# Translators:
# OCA Transbot <[email protected]>, 2016
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-28 18:03+0000\n"
"PO-Revision-Date: 2019-08-04 17:44+0000\n"
"Last-Translator: eduardgm <[email protected]>\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\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 3.7.1\n"

#. module: web_export_view
#: model:res.groups,name:web_export_view.group_disallow_export_view_data_excel
msgid "Disallow Export View Data to Excel"
msgstr "Deshabilitar la Exportación de Datos de la Vista a Excel"

#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:6
#, python-format
msgid "Export xls"
msgstr "Exportar XLS"

#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/js/web_export_view.js:88
#, python-format
msgid "False"
msgstr "Falso"

#. module: web_export_view
#. openerp-web
#: code:addons/web_export_view/static/src/js/web_export_view.js:88
#, python-format
msgid "True"
msgstr "Verdadero"
Loading