Advanced Printscreen for Odoo 7 and Odoo 8(Analytic Report Printing)

Printscreen has been and is an attractive feature of OpenERP. But unfortunately this feature was available for OpenERP 6.1 GTK Client. OpenERP 7 provide an functionality to print the current view in PDF.

You may have already noticed that i have already published a blog named “Printscreen in OpenERP 7 which was a migrated module from web_export_view with few my own functionality added to it. But now we have developed a new module called web_printscreen_zb with some new features that might be helpful to users of OpenERP 7. 

The main features of this module are:

  • Ability to export view in both PDF as well as in Excel.
  • Ability to export analytic views in to PDF and Excel including group totals.
  • Hierarchical view of the groups.

The module can be installed as a normal OpenERP module. The only python dependency that is need for the module is python-xlwt which is needed to export to xls file. This can be installed using the comment “sudo apt-get install python-xlwt” for Ubuntu. After installing the module, you can see two anchor buttons called “Export to PDF” and “Export to Excel” on the right side of the OpenERP web client as shown in the screenshot below:

These buttons will only appear if the active view is a tree view. This button wont be visible in any of the other view types. When the button “Export to PDF” is clicked, the report will be exported to PDF or if “Export to Excel”, the report will be printed in “Excel”. The heading and the totals will be printed in Bold. A sample screenshot of the excel and PDF report is shown below:

The module also allows to print analytic reports in to CSV of excel. The screenshot below shows an analytic view:

You can also see the “Export to Excel” and “Export to PDF” in the top right side of the view. If you click the button “Export to Excel”, it will be exported to excel else if “Export to PDF”, it will be exported to “PDF”. A sample report is shown below:

A video showing the functionality of the module is shown below:

The module is attached with the blog. Module is also shared at https://github.com/zbeanz/openerp-7-web-addons. Module can also be downloaded from launchpad bzr branch lp:~r-launchpadzbeanz/zbeanz/addons.

Module is also available in Odoo 8. Module is attached with the blog.

Comments

Hai Anh: Hi, I'm using Odoo v8 and this module. Your module works perfect, except that my .pdf files are not readable because some characters are wrap by black boxes. I'm using Vietnamese. How can I fix this? Thanks.".

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Anonymous says:

    where download module ?

    1. Prajul P T says:

      Hi,

           Module is attached with the blog….

      1. Darja says:

        Great tool, realy.
        Please for some additional info:
        1. Is it possible, to set up the header on each .pdf page? Maybe to add also the report header, regarding the menu selected.
        2. Is there any solution to export/print the tree-view, like “Chart of accounts” from menu “Accounting–>Charts–>Chart of accounts”, where the period filter is set already?
        And one more question: how to expand the tree-views in one step, to see “parent” and all sub-level accounts?
        Thanks.

        1. Prajul P T says:

          Hi,

                It is possible to set the header in the PDF page. We can export the chart of account to PDF or Excel but that functionality is not available in the current module. But can be archived. And now in OpenERP we don't have a single button action to expand all the parent levels to view all parent and children but by code modification, we can archive to open all the parents and children during initial loading..

          1. Anonymous says:

            Hello, i am test the addons in odoo 8 and is hide the export when I group the models. It’s cause hide the page number on the find. Any idea that help me?

          2. khadeer says:

            HI sir,
            this is wonderful module.
            it is working fine, but it is not picking the 0 or 0.0 values in pdf / excel report.
            could you please send the solution for this to my mail / post here.
            waiting for reply

  2. Anonymous says:

    This is really helpful . I Was searching for a module like this.
    Thanks

  3. David says:

    Thanks for sharing excelent module.
    I’ve installed the old version (http://www.zbeanztech.com/blog/printscreen-openerp-7).
    after I updated this version. I can not export the report. For example:
    I’ve Export to pdf or Export to Excel next to the number of records in tree view. But I click to it, nothing happened.
    Please help me!

    1. Prajul P T says:

      Hi,

          The new module is entirely different from the older module web_printscreen. Please make sure you have the latest OpenERP 7 server. If the problem persist, feel free to inform me..

      1. David says:

        The version Openerp 7 is Version 7.0-20130729-231030.
        I’ve installed Print Screen Module with Print Screen menu on Slide bar.
        After I installed the Advanced Printscreen for OpenERP 7 module, this menu is repaced with Export to pdf or export to excel

        1. Prajul P T says:

          Hi,

              We have tested the module with the version mentioned by you. We where unable to reproduce the error. I have made some minor changes to the module. Please try with this module. If the problem persist, please let me know…

      2. Anonymous says:

        Is there a similar module or functionality that can be used with v 6.1? Looking for a module that can work in same manner and can print data of search view too.

        1. Prajul P T says:

          Hi,

              Unfortunately this module is not available in v6.1. For printing tree view in Excel there is a module named web_export_view which can be downloaded from from https://apps.openerp.com/apps/6.1/web_export_view/.

    2. Bryan says:

      Hello,
      We resolve the problem of the next form:
      In the line 75 replace
      cellvalue = float(cellvalue)
      by the next:
      try:
      cellvalue = float(cellvalue)
      except:
      cellvalue = cellvalue

      1. Prajul P T says:

        Hi Bryan,

               Thank You for suggesting the method to solve this issue. Your solution is good but i have a suggestion on that. Line 75 in controller.py was meant to convert values like amount, total etc that are of type float to float in excel file. If we change this line, the amount will be shown as string in excel file. I think the better way can be converting these type of fields in to float from js itself. In js, OpenERP has a build in function to do this job ie; instance.web.parse_value(text, { type:"float" }). If we use this method, the float values will be shown as float itself in excel file. I have made changes in the module and updated in my blog and in github. Please take a look at the module and inform me if you have any suggestions.

         

        Valuable feedbacks like this are always welcome…

  4. Andres Calle says:

    Great module! I like the very easy way to use this module, great contribution to all OpenERP users. One suggestion, include some security filter to allow exporting only to specific user groups, that will be needed in order to use in a medium size company.

  5. Anonymous says:

    Can we have a similar module to work with version 6.1? I installed the same module with 6.1 but there is no such “button to export to pdf”. please help i need this on urgent basis.

  6. ciji says:

    Thanks! Good work

  7. Anonymous says:

    Hie, I have installed the module as well as python-xlwt in openerp-7.0. But I am unable to view the buttons although the addons has been properly installed. Please help

  8. Kenny says:

    Client error
    When I export pdf or excel from Reporting–>Purchase–>Purchase Analysis, I got a client error:
    Error: ‘99%’ is not a correct float

    1. Prajul P T says:

      Hi,

          Please check now….

      1. Kenny says:

        OK. It works well.
        Thank you very much.

  9. Anonymous says:

    When i export to excel with 2000 record, server raise error
    raise ValueError(“More than 4094 XFs (styles)”)
    ValueError: More than 4094 XFs (styles)

    1. Anonymous says:

      I receive the same error.
      BTW, this is a great tool.

      1. Prajul P T says:

        Hi,

            I have solved the issue. Please check now…

        Thanks for reporting this issue…

      2. Anonymous says:

        Now it’s ok, it’s very good, thank you very much

    2. Prajul P T says:

      Hi,

          I have solved the issue. Please check now…

      Thanks for reporting this issue…

    3. Anonymous says:

      How can i solve this?
      I made some alterations to the module, but i get the error:
      raise ValueError(“More than 4094 XFs (styles)”)
      Where is this bug? Thanx

  10. Anonymous says:

    This is a wonderful custom module. My question is how do you install this module in your openerp that runs online (Not the demo openerp from official site but yours you install to run in a web server) and not local (it worked for local openerp installation on window).
    ASAP

    1. Prajul P T says:

      Hi,
      This module can be installed and used as any other normal OpenERP module. The server should have python-xlwt python package installed.

  11. TArpi says:

    I’ve been using the old module. Today I had a problem with the decimal separator. I looked on your web page, and I saw the improved version. I installed, and now everything is OK.
    Thank you for this useful module. You should add to the official “openerp.com/apps”!
    Thanks again!
    TArpi

  12. TArpi says:

    Journal items can’t be exported, however it is shown as a tree view.
    If I go to Accounting/Journal Entries/Journal items menu and I set the filters, I can’t see the PDF and Excel export buttons.
    It would be good if it would work.
    Thanks again for this module.
    Best regards,
    TArpi

  13. Anonymous says:

    hello
    I’m on windows xp, openerp 7, I installed the module correctly, but I do not see the buttons to export the tables.
    Thank you for your help

    1. Prajul P T says:

      Hi,

          Try reloading the browser page and cleaning the browser cache..

      1. Anonymous says:

        thank you i will try it, i have another question, it is possible to add a page header to generate pdf

        1. Anonymous says:

          unfortunately without success, I still have the same problem even if I empty the cash and I reload the browser, any ideas

      2. Sengottuvelu says:

        Hi,
        I want to generate xls report in OpenERP 7.0. I generated using form view and the out put not showing in excel sheet. I used the below line for encode the data out=base64.encodestring(file_data.getvalue()). While opening the file it contains some encodeing data. You can find the code here
        http://upcomer.wordpress.com/2013/01/07/openerp-spreedsheetodsxls-report/….
        How to solve this..Kindly help me

  14. Anonymous says:

    Hi, I have installed this amazing module and I’m getting the following error when exporting to pdf format:
    2013-12-12 10:03:53,817 704 ERROR openerp.addons.web.http.HttpRequest.dispatch: An error occurred while handling a json request
    Traceback (most recent call last):
    File “/Users/japerez/virtualenvs/openerp-dev/openerp-7.0-nutsalud/web/addons/web/http.py”, line 285, in dispatch
    r = method(self, **self.params)
    File “/Users/japerez/virtualenvs/openerp-dev/openerp-7.0-nutsalud/otherway-addons/web_printscreen_zb/controllers.py”, line 178, in index
    cookies={‘fileToken’: int(token)})
    File “/Users/japerez/virtualenvs/openerp-dev/openerp-7.0-nutsalud/web/addons/web/http.py”, line 332, in make_response
    response.set_cookie(k, v)
    File “/Users/japerez/virtualenvs/openerp-dev/lib/python2.7/site-packages/Werkzeug-0.9.4-py2.7.egg/werkzeug/wrappers.py”, line 992, in set_cookie
    self.charset))
    File “/Users/japerez/virtualenvs/openerp-dev/lib/python2.7/site-packages/Werkzeug-0.9.4-py2.7.egg/werkzeug/http.py”, line 905, in dump_cookie
    value = to_bytes(value, charset)
    File “/Users/japerez/virtualenvs/openerp-dev/lib/python2.7/site-packages/Werkzeug-0.9.4-py2.7.egg/werkzeug/_compat.py”, line 106, in to_bytes
    raise TypeError(‘Expected bytes’)
    TypeError: Expected bytes
    2013-12-12 10:03:53,908 704 INFO werkzeug: 127.0.0.1 – – [12/Dec/2013 10:03:53] “POST /web/export/zb_pdf_export HTTP/1.1” 500 –
    I have the python-xlwt library installed, and the openerp 7.0 version.
    any help?

    1. Prajul P T says:

      Hi,

          Sorry for the delayed response. Can you please tell me when are you getting this error. Ie; when printing records of which model are you getting this error?

      1. Anonymous says:

        Hi,
        i have the same error, only with pdf and on all models.
        both with 1.3 and 1.4 versions.
        thanks

      2. Juan Alfonso says:

        Hi, sorry i didn’t see your reply.
        I have proved to install the last version but i have the same error too, only with pdf export and on all models.

  15. Ifredo says:

    Very good idea to be able to print the view to spreadsheet and PDF !
    However: after installing the module I can print around 500 records max to .xls. If the view is larger there is no output and no warning (at least not to me as a user). Print to PDF results in no output, regardless of how many records selected in the view.
    The server is hosted so I have no access to possible warnings on the host server. Any obvious explanations for this problem or things to check ?
    Kind regards / Merry Christmas ! 🙂

    1. Prajul P T says:

      Hi,

          I have tested the scenario you specified. I was able to print more that 1000 records. Please check if you are using the latest module. The latest module can also be downloaded from launchpad using   bzr branch lp:~r-launchpadzbeanz/zbeanz/addon. If the problem persist please provide the log details of the server so that it would be easy for us to track the issue. 

       

      Merry Christmas….

  16. Anonymous says:

    Hi,
    I Notice one of your order analysis page shows cost price & total cost column, which is not the default case. I just followed
    http://help.openerp.com/question/17156/add-more-fields-to-pos-order-analysis-report/
    http://www.zbeanztech.com/blog/sales-analysis-report
    unfortunately I keep getting issue, where cost_price is not exist in pos order model – what am i missing? can anyone help?
    ProgrammingError: column report_pos_order.cost_price does not exist
    LINE 1: …ort_pos_order”.”product_qty”) AS product_qty, sum(“report_po…
    using Openerp7;

  17. Hans says:

    Hi Prajul,
    Great addons, but I found a bug when I want to print with pdf,
    I cannot print it. It doesnt download anything.
    There’s an error message in the log:
    2014-02-17 02:16:52,675 20199 ERROR ONL openerp.addons.web.http.HttpRequest.dis$
    Traceback (most recent call last):
    File “/opt/openerp70/falinwa_branch/web/http.py”, line 285, in dispatch
    r = method(self, **self.params)
    File “/opt/openerp70/falinwa_branch/web_printscreen_zb/controllers.py”, line $
    cookies={‘fileToken’: int(token)})
    File “/opt/openerp70/falinwa_branch/web/http.py”, line 332, in make_response
    response.set_cookie(k, v)
    File “/usr/lib/python2.7/dist-packages/werkzeug/wrappers.py”, line 992, in se$
    self.charset))
    File “/usr/lib/python2.7/dist-packages/werkzeug/http.py”, line 905, in dump_c$
    value = to_bytes(value, charset)
    File “/usr/lib/python2.7/dist-packages/werkzeug/_compat.py”, line 106, in to_$
    raise TypeError(‘Expected bytes’)
    TypeError: Expected bytes
    This problem only occur on my cloud server, when I try in my local its worked. I used your lasted version module (v4).
    Do you know what is the problem?
    Thank you.

    1. Prajul P T says:

      Hi,

          Can you please check if python-xlwt package is installed in the server. If this don't fix the issue can you please specify from where you are getting the error. ie; while printing which record you are getting the error.

      1. Hans says:

        Hi Prajul,
        Thank’s for your response,
        The error occured everywhere(such as purchase order,supplier,sale order, etc) when I try to print in pdf, in excel its worked fine.
        Even when I try on demo database the error still occured.
        The error is always the same:
        2014-02-17 02:16:52,675 20199 ERROR ONL openerp.addons.web.http.HttpRequest.dis$
        Traceback (most recent call last):
        File “/opt/openerp70/falinwa_branch/web/http.py”, line 285, in dispatch
        r = method(self, **self.params)
        File “/opt/openerp70/falinwa_branch/web_printscreen_zb/controllers.py”, line $
        cookies={‘fileToken’: int(token)})
        File “/opt/openerp70/falinwa_branch/web/http.py”, line 332, in make_response
        response.set_cookie(k, v)
        File “/usr/lib/python2.7/dist-packages/werkzeug/wrappers.py”, line 992, in se$
        self.charset))
        File “/usr/lib/python2.7/dist-packages/werkzeug/http.py”, line 905, in dump_c$
        value = to_bytes(value, charset)
        File “/usr/lib/python2.7/dist-packages/werkzeug/_compat.py”, line 106, in to_$
        raise TypeError(‘Expected bytes’)
        TypeError: Expected bytes

        1. Prajul P T says:

          Hi,

               I can't reproduce the error on my side. I have tested it in one our servers and its working fine. Can you please try replacing werkzeug in path /usr/lib/python2.7/dist-packages/werkzeug. You can download it from https://dl.dropboxusercontent.com/u/88263455/werkzeug.zip.

          Please let me know the result.

          1. Hans says:

            ahh, I see..
            its because my cloud running on ubuntu 13
            and its run on latest werkzeug (v9)
            I must do this first : sudo pip install werkzeug==0.8.3
            and its worked fine now.
            Thank you for your help.
            ps: Very great addons by the way.

  18. This module is awesome !
    Just have to declare a new tree-view and you have a light report and Excel export !
    Many thanks for sharing it..

  19. Kevin McMenamin says:

    thanks for this module. The issue I have is the export only works for up to 200 rows of data – after that it just times out. Is this expected behaviour?

    1. Prajul P T says:

      Hi,

           This is not the expected behavior. We have tested the module with more that 3000 records. Can you please check if there is any error in server log.

      1. Kevin McMenamin says:

        found the error: xlwt set style making error: More than 4094 XFs (styles)
        the solution was: wb = xlwt.Workbook(style_compression=2)
        now successfully exporting 5,000 rows of data.

  20. Hans Yonathan says:

    Hi Prajul,
    As Thanks for this module development, I have improve this module to become cooler. So here is the log that I improved:
    1. Now support for all tree view(I am not talking about listview but treeview, such as tree in Product Category or analytic accounting or Journal Items).
    2. Support for windows in “new” mode (popup).
    3. Improve link (pdf or excel) to be button like other openERP, so it more elegant to see and more neat.
    Need to be improve:
    1. Support for form view too, now its not support yet. (This will be hard task)
    I want to propose the merge with your branch but I dont know how,
    here is the link of my branch: lp:~hans-yonathan/printscreen/trunk
    Maybe this will be start for our partnership.
    fyi: I have developed many cool module too and I will be happy if we can share our module to each other.
    Thank you.

  21. Anonymous says:

    Hi Prajul,
    Your module looks like incredible, but when I install it, the new buttons don’t appear and I have an error message:
    OpenERP Server Error
    Client Traceback (most recent call last):
    File “/opt/openerp/openerp/addons/web/http.py”, line 204, in dispatch
    response[“result”] = method(self, **self.params)
    File “/opt/openerp/openerp/addons/web/controllers/main.py”, line 1125, in call_button
    action = self._call_kw(req, model, method, args, {})
    File “/opt/openerp/openerp/addons/web/controllers/main.py”, line 1113, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
    File “/opt/openerp/openerp/addons/web/session.py”, line 42, in proxy
    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
    File “/opt/openerp/openerp/addons/web/session.py”, line 30, in proxy_method
    result = self.session.send(self.service_name, method, *args)
    File “/opt/openerp/openerp/addons/web/session.py”, line 103, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
    Server Traceback (most recent call last):
    File “/opt/openerp/openerp/addons/web/session.py”, line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
    File “/opt/openerp/openerp/netsvc.py”, line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
    File “/opt/openerp/openerp/service/web_services.py”, line 626, in dispatch
    res = fn(db, uid, *params)
    File “/opt/openerp/openerp/osv/osv.py”, line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
    File “/opt/openerp/openerp/osv/osv.py”, line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
    File “/opt/openerp/openerp/osv/osv.py”, line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File “/opt/openerp/openerp/osv/osv.py”, line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
    File “/opt/openerp/openerp/addons/base/module/module.py”, line 424, in button_immediate_install
    return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
    File “/opt/openerp/openerp/addons/base/module/module.py”, line 475, in _button_immediate_function
    _, pool = pooler.restart_pool(cr.dbname, update_module=True)
    File “/opt/openerp/openerp/pooler.py”, line 39, in restart_pool
    registry = RegistryManager.new(db_name, force_demo, status, update_module)
    File “/opt/openerp/openerp/modules/registry.py”, line 218, in new
    openerp.modules.load_modules(registry.db, force_demo, status, update_module)
    File “/opt/openerp/openerp/modules/loading.py”, line 345, in load_modules
    processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules, update_module)
    File “/opt/openerp/openerp/modules/loading.py”, line 256, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
    File “/opt/openerp/openerp/modules/loading.py”, line 165, in load_module_graph
    init_module_models(cr, package.name, models)
    File “/opt/openerp/openerp/modules/module.py”, line 374, in init_module_models
    result = obj._auto_init(cr, {‘module’: module_name})
    File “/opt/openerp/openerp/osv/orm.py”, line 3162, in _auto_init
    default = self._defaults[k](self, cr, SUPERUSER_ID, context)
    File “/opt/openerp/openerp/addons/delivery/stock.py”, line 140, in
    ‘weight_uom_id’: lambda self,cr,uid,c: self._get_default_uom(cr,uid,c)
    File “/opt/openerp/openerp/addons/delivery/stock.py”, line 138, in _get_default_uom
    return self.pool.get(‘product.uom’).search(cr, uid, [(‘category_id’, ‘=’, uom_categ_id),(‘factor’,’=’,1)])[0]
    IndexError: list index out of range
    Can you help me ?

    1. Prajul P T says:

      Hi,

           This error is not from my module. I think you have deleted some UOM from ERP. There are some UOM which should not be deleted. Please update the product module. But i think you have to do some modification in the product module. The UOM are loaded from the file product_data.xml in product module and this file has <data noupdate="1"> set. Change it to <data noupdate="0"> and update the product module.

      Try updating the product module without the above said modification. If the error still exist, please do it as explained above.

      1. Anonymous says:

        Thank you,
        I’ve found the error and the installation is now completed !
        This module is awesome !

  22. Amol says:

    Hi Prajul,
    I tried it to install
    1. I unzipped the module and pasted in addons directory.
    2. Then I refresh the eclipse.
    3. I ran the command for python but it says it is already in the new version.
    4. update module list.
    But still it is not showling.
    Not able to install. please help
    Thanks in Advance
    🙂

    1. Prajul P T says:

      Hi Amol,

             Please restart your OpenERP server and then update the module list.

    2. Anonymous says:

      hi, I’m having 1 problem
      I’m using python OpenERP source code, when export excel file to save it but nothing appears
      if anyone has seen this case to help me with
      thank you
      ah! i’m using openerp 6

      1. Prajul P T says:

        Hi,

             Is there any server error log?

  23. Amine says:

    Hello your 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

  24. King Wang says:

    Hi Prajul,
    It is super useful and great module! Nice Job!
    Just found a small bug, when I goes to Location->Products by Location, in that Product List, the report won’t work. There is no error showing as well.
    You may want to check this?

    1. Prajul P T says:

      Hi,

          We have already fixed this bug. Please try with the latest module. The module is attached with the blog. If the problem persist, please get back.

      1. King Wang says:

        Hi the latest module in the attachment is the same as yesterday, right? It still has the same problem.

        1. Prajul P T says:

          Hi,

               I cannot reproduce the error from my side. I tested the report from Warehouse > Configuration > Location. Selected one record. In More dropdown, there is a item called "Product by Location". Which opens up a wizard where i selected "Analyze Current Inventory". This opens up a list of product and its stock levels. The report is printing from here also. Please give me the steps you followed so that i can reproduce the error on my side.

          1. King Wang says:

            Your steps are correct and the report just does not print on my server
            Are you using the web_printscreen_zb_20_may_2014.zip?

          2. Prajul P T says:

            Yes. I am using web_printscreen_zb_20_may_2014.zip. Which OpenERP server are you using(Date).

          3. King Wang says:

            It works in another server…
            I will check myself. Thanks!

          4. Prajul P T says:

            Ok that might be the problem. I am using the latest OpenERP 7 server.

          5. Anonymous says:

            I want to create a view to display balance sheet , P & L and other accounts as per the user selects.
            I am using openerp 7.0
            It is already there, but what I want is, we can print above reports(financial reports in openerp) HERE
            => I want to disply what is being printed in the reports…!
            => Meaning to say is I want all the calculations field I get from different tables into each one of the accounts like Profit & loss , balance sheet , etc.
            => How is it possible?
            => Do i need to create a template or I have to go through creating the views ? like those already in financial reports?

  25. Shyam says:

    Hello,
    This module is so so useful. Thanks for such kind of activity.
    But I have one little issue, If I run module in ubuntu its working fine for me but when I work with Centos that time its not generate excel file only pdf file is generated.
    Please do nedful help.
    Thanks,
    Shyam.

    1. Shyam says:

      Hello,
      Yes I got solution. I installed xlwt package. Now its working fine.
      You can put pre require package in __openerp__.py files description.
      So non-python or Non-OpenERP user can use understand easily.
      Thanks.
      Shyam.

      1. Faheem Khan says:

        I am recieving an error on installing this great module in odoo 8.
        Error is
        Traceback (most recent call last):
        File “/opt/odoo/odoo/openerp/http.py”, line 476, in _handle_exception
        return super(JsonRequest, self)._handle_exception(exception)
        File “/opt/odoo/odoo/openerp/http.py”, line 495, in dispatch
        result = self._call_function(**self.params)
        File “/opt/odoo/odoo/openerp/http.py”, line 311, in _call_function
        return checked_call(self.db, *args, **kwargs)
        File “/opt/odoo/odoo/openerp/service/model.py”, line 113, in wrapper
        return f(dbname, *args, **kwargs)
        File “/opt/odoo/odoo/openerp/http.py”, line 308, in checked_call
        return self.endpoint(*a, **kw)
        File “/opt/odoo/odoo/openerp/http.py”, line 685, in __call__
        return self.method(*args, **kw)
        File “/opt/odoo/odoo/openerp/http.py”, line 360, in response_wrap
        response = f(*args, **kw)
        File “/opt/odoo/odoo/addons/web/controllers/main.py”, line 945, in call_button
        action = self._call_kw(model, method, args, {})
        File “/opt/odoo/odoo/addons/web/controllers/main.py”, line 933, in _call_kw
        return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
        File “/opt/odoo/odoo/openerp/api.py”, line 233, in wrapper
        return old_api(self, *args, **kwargs)
        File “/opt/odoo/odoo/openerp/api.py”, line 387, in old_api
        result = new_api(recs, *args, **kwargs)
        File “/opt/odoo/odoo/openerp/api.py”, line 391, in new_api
        result = [method(rec, *args, **kwargs) for rec in self]
        File “/opt/odoo/odoo/openerp/addons/base/module/wizard/base_module_update.py”, line 15, in update_module
        self.updated, self.added = self.env[‘ir.module.module’].update_list()
        File “/opt/odoo/odoo/openerp/api.py”, line 231, in wrapper
        return new_api(self, *args, **kwargs)
        File “/opt/odoo/odoo/openerp/api.py”, line 460, in new_api
        result = method(self._model, cr, uid, *args, **kwargs)
        File “/opt/odoo/odoo/openerp/addons/base/module/module.py”, line 653, in update_list
        handler.load_addons()
        File “/opt/odoo/odoo/openerp/http.py”, line 1186, in load_addons
        m = __import__(‘openerp.addons.’ + module)
        File “/opt/odoo/odoo/openerp/modules/module.py”, line 76, in load_module
        mod = imp.load_module(‘openerp.addons.’ + module_part, f, path, descr)
        File “/opt/odoo/odoo/addons/web_printscreen_zb/__init__.py”, line 25, in
        import controllers
        File “/opt/odoo/odoo/addons/web_printscreen_zb/controllers.py”, line 28, in

        import web.http as openerpweb
        ImportError: No module named web.http

        1. Prajul P T says:

          Hi,

              This module is developed for OpenERP 7. To work on OpenERP 8, we need to migrate this module. Migration is in process and not yet complete. We will post the migrated module in coming days in this blog or in our lp branch. I will inform you when the migration is complete.

          1. Anonymous says:

            Hello Prajul, I’m very interested by the module upgrade, I could make some modifications at the code to install the module in Odoo 8, but when I push on “PDF” or “Excel” nothing happens..
            It would be Awesome to have this functionality on Odoo 8.
            Thanks!

        2. lebanonsky says:

          I made these changes to controllers.py imports:
          from openerp import http as openerpweb
          from openerp.addons.web.controllers.main import ExcelExport
          from openerp.addons.web.controllers.main import Export
          and now printscreen installs in v8.

  26. Shyam says:

    Hello,
    I have one question for this module.
    When we print report from standard it gives report header from company rml header.
    But when we print report from this module its give another header.
    It is posible to set standard header in this module?
    Thanks,
    Shyam

  27. Shyam says:

    Hello,
    Thanks for this kind of nice activity.
    I have one little issue regarding this module.
    When I print standard report than report is print with proper header which set in company.
    But when I print report from this module its gives different header.
    SO it is posible to print report with standard header with this module?
    Thanks in advance.
    Shyam.

  28. Anonymous says:

    Hi,
    This is a great module.
    Could you help us on how to include images from list view in pdf export.
    (U can get images in list view by installing the module from https://github.com/hsd/listview_images)
    Thanks
    Ankita

  29. Charlie says:

    Hi friend i have a trouble when im trying to export a report in pdf, it doesn’t print the report when i group by: XXXX in the filter box: the log shows this line :
    ERROR DB openerp.addons.web.http.HttpRequest.dispatch: An error occurred while handling a json request: ………IndexError: list index out of rangeparagraph text u’‘ caused exception
    i think the module its great and i hope you can helpme with this.
    Auf Wiedersehen!

  30. khudrath ali says:

    Can plz help me to have same function for the child table as well
    Thanks in advance

  31. Jarmo says:

    Hello,
    This is very useful module. What is the status of the migration to V8?

    1. Prajul P T says:

      Hi Jarmo,

            I have attached the migrated version of the module with the blog.

  32. Hi,
    This module is great! When will this be available for v8?
    Thanks!

    1. Prajul P T says:

      Hi,

          I have attaced the migrated module with the blog…

  33. Anonymous says:

    Hi Prajul,
    I have test web_printscreen_zb for version 8,
    it can be installed, but there’s some problem
    For example:
    1. Cannot print pdf when we click pdf button on it.
    2. We can export it to excel by click the button excel, but when we want to make an exportation from the more>Export and choose the excel type we cannot export it again from there.
    We have check this issue, and this is come when we installed your module, when we uninstalled it we can export in excel type.
    Thank You.

  34. Saul says:

    Hi,
    Great addon !!
    I’ve installed it in Odoo v8 and works at 50 %. print perfectly with excel but not work me with the export to pdf. I’ve read that it’s neccesary a downgrade in version wkhtmtopdf from 0.9.4 to 0.8.3.. Is it neccesary ?
    Is it possible that was another problem ?
    Thank you very much for your work !! a great module !
    Best Regards, Saúl.

    1. mp says:

      The problem is not in werkzeug.
      It is not neccesary a downgrade, but to solve this you must modify, around line 183, the file controllers.py, changing from: cookies={‘fileToken’: int(token)})
      to: cookies={‘fileToken’: token})
      this work fo me (odoo 8.0).

      1. saul says:

        Thank you very much !!!
        I’ll try it in this way.
        Best Regards, Saúl.

      2. mehdi says:

        now its ok but i have problem with arabic language in pdf export ?
        (pdf print of odoo work in arabic without problem)

      3. Prajul P T says:

        Hi mp,

             Thank you for your valuable information. I have made change in controllers.py based on your suggestion and updated module is attached with the blog.

      4. -ameer- says:

        As far as i know, this module only available for openerp-v7 and odoo v8. how can i use this module for odoo saas 6. it is possible to make it function perfectly. i tried to install this module before, but it cannot work on odoo saas6. kindly help me. thank you.

  35. Anonymous says:

    I have installed the module web_printscreen_zb but it is not showing in my “Bill of Materials Structure” page. I think it is tree view one2many. Is that a limitation?

  36. Nash says:

    You wrote that “These buttons will only appear if the active view is a tree view”. I think this may be misleading because the buttons will appear only if the active view is list view. Proof for this is “Bill of Materials Structure” page. The active view is tree view yet there are no visible buttons for export to PDF or Excel. Can you update module so it can print content, for instance, of “Bill of Materials Structure” page? Thanks.

  37. Francis says:

    Hi this is really a great module thanks so much for the time taken to develop it.
    I picked up something though, it give the error say 30:23 is not a valid float when you try to use it on timesheet activites. Is there a work around to this?
    Thanks

  38. mehdi says:

    i have a problem in arabic caracter when i export pdf file with web_printscreen_zb modul but i dont see this problem in the print report pdf function of odoo ?

  39. mehdi says:

    The name of excel file is Excel.xls ok but pdf file is PDF without extension then i change this code :
    ligne 181 in controllers.py
    ‘attachment; filename=PDF Export’), =>’attachment; filename=Export.pdf’),

  40. mokni says:

    only one problem… arabic language in pdf… please when i export pdf document in odoo with this module in English language i dont have problem but its impossible in arabic language

  41. Pedro Jorge says:

    This is very good! Thanks for sharing!

  42. Ricardo says:

    Hello,
    I tried your v9 version but it does not work. Can you send me a version 9 of the printsreen_zb that works?
    Thanks!

  43. Anonymous says:

    Thank you for sharing this usefull module,
    I installed it on V8, but the smart buttons on Products page”Form view” disappeared !. I appreciate your help in this matter,
    Thanks in advance.

  44. Hai Anh says:

    Hi, I’m using Odoo v8 and this module. Your module works perfect, except that my .pdf files are not readable because some characters are wrap by black boxes. I’m using Vietnamese.
    How can I fix this?
    Thanks.

© 2020 Zesty Beanz Pvt Ltd All Rights Reserved.