Browse Source

[IMP] web_export_view: support any list view (#917)

pull/944/head
Holger Brunn 7 years ago
committed by Pedro M. Baeza
parent
commit
3264e4caff
  1. 2
      web_export_view/__openerp__.py
  2. 7
      web_export_view/static/src/js/web_export_view.js

2
web_export_view/__openerp__.py

@ -21,7 +21,7 @@
{
'name': 'Export Current View',
'version': '8.0.1.3.0',
'version': '8.0.1.3.1',
'category': 'Web',
'author': "Agile Business Group,Odoo Community Association (OCA)",
'website': 'http://www.agilebg.com',

7
web_export_view/static/src/js/web_export_view.js

@ -24,9 +24,12 @@ openerp.web_export_view = function (instance) {
instance.web.Sidebar.include({
redraw: function () {
var self = this;
var self = this,
view_manager = self.getParent().ViewManager,
view_name = view_manager && view_manager.active_view,
active_view = view_name && view_manager.views[view_name];
this._super.apply(this, arguments);
if (self.getParent().ViewManager.active_view == 'list') {
if (active_view.controller instanceof instance.web.ListView) {
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);
}

Loading…
Cancel
Save