forked from Techsystech/web
[11.0] web_export_view: add security group
parent
b8e7fa3c7d
commit
bd8fd6f3ca
|
@ -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,9 +16,13 @@ odoo.define('web_export_view', function (require) {
|
|||
var self = this;
|
||||
this._super.apply(this, arguments);
|
||||
if (self.getParent().renderer.viewType == 'list') {
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
on_sidebar_export_treeview_xls: function () {
|
||||
|
|
Loading…
Reference in New Issue