-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Closed
13.0 mig web export view #2278
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
7b74e4a
[add] port web_export_view to OpenERP 7
aa817f1
[FIX] Convert number string to number
tafaRU 402ba3d
[FIX] web_export_view: Several things:
8e68d50
[FIX] don't show export format for current view in export list
hbrunn 3d7e3b1
[ADD] pot file + Dutch and German translation
hbrunn 894d596
[ADD] Add FR translation for 'web_export_view' module
legalsylvain 452d27e
[FIX] now export only selected items.
legalsylvain 86b879e
Launchpad automatic translations update.
2d3e37b
[web_export_view]: fixes export boolean fields
angedras eb3245e
Migrate web_export_view to v 8.0
de75b98
Small fix to allow integers to be parsed correctly when a locate with…
bringsvor a9583e7
[FIX] web_export_view: Handler method renamed to avoid name collision…
pablocm-aserti 22189cb
Handle the thousands separator, even multiple ones.
bringsvor 03b52fa
Slovene translations and translation template
sysadminmatmoz ad6ba1f
[MIG 10.0] web_export_view (#444)
jlzhou 4033a73
OCA Transbot updated translations from Transifex
oca-transbot 8ebfa00
[FIX][web_export_view] Remove monetary formatting (#594)
yajo c5b243f
[MIG] web_export_view: Migration to 11.0
3e69b5e
[FIX] web_export_view: Several things:
benwillig 0b0698c
[ADD] Crash Manager
4b010c1
[UPD] Update web_export_view.pot
oca-travis fa39061
Added translation using Weblate (Danish)
hhgabelgaard 8be5037
[11.0] web_export_view: add security group
chienandalu 34d4382
[UPD] Update web_export_view.pot
oca-travis 8abd3b0
Update translation files
oca-transbot 8710987
[11.0][FIX] web_export_view: Issue #1099
Tardo d076218
[11.0][IMP] web_export_view: Split readme
Tardo 128f170
[11.0][IMP] web_export_view: Linter
Tardo fefe0ba
[UPD] Update web_export_view.pot
oca-travis 1686412
Update translation files
oca-transbot 3ed9817
[MIG] web_export_view: Migration to 12.0
valtterilattu 8dc7528
[UPD] README.rst
OCA-git-bot 2d1472f
[UPD] Update web_export_view.pot
oca-travis b1c27f1
Update translation files
oca-transbot b9cda98
[UPD] README.rst
OCA-git-bot 984d248
Translated using Weblate (Spanish)
eduardgm 5a3fa8d
Added translation using Weblate (Portuguese)
pedrocs-exo 428de60
Translated using Weblate (Portuguese)
pedrocs-exo 72f83d5
Translated using Weblate (Portuguese (Brazil))
575efd3
Translated using Weblate (Chinese (Simplified))
liweijie0812 731e438
Translated using Weblate (Croatian)
badbole 53a3fd1
Translated using Weblate (Danish)
hhgabelgaard 1718066
[FIX] web_export_view: Proper trailing line in RST
pedrobaeza 1982325
Added translation using Weblate (Catalan)
claudiagn c30af0b
Translated using Weblate (Catalan)
claudiagn 2d92653
[UPD] README.rst
OCA-git-bot 158b493
[UPD] README.rst
OCA-git-bot 8540277
Added translation using Weblate (French)
ypapouin 8e8aca4
Translated using Weblate (French)
ypapouin 90d7dd5
[FIX] web_export_view: Remove newlines from fields having many2many_tags
SimoRubi 40ff484
Added translation using Weblate (Turkish)
yavuzavci 4d9f9b1
Translated using Weblate (Turkish)
yavuzavci 8b7fd07
web_export_view 12.0.1.0.1
OCA-git-bot 7505a52
[IMP] web_export_view: black, isort, prettier
vancouver29 b2a713e
[MIG] web_export_view: Migration to 13.0
vancouver29 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../web_export_view |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import controllers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import controllers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
|
||
@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}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.