Rodney Enciso Arias 7 éve
commit
dd74428019

+ 60 - 0
README.rst

@@ -0,0 +1,60 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+    :alt: License
+
+Export Current View
+===================
+
+One of the best OpenERP'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.
+
+
+Usage
+=====
+
+After you installed it, you'll find an additional link 'Export current view'
+right below the 'Export' one. By clicking on it you'll get a XLS file contains
+the same data of the tree view you are looking at, headers included.
+
+
+
+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
+`here <https://github.com/OCA/web/issues/new?body=module:%20web_export_view%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
+
+
+Credits
+=======
+
+Contributors
+------------
+
+ * Simone Orsi <simahawk@gmail.com>
+ * Lorenzo Battistini <lorenzo.battistini@agilebg.com>
+ * Stefan Rijnhart <stefan@therp.nl>
+ * Leonardo Pistone <leonardo.pistone@camptocamp.com>
+
+Maintainer
+----------
+
+.. image:: http://odoo-community.org/logo.png
+   :alt: Odoo Community Association
+   :target: http://odoo-community.org
+
+This module is maintained by the OCA.
+
+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.
+
+To contribute to this module, please visit http://odoo-community.org.

+ 21 - 0
__init__.py

@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>)
+#    Copyright (C) 2012 Domsense srl (<http://www.domsense.com>)
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+from . import controllers

BIN
__init__.pyc


+ 40 - 0
__openerp__.py

@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>)
+#    Copyright (C) 2012 Domsense srl (<http://www.domsense.com>)
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+{
+    'name': 'Export Current View',
+    'version': '8.0.1.2.0',
+    'category': 'Web',
+    'author': "Agile Business Group,Odoo Community Association (OCA)",
+    'website': 'http://www.agilebg.com',
+    'license': 'AGPL-3',
+    'depends': [
+        'web',
+    ],
+    'data': [
+        'view/web_export_view.xml',
+    ],
+    'qweb': [
+        'static/src/xml/web_export_view_template.xml',
+    ],
+    'installable': True,
+    'auto_install': False,
+}

+ 21 - 0
controllers/__init__.py

@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>)
+#    Copyright (C) 2012 Domsense srl (<http://www.domsense.com>)
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+from . import controllers

BIN
controllers/__init__.pyc


+ 53 - 0
controllers/controllers.py

@@ -0,0 +1,53 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2012 Domsense srl (<http://www.domsense.com>)
+#    Copyright (C) 2012-2013:
+#        Agile Business Group sagl (<http://www.agilebg.com>)
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+try:
+    import json
+except ImportError:
+    import simplejson as json
+
+import openerp.http as http
+from openerp.http import request
+from openerp.addons.web.controllers.main import ExcelExport
+
+
+class ExcelExportView(ExcelExport):
+    def __getattribute__(self, name):
+        if name == 'fmt':
+            raise AttributeError()
+        return super(ExcelExportView, self).__getattribute__(name)
+
+    @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(columns_headers, rows),
+            headers=[
+                ('Content-Disposition', 'attachment; filename="%s"'
+                 % self.filename(model)),
+                ('Content-Type', self.content_type)
+            ],
+            cookies={'fileToken': token}
+        )

BIN
controllers/controllers.pyc


+ 47 - 0
i18n/ar.po

@@ -0,0 +1,47 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_export_view
+# 
+# Translators:
+# SaFi J. <safi2266@gmail.com>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-12-16 07:41+0000\n"
+"PO-Revision-Date: 2015-12-16 17:33+0000\n"
+"Last-Translator: SaFi J. <safi2266@gmail.com>\n"
+"Language-Team: Arabic (http://www.transifex.com/oca/OCA-web-8-0/language/ar/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: ar\n"
+"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:8
+#, python-format
+msgid "Excel"
+msgstr "برنامج أكسل"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:6
+#, python-format
+msgid "Export Current View"
+msgstr "تصدير العرض الحالي"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:84
+#, python-format
+msgid "False"
+msgstr "خطأ"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:81
+#, python-format
+msgid "True"
+msgstr "صحيح"

+ 47 - 0
i18n/de.po

@@ -0,0 +1,47 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_export_view
+# 
+# Translators:
+# Rudolf Schnapka <rs@techno-flex.de>, 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-01-10 07:31+0000\n"
+"PO-Revision-Date: 2016-01-18 20:58+0000\n"
+"Last-Translator: Rudolf Schnapka <rs@techno-flex.de>\n"
+"Language-Team: German (http://www.transifex.com/oca/OCA-web-8-0/language/de/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: de\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:8
+#, python-format
+msgid "Excel"
+msgstr "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 Current View"
+msgstr "Aktuelle Liste exportieren"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:84
+#, python-format
+msgid "False"
+msgstr "Falsch"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:81
+#, python-format
+msgid "True"
+msgstr "Wahr"

+ 47 - 0
i18n/es.po

@@ -0,0 +1,47 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_export_view
+# 
+# Translators:
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-11-23 13:46+0000\n"
+"PO-Revision-Date: 2015-11-07 11:26+0000\n"
+"Last-Translator: Pedro M. Baeza <pedro.baeza@gmail.com>\n"
+"Language-Team: Spanish (http://www.transifex.com/oca/OCA-web-8-0/language/es/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: es\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:8
+#, python-format
+msgid "Excel"
+msgstr "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 Current View"
+msgstr "Exportar vista actual"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:84
+#, python-format
+msgid "False"
+msgstr "Falso"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:81
+#, python-format
+msgid "True"
+msgstr "Verdadero"

+ 47 - 0
i18n/eu.po

@@ -0,0 +1,47 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_export_view
+# 
+# Translators:
+# Esther Martín Menéndez <esthermartin001@gmail.com>, 2017
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-02-18 09:00+0000\n"
+"PO-Revision-Date: 2017-02-23 07:59+0000\n"
+"Last-Translator: Esther Martín Menéndez <esthermartin001@gmail.com>\n"
+"Language-Team: Basque (http://www.transifex.com/oca/OCA-web-8-0/language/eu/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: eu\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:8
+#, python-format
+msgid "Excel"
+msgstr "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 Current View"
+msgstr ""
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:84
+#, python-format
+msgid "False"
+msgstr "False"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:81
+#, python-format
+msgid "True"
+msgstr "True"

+ 47 - 0
i18n/fi.po

@@ -0,0 +1,47 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_export_view
+# 
+# Translators:
+# Jarmo Kortetjärvi <jarmo.kortetjarvi@gmail.com>, 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-01-10 07:31+0000\n"
+"PO-Revision-Date: 2016-02-01 09:41+0000\n"
+"Last-Translator: Jarmo Kortetjärvi <jarmo.kortetjarvi@gmail.com>\n"
+"Language-Team: Finnish (http://www.transifex.com/oca/OCA-web-8-0/language/fi/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: fi\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:8
+#, python-format
+msgid "Excel"
+msgstr "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 Current View"
+msgstr "Vie tämä näkymä"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:84
+#, python-format
+msgid "False"
+msgstr "Epätosi"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:81
+#, python-format
+msgid "True"
+msgstr "Tosi"

+ 51 - 0
i18n/fr.po

@@ -0,0 +1,51 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_export_view
+# 
+# Translators:
+# Christophe CHAUVET <christophe.chauvet@gmail.com>, 2016
+# Kostas Goutoudis <goutoudis@gmail.com>, 2015
+# Matjaž Mozetič <m.mozetic@matmoz.si>, 2015
+# Pedro M. Baeza <pedro.baeza@gmail.com>, 2015
+# Rudolf Schnapka <rs@techno-flex.de>, 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-05-06 15:50+0000\n"
+"PO-Revision-Date: 2016-05-06 08:19+0000\n"
+"Last-Translator: Christophe CHAUVET <christophe.chauvet@gmail.com>\n"
+"Language-Team: French (http://www.transifex.com/oca/OCA-web-8-0/language/fr/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: fr\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:8
+#, python-format
+msgid "Excel"
+msgstr "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 Current View"
+msgstr "Exporter la vue courante"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:84
+#, python-format
+msgid "False"
+msgstr "False"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:81
+#, python-format
+msgid "True"
+msgstr "True"

+ 47 - 0
i18n/hr.po

@@ -0,0 +1,47 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_export_view
+# 
+# Translators:
+# Bole <bole@dajmi5.com>, 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-06-24 00:46+0000\n"
+"PO-Revision-Date: 2016-06-14 11:36+0000\n"
+"Last-Translator: Bole <bole@dajmi5.com>\n"
+"Language-Team: Croatian (http://www.transifex.com/oca/OCA-web-8-0/language/hr/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: hr\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:8
+#, python-format
+msgid "Excel"
+msgstr "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 Current View"
+msgstr "Izvoz trenutnog pogleda"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:84
+#, python-format
+msgid "False"
+msgstr "Netočno"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:81
+#, python-format
+msgid "True"
+msgstr "Točno"

+ 47 - 0
i18n/is.po

@@ -0,0 +1,47 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_export_view
+# 
+# Translators:
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-11-23 13:46+0000\n"
+"PO-Revision-Date: 2015-11-07 11:20+0000\n"
+"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n"
+"Language-Team: Icelandic (http://www.transifex.com/oca/OCA-web-8-0/language/is/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: is\n"
+"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:8
+#, python-format
+msgid "Excel"
+msgstr "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 Current View"
+msgstr "Flytja út núverandi sýn"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:84
+#, python-format
+msgid "False"
+msgstr ""
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:81
+#, python-format
+msgid "True"
+msgstr ""

+ 47 - 0
i18n/it.po

@@ -0,0 +1,47 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_export_view
+# 
+# Translators:
+# Paolo Valier, 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-03-17 07:29+0000\n"
+"PO-Revision-Date: 2016-03-19 10:15+0000\n"
+"Last-Translator: Paolo Valier\n"
+"Language-Team: Italian (http://www.transifex.com/oca/OCA-web-8-0/language/it/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: it\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:8
+#, python-format
+msgid "Excel"
+msgstr "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 Current View"
+msgstr "Esporta la Vista corrente"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:84
+#, python-format
+msgid "False"
+msgstr "Falso"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:81
+#, python-format
+msgid "True"
+msgstr "Vero"

+ 56 - 0
i18n/nl.po

@@ -0,0 +1,56 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_export_view
+# 
+# Translators:
+# Ahmet Altinisik <aaltinisik@altinkaya.com.tr>, 2015-2016
+# Antonio Trueba, 2016
+# danimaribeiro <danimaribeiro@gmail.com>, 2016
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2012,2014
+# Jarmo Kortetjärvi <jarmo.kortetjarvi@gmail.com>, 2016
+# Jesús Alan Ramos Rodríguez <alan.ramos@jarsa.com.mx>, 2015
+# Matjaž Mozetič <m.mozetic@matmoz.si>, 2015
+# Paolo Valier, 2016
+# Pedro Castro Silva <pedrocs@sossia.pt>, 2015
+# Rudolf Schnapka <rs@techno-flex.de>, 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-03-28 10:21+0000\n"
+"PO-Revision-Date: 2017-04-18 11:02+0000\n"
+"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n"
+"Language-Team: Dutch (http://www.transifex.com/oca/OCA-web-8-0/language/nl/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: nl\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:8
+#, python-format
+msgid "Excel"
+msgstr "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 Current View"
+msgstr "Huidige lijst exporteren"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:84
+#, python-format
+msgid "False"
+msgstr ""
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:81
+#, python-format
+msgid "True"
+msgstr "Waar"

+ 47 - 0
i18n/pt_BR.po

@@ -0,0 +1,47 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_export_view
+# 
+# Translators:
+# danimaribeiro <danimaribeiro@gmail.com>, 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-03-11 02:17+0000\n"
+"PO-Revision-Date: 2016-03-05 16:20+0000\n"
+"Last-Translator: danimaribeiro <danimaribeiro@gmail.com>\n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-web-8-0/language/pt_BR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: pt_BR\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:8
+#, python-format
+msgid "Excel"
+msgstr "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 Current View"
+msgstr "Exportar visão atual"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:84
+#, python-format
+msgid "False"
+msgstr "False"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:81
+#, python-format
+msgid "True"
+msgstr "True"

+ 47 - 0
i18n/pt_PT.po

@@ -0,0 +1,47 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_export_view
+# 
+# Translators:
+# Pedro Castro Silva <pedrocs@sossia.pt>, 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-22 15:47+0000\n"
+"PO-Revision-Date: 2016-04-23 18:20+0000\n"
+"Last-Translator: Pedro Castro Silva <pedrocs@sossia.pt>\n"
+"Language-Team: Portuguese (Portugal) (http://www.transifex.com/oca/OCA-web-8-0/language/pt_PT/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: pt_PT\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:8
+#, python-format
+msgid "Excel"
+msgstr "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 Current View"
+msgstr "Exportar Vista Atual"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:84
+#, python-format
+msgid "False"
+msgstr "False"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:81
+#, python-format
+msgid "True"
+msgstr "True"

+ 47 - 0
i18n/sl.po

@@ -0,0 +1,47 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_export_view
+# 
+# Translators:
+# Matjaž Mozetič <m.mozetic@matmoz.si>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-11-23 13:46+0000\n"
+"PO-Revision-Date: 2015-11-08 05:45+0000\n"
+"Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>\n"
+"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-web-8-0/language/sl/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: sl\n"
+"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:8
+#, python-format
+msgid "Excel"
+msgstr "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 Current View"
+msgstr "Izvoz trenutnega pogleda"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:84
+#, python-format
+msgid "False"
+msgstr "Nepravilno"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:81
+#, python-format
+msgid "True"
+msgstr "Pravilno"

+ 47 - 0
i18n/tr.po

@@ -0,0 +1,47 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_export_view
+# 
+# Translators:
+# Ahmet Altınışık <aaltinisik@altinkaya.com.tr>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-01-08 21:34+0000\n"
+"PO-Revision-Date: 2015-12-30 21:52+0000\n"
+"Last-Translator: Ahmet Altınışık <aaltinisik@altinkaya.com.tr>\n"
+"Language-Team: Turkish (http://www.transifex.com/oca/OCA-web-8-0/language/tr/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: tr\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:8
+#, python-format
+msgid "Excel"
+msgstr "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 Current View"
+msgstr "Ekranı Aktar"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:84
+#, python-format
+msgid "False"
+msgstr "False"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:81
+#, python-format
+msgid "True"
+msgstr "True"

+ 46 - 0
i18n/tr_TR.po

@@ -0,0 +1,46 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * web_export_view
+# 
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: web (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-12-31 10:10+0000\n"
+"PO-Revision-Date: 2015-11-07 11:20+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: Turkish (Turkey) (http://www.transifex.com/oca/OCA-web-8-0/language/tr_TR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: tr_TR\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:8
+#, python-format
+msgid "Excel"
+msgstr ""
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/xml/web_export_view_template.xml:6
+#, python-format
+msgid "Export Current View"
+msgstr ""
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:84
+#, python-format
+msgid "False"
+msgstr ""
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_export_view.js:81
+#, python-format
+msgid "True"
+msgstr "Doğru"

+ 43 - 0
i18n/web_export_view.pot

@@ -0,0 +1,43 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-10-21 11:59+0000\n"
+"PO-Revision-Date: 2013-10-21 11:59+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
+#. openerp-web
+#: code:addons/web_export_view/static/xml/web_advanced_export.xml:7
+#, python-format
+msgid "Export Current View"
+msgstr ""
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/xml/web_advanced_export.xml:9
+#, python-format
+msgid "Excel"
+msgstr ""
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_advanced_export.js:81
+#, python-format
+msgid "True"
+msgstr ""
+
+#. module: web_export_view
+#. openerp-web
+#: code:addons/web_export_view/static/src/js/web_advanced_export.js:84
+#, python-format
+msgid "False"
+msgstr ""

BIN
static/description/icon.png


+ 117 - 0
static/src/js/web_export_view.js

@@ -0,0 +1,117 @@
+//  @@@ web_export_view custom JS @@@
+//#############################################################################
+//    
+//    Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>)
+//    Copyright (C) 2012 Therp BV (<http://therp.nl>)
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU Affero General Public License as published
+//    by the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU Affero General Public License for more details.
+//
+//    You should have received a copy of the GNU Affero General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//#############################################################################
+openerp.web_export_view = function (instance) {
+
+    var _t = instance.web._t, QWeb = instance.web.qweb;
+
+    instance.web.Sidebar.include({
+        redraw: function () {
+            var self = this;
+            this._super.apply(this, arguments);
+            if (self.getParent().ViewManager.active_view == 'list') {
+                self.$el.find('.oe_sidebar').append(QWeb.render('AddExportViewMain', {widget: self}));
+                self.$el.find('.oe_sidebar_export_view_xls').on('click', self.on_sidebar_export_view_xls);
+            }
+        },
+
+        on_sidebar_export_view_xls: function () {
+            // Select the first list of the current (form) view
+            // or assume the main view is a list view and use that
+            var self = this,
+                view = this.getParent(),
+                children = view.getChildren();
+            if (children) {
+                children.every(function (child) {
+                    if (child.field && child.field.type == 'one2many') {
+                        view = child.viewmanager.views.list.controller;
+                        return false; // break out of the loop
+                    }
+                    if (child.field && child.field.type == 'many2many') {
+                        view = child.list_view;
+                        return false; // break out of the loop
+                    }
+                    return true;
+                });
+            }
+            export_columns_keys = [];
+            export_columns_names = [];
+            $.each(view.visible_columns, function () {
+                if (this.tag == 'field') {
+                    // non-fields like `_group` or buttons
+                    export_columns_keys.push(this.id);
+                    export_columns_names.push(this.string);
+                }
+            });
+            rows = view.$el.find('.oe_list_content > tbody > tr');
+            export_rows = [];
+            $.each(rows, function () {
+                $row = $(this);
+                // find only rows with data
+                if ($row.attr('data-id')) {
+                    export_row = [];
+                    checked = $row.find('th input[type=checkbox]').attr("checked");
+                    if (children && checked === "checked") {
+                        $.each(export_columns_keys, function () {
+                            cell = $row.find('td[data-field="' + this + '"]').get(0);
+                            text = cell.text || cell.textContent || cell.innerHTML || "";
+                            if (cell.classList.contains("oe_list_field_float")) {
+                                export_row.push(instance.web.parse_value(text, {'type': "float"}));
+                            }
+                            else if (cell.classList.contains("oe_list_field_boolean")) {
+                                var data_id = $('<div>' + cell.innerHTML + '</div>');
+                                if (data_id.find('input').get(0).checked) {
+                                    export_row.push(_t("True"));
+                                }
+                                else {
+                                    export_row.push(_t("False"));
+                                }
+                            }
+                            else if (cell.classList.contains("oe_list_field_integer")) {
+                                var tmp2 = text;
+                                do {
+                                    tmp = tmp2;
+                                    tmp2 = tmp.replace(instance.web._t.database.parameters.thousands_sep, "");
+                                } while (tmp !== tmp2);
+
+                                export_row.push(parseInt(tmp2));
+                            }
+                            else {
+                                export_row.push(text.trim());
+                            }
+                        });
+                        export_rows.push(export_row);
+                    }
+                }
+            });
+            $.blockUI();
+            view.session.get_file({
+                url: '/web/export/xls_view',
+                data: {data: JSON.stringify({
+                    model: view.model,
+                    headers: export_columns_names,
+                    rows: export_rows
+                })},
+                complete: $.unblockUI
+            });
+        }
+    });
+
+};

+ 12 - 0
static/src/xml/web_export_view_template.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<templates id="template" xml:space="preserve">
+<t t-name="AddExportViewMain">
+    <div class="oe_form_dropdown_section">
+        <button class="oe_dropdown_toggle oe_dropdown_arrow">Export Current View</button>
+        <ul class="oe_dropdown_menu">
+            <li class="oe_sidebar_export_view_xls"><span>Excel</span></li>
+        </ul>
+    </div>
+</t>
+</templates>

+ 11 - 0
view/web_export_view.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<openerp>
+    <data>
+        <template id="assets_backend" name="web_export_view assets" inherit_id="web.assets_backend">
+            <xpath expr="." position="inside">
+                <script type="text/javascript" src="/web_export_view/static/src/js/web_export_view.js"></script>
+            </xpath>
+        </template>
+    </data>
+</openerp>