India

ZestyBeanz Technologies Pvt Ltd 4th Floor, Nila, Technopark Thiruvananthapuram,
India – 695581
Phone: +91 471 4063254
Fax : +91 471 2700171

   .

ZestyBeanz Technologies Pvt Ltd
61/3236, Manikkath Cross Road
Ravipuram, Kochi, India - 682016
Phone: +91 484 4063254

  UAE

Zesty Labs
Office # 2003, Millennium Plaza Building
Sheikh Zayed Rd, Dubai, UAE
Phone: +971 4333 2222​
Mobile: +971-52-7553466

  Germany​

ZestyBeanz Technologies GmbH
Reuterstraße 1
90408 Nürnberg
Fon: +49 911 4801 444
Fax: +49 911 4801 445

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

Contact Form


Prajul P T's picture

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.

AttachmentSize
web_printscreen_zb_24_mar_v7.zip18.16 KB
web_printscreen_zb_24_mar_v8.zip18.69 KB

Prajul P T's picture

Hi Jarmo,       I have

Hi Jarmo,

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

khudrath ali's picture

Can plz help me to have same

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

Charlie's picture

Hi friend i have a trouble

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!

Anonymous's picture

Hi, This is a great

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

Shyam's picture

Hello, Thanks for this kind

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.

Shyam's picture

Hello, I have one question

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

Shyam's picture

Hello, This module is so so

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.

Shyam's picture

Hello, Yes I got solution. I

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.

Faheem Khan's picture

I am recieving an error on

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

lebanonsky's picture

I made these changes to

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.