diff --git a/web_export_view/README.rst b/web_export_view/README.rst index 6a0ccb67..24e051f1 100644 --- a/web_export_view/README.rst +++ b/web_export_view/README.rst @@ -45,6 +45,7 @@ Contributors * Lorenzo Battistini * Stefan Rijnhart * Leonardo Pistone + * Rodney Vargas Maintainer ---------- diff --git a/web_export_view/__init__.py b/web_export_view/__init__.py index 9a651413..c2df839c 100644 --- a/web_export_view/__init__.py +++ b/web_export_view/__init__.py @@ -1,21 +1,5 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2012 Agile Business Group sagl () -# Copyright (C) 2012 Domsense srl () -# -# 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 . -# -############################################################################## +# © 2016 Agile Business Group +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + from . import controllers diff --git a/web_export_view/__openerp__.py b/web_export_view/__openerp__.py index 0e3f5cad..60509d16 100644 --- a/web_export_view/__openerp__.py +++ b/web_export_view/__openerp__.py @@ -1,27 +1,10 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2012 Agile Business Group sagl () -# Copyright (C) 2012 Domsense srl () -# -# 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 . -# -############################################################################## +# © 2016 Agile Business Group +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Export Current View', - 'version': '8.0.1.2.0', + 'version': '9.0.0.1', 'category': 'Web', 'author': "Agile Business Group,Odoo Community Association (OCA)", 'website': 'http://www.agilebg.com', @@ -35,6 +18,6 @@ 'qweb': [ 'static/src/xml/web_export_view_template.xml', ], - 'installable': False, + 'installable': True, 'auto_install': False, } diff --git a/web_export_view/controllers/__init__.py b/web_export_view/controllers/__init__.py index 9a651413..c2df839c 100644 --- a/web_export_view/controllers/__init__.py +++ b/web_export_view/controllers/__init__.py @@ -1,21 +1,5 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2012 Agile Business Group sagl () -# Copyright (C) 2012 Domsense srl () -# -# 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 . -# -############################################################################## +# © 2016 Agile Business Group +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + from . import controllers diff --git a/web_export_view/controllers/controllers.py b/web_export_view/controllers/controllers.py index a38eec52..79d27c93 100644 --- a/web_export_view/controllers/controllers.py +++ b/web_export_view/controllers/controllers.py @@ -1,24 +1,7 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Copyright (C) 2012 Domsense srl () -# Copyright (C) 2012-2013: -# Agile Business Group sagl () -# -# 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 . -# -############################################################################## +# © 2016 Agile Business Group +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + try: import json except ImportError: diff --git a/web_export_view/static/src/js/web_export_view.js b/web_export_view/static/src/js/web_export_view.js index 00cb047e..7f70e6b4 100644 --- a/web_export_view/static/src/js/web_export_view.js +++ b/web_export_view/static/src/js/web_export_view.js @@ -1,23 +1,7 @@ -// @@@ web_export_view custom JS @@@ -//############################################################################# -// -// Copyright (C) 2012 Agile Business Group sagl () -// Copyright (C) 2012 Therp BV () -// -// 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 . -// -//############################################################################# +//# -*- coding: utf-8 -*- +//# © 2016 Agile Business Group +//# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + openerp.web_export_view = function (instance) { var _t = instance.web._t, QWeb = instance.web.qweb; @@ -26,7 +10,7 @@ openerp.web_export_view = function (instance) { redraw: function () { var self = this; this._super.apply(this, arguments); - if (self.getParent().ViewManager.active_view == 'list') { + if (self.getParent().ViewManager.active_view.type == '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); } @@ -67,8 +51,8 @@ openerp.web_export_view = function (instance) { // 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") { + checked = $row.find('th input[type=checkbox]').is(':checked'); + if (children && checked === true) { $.each(export_columns_keys, function () { cell = $row.find('td[data-field="' + this + '"]').get(0); text = cell.text || cell.textContent || cell.innerHTML || ""; diff --git a/web_export_view/static/src/xml/web_export_view_template.xml b/web_export_view/static/src/xml/web_export_view_template.xml index fbd855d9..3c7ddf5b 100644 --- a/web_export_view/static/src/xml/web_export_view_template.xml +++ b/web_export_view/static/src/xml/web_export_view_template.xml @@ -1,10 +1,13 @@ + -
- -
    +
    + +
    diff --git a/web_export_view/view/web_export_view.xml b/web_export_view/view/web_export_view.xml index 502070f1..fa6b2073 100644 --- a/web_export_view/view/web_export_view.xml +++ b/web_export_view/view/web_export_view.xml @@ -2,7 +2,7 @@ -