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.
Attachment | Size |
---|---|
web_printscreen_zb_24_mar_v7.zip | 18.16 KB |
web_printscreen_zb_24_mar_v8.zip | 18.69 KB |
Very good idea to be able to
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 ! :)
Hi, I have tested the
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....
Hi, I have installed this
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?
Hi, Sorry for the
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?
Hi, sorry i didn't see your
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.
Hi, i have the same error,
Hi,
i have the same error, only with pdf and on all models.
both with 1.3 and 1.4 versions.
thanks
hello I'm on windows xp,
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
Hi, Try reloading the
Hi,
Try reloading the browser page and cleaning the browser cache..
Hi, I want to generate xls
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
thank you i will try it, i
thank you i will try it, i have another question, it is possible to add a page header to generate pdf