OpenERP – How to export current ‘tree’ view to XLS: use web_export_view

One of the best OpenERP’s features is exporting custom data to CSV/XLS. You can do it by clicking on the export link in the sidebar. The export action allows use to configure what to be exported by selecting fields, etc, and allows you to save your export as a template so that you can export it once again without having to configure it again.

That feature is as great and advanced as limited for an everyday-customer-experience. 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 new web_export_view module.

After you installed it, you’ll find an additional link ‘Export current view’ right below the ‘Export’ one. By clicking on it you’ll get a XLS file contains the same data of the tree view you are looking at, headers included.

As usual: any feedback is welcome!

NOTE: the module is still under development.


UPDATE 06/06/2012

The module is available also on github:

UPDATE January 2014

The modulo is available on

Facebook Twitter Linkedin Digg Delicious Reddit Stumbleupon Tumblr Posterous Email Snailmail

Written by on Monday, June 4th, 2012

  • OpenCode

    Funziona solo con la 6.1? Mi pare di capire, dal nome, che valga solo per il web, giusto?

    • Simone Orsi

       testato su ultima revisione di 6.1 ma non ho ancora provato sul trunk. Yep, solo web… ha poco senso (per me) spendere ancora energie sul GTK 🙂

      • OpenCode

        Credi che questa personalizzazione soppianti la mancanza di ‘Stampa Schermo sul web. Non si potrebbe ottenere anche un pdf (magari con un’altra personalizzazione) propri come accade in Stampa Schermo.

  • Žilvinas Urbonas


    Unable to install module “web_export_view” because an external dependency is not met: No module named xlwt
    any ideas ? 

    • Simone Orsi

      you need to install xlwt? 🙂

      also in std OpenERP you have to install python module xlwt if you want to export to XLS.

      the module is

      and u can install it as usual with ‘sudo pip/easy_install xlwt’

      • Žilvinas Urbonas

        It’s already installed in both system and VirtualEnv, I checked in Python console, it imports xlwt without any problems ;/

        • Simone Orsi

           probably u r running OE with another python. double check that. you can place a pdb into server/openerp-server, run it in foreground and see what python is using with “import sys;sys.version”

          • Žilvinas Urbonas

            Hmm well I tryed to install it on production, installation went fine, but no option in the right sidebar. 

          • Simone Orsi

            what browser are u using? I tested only w/ FF till now. If u r using FF check w/ firebug if you get any error in the console

          • harry

             having the same issue. Installed successfully in 6.1 with no errors but not showing in right sidebar of webclient. No reported errors in firebug. Any special installation instructions to follow?

          • harry

             Got it working by reinstalling into WEB addons and restarting the server. Thanks

          • brazen

            I have the same error, what do you mean by reinstalling into the Web addons?

  • Yogesh Kushwaha

    thats great thinking ..but need to do more work on it .

    • Simone Orsi

       that’s true 🙂 any contribute is welcome 😉

  • vishwanath

    thank you very much…can u tell me how to add this export_current_view button for particular module??????

    • Simone Orsi

      what do you mean with “particular module”?

  • Cristian Salamea

    God job my friend, in Gnuthink use this by default, i have OT question:

    Do you know how to use printscreen with @media css ? i read about this in but there is no way (from me).


    • Lorenzo Battistini

      AFAIK it’s not possible to generate xls files with @media css only

  • Linh

    Do you have a version for openerp v7.

  • Manuel Caicedo

    Thanks, I use it on V7 and work excellent 😀

  • Amine Rajim

    This module sounds Great, but when i want to install it i got this error
    from web.controllers.main import ExcelExport
    ImportError: No module named controllers.main

    • Lorenzo Battistini

      what version of the module are you trying to install on what version of OpenERP?

  • Mazhar Iqbal Rana

    Still formatting changes. If I have used bold or color feature they are not exported

  • Nash

    How I can always display your button in the header? Thanks.

  • Nash

    I have installed the module in Odoo v8. However, the button is shown if the active view is list view not tree view. For instance “Bill of Materials Structure” page is hierarchical tree view, view type = tree, yet the button is not visible.

    • Lorenzo Battistini

      Hello, the functionality is only available for ‘list’ views.
      In the article, they are referred to as ‘tree’ views because that is the technical name used by odoo