Browse Source
Merge pull request #1164 from Tecnativa/11.0-imp-web_export_view_security
[11.0] web_export_view: add security group
pull/1181/head
Pedro M. Baeza
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
27 additions and
5 deletions
-
web_export_view/README.rst
-
web_export_view/__manifest__.py
-
web_export_view/security/groups.xml
-
web_export_view/static/src/js/web_export_view.js
|
|
@ -16,6 +16,11 @@ 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. |
|
|
|
|
|
|
|
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 |
|
|
|
===== |
|
|
@ -60,6 +65,7 @@ Contributors |
|
|
|
* Stefan Rijnhart <stefan@therp.nl> |
|
|
|
* Leonardo Pistone <leonardo.pistone@camptocamp.com> |
|
|
|
* Jose Maria Bernet <josemaria.bernet@guadaltech.es> |
|
|
|
* David Vidal <david.vidal@tecnativa.com> |
|
|
|
|
|
|
|
Maintainer |
|
|
|
---------- |
|
|
|
|
|
@ -1,13 +1,14 @@ |
|
|
|
# Copyright 2016 Henry Zhou (http://www.maxodoo.com) |
|
|
|
# Copyright 2016 Rodney (http://clearcorp.cr/) |
|
|
|
# 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': '11.0.1.0.0', |
|
|
|
'version': '11.0.2.0.0', |
|
|
|
'category': 'Web', |
|
|
|
'author': 'Henry Zhou, Agile Business Group, \ |
|
|
|
Odoo Community Association (OCA)', |
|
|
@ -17,11 +18,13 @@ |
|
|
|
'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, |
|
|
|
} |
|
|
@ -0,0 +1,9 @@ |
|
|
|
<?xml version="1.0" encoding="utf-8"?> |
|
|
|
<odoo> |
|
|
|
|
|
|
|
<record id="group_disallow_export_view_data_excel" model="res.groups"> |
|
|
|
<field name="name">Disallow Export View Data to Excel</field> |
|
|
|
<field name="category_id" ref="base.module_category_hidden"/> |
|
|
|
</record> |
|
|
|
|
|
|
|
</odoo> |
|
|
@ -16,8 +16,12 @@ odoo.define('web_export_view', function (require) { |
|
|
|
var self = this; |
|
|
|
this._super.apply(this, arguments); |
|
|
|
if (self.getParent().renderer.viewType == 'list') { |
|
|
|
self.$el.find('.o_dropdown').last().append(QWeb.render('WebExportTreeViewXls', {widget: self})); |
|
|
|
self.$el.find('.export_treeview_xls').on('click', self.on_sidebar_export_treeview_xls); |
|
|
|
session.user_has_group('web_export_view.group_disallow_export_view_data_excel').then(function (has_group) { |
|
|
|
if (!has_group) { |
|
|
|
self.$el.find('.o_dropdown').last().append(QWeb.render('WebExportTreeViewXls', { widget: self })); |
|
|
|
self.$el.find('.export_treeview_xls').on('click', self.on_sidebar_export_treeview_xls); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|