3
votes

I have installed a module, "web_export_view", in Odoo v8 (Ubuntu), that adds functionality to export current tree view to Excel. The module causes a button "Export Current View" to be visible at the top of the page, location right of "More" button, when user clicks on checkbox, beside the record, in the tree view. That's fine for Bill of Materials tree view. However, the "Bill of Materials Structure" tree view (view model is "mrp.bom.line") does not have the checkboxes, nor has any button displayed at the top of the page. How can we show a button in that top section of the page? I would like to show "Export Current View" button there. Please see attached picture.

I also installed "web_printscreen_zb" module that claims it can export any tree view to Excel, but its buttons are not visible in "Bill of Materials Structure" tree view page.

Any suggestion how to enable printing or exporting to Excel in "Bill of Materials Structure" page?

enter image description here

1
it's tree view, not list viewAtul Jain

1 Answers

2
votes

In line #42 inside

web_export_view/static/src/js/web_export_view.js

you would at least need to change it to:

if (self.getParent().ViewManager.active_view == 'list' ||self.getParent().ViewManager.active_view == 'form'  )

where form would be "tree" for you or something close to that. But that said you need to change the code to find your data, since it now will not be able to function properly. If you do, share your changes.