Camptocamp – Actualités

WebKit Report : system revolution for OpenERP

26 juin 2010

Dear community and partners,

At the last Community & Partners meeting, Camptocamp participated to several workshops on various topics. One of them was on the reporting system of OpenERP; following this workshop, some conclusions have been drawn on which direction to follow. Mainly, we though that we needed a more powerful engine than RML (for better performance) as well as something more easy to use (to reduce costs).

Today, we do have such a solution, including all the requirements discussed together back in March !!

Camptocamp Business Solutions’ team is proud to announce the release of OpenERP WebKit Report as a module for the V5.0 of OpenERP. You can find it in the extra-addons branch as the module called "c2c_webkit_report". This newly released module includes the following main features:

  • OpenERP Compliant (translation, formatLang, pdf/html output)
  • HTML & CSS-3 Reports definition
  • Multi-plateform (Windows, Linux, OS X)
  • Multi-header support with full image support (per report and/or per company)
  • Multi-company compliant
  • Full JavaScript support
  • Easy paper-size, margin and format selection
  • And more : Raw HTML debugger, futur full integrated WYSIWYG editor, …

Watch the live demo here: http://files.me.com/nbessi/06n92k.mov

I want to thank all the participants for their contributions and the constructive work that has been done for drafting the specifications, particularly Nicolas Bessi who created this amazing module!

We are going to work hand-in-hand with OpenERP SA to integrate this new report engine into the core of the future version 6.0 of OpenERP. We hope, you will enjoy it!

Best regards,

Joël Grand-Guillaume

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

36 commentaires

  1. Riza dit :

    Hi,
    I’ve intalled c2c_webkit_report on my ubuntu server 10.04, wkhtmltopdf I’ve installed too, but I’ve still get error :
    IOError: [Errno 2] No such file or directory: u’/tmp/WebKitinvoice1284721660.73.pdf’
    on http://packages.ubuntu.com/lucid/wkhtmltopdf, explained that wkhtmltopdf need xserver, It mean I must install xserver on my ubuntu-server to make webkit_report running well on my server, isn it

  2. Nicolas dit :

    FYI.
    The module is name report_webkit on the addons branch of V6.

    Regards

  3. Mark dit :

    Hi,
    amazing work, I searched launchpad but didn’t find an addon for V6 RC.

    I know it’s only a RC but I would try the addon if you could tell me where I should download it.

    Regards,

    Mark

    • Joël Grand-Guillaume dit :

      Hi,

      Thank you for your interest ! All our work is now fully integrated in the core, after a hard work hand-in-hand with OpenERP SA.

      The name is « report_webkit », and you can use it as if it was always here !

      Regards,

      Joël

  4. Dennis van Velzen dit :

    The HTML tag got filtered:

    {div id= »factuur_header_logo »}${helper.embeed_logo_by_name(‘logo’)}{/div}

    The from DIV tags are replaced by { and }.

    Another question:

    Is there a community forum available?

  5. Dennis van Velzen dit :

    Dear CampToCamp (c2c),

    I installed all the required libs and used the htmltopdf binary from google code and it is working stunning 🙂 on my dedicated Ubuntu server.
    And already use it in production.

    Where can I find documentation of your reporting module?

    The question is as follows:

    I place logos and images with the following html tag:

    ${helper.embeed_logo_by_name(‘logo’)}

    In the style sheet I specified the image width and height:

    #factuur_header_logo img {
    width:215px;
    height:95px;
    }

    But I want to add a page background using the style sheet.

    background-repeat: no-repeat;
    background-position: bottom;
    background-image: url(???)

    I can upload a image to the server, and specify this in the URL but maybe there is a better solution, for example a helper object?

    Kind Regards,
    Dennis van Velzen

  6. Aasim Ansari dit :

    I am getting this error. Following is the traceback-

    Traceback (most recent call last):
    File « /usr/lib/python2.5/site-packages/openerp-server/service/web_services.py », line 683, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
    File « /usr/lib/python2.5/site-packages/openerp-server/addons/c2c_webkit_report/webkit_report.py », line 372, in create
    fnct_ret = self.create_source_webkit(cursor, uid, ids, data, report_xml, context)
    File « /usr/lib/python2.5/site-packages/openerp-server/addons/c2c_webkit_report/webkit_report.py », line 345, in create_source_webkit
    context
    File « /usr/lib/python2.5/site-packages/openerp-server/addons/c2c_webkit_report/webkit_report.py », line 283, in create_single_pdf
    pdf = self.genreate_pdf(bin, report_xml, head, foot, [html])
    File « /usr/lib/python2.5/site-packages/openerp-server/addons/c2c_webkit_report/webkit_report.py », line 166, in genreate_pdf
    pdf = file(out).read()
    IOError: [Errno 2] No such file or directory: u’/tmp/WebKitinvoice1284721660.73.pdf’

    Please let me know if anyone has the solution for it.

  7. amine dit :

    i installed c2c_report baut i have this problem
    i need some help
    Environment Information :
    System : Windows-32bit
    OS Name : nt
    Operating System Release :
    Operating System Version : 32bit
    Operating System Architecture : 32bit
    Operating System Locale : fr_FR.cp1252
    Python Version : 2.5.2
    OpenERP-Client Version : 5.0.14
    Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
    File « serviceweb_services.pyo », line 683, in go
    File « C:Program Files (x86)OpenERP AllInOneServeraddonsc2c_webkit_report.zipc2c_webkit_reportwebkit_report.py », line 377, in create
    File « C:Program Files (x86)OpenERP AllInOneServeraddonsc2c_webkit_report.zipc2c_webkit_reportwebkit_report.py », line 350, in create_source_webkit
    File « C:Program Files (x86)OpenERP AllInOneServeraddonsc2c_webkit_report.zipc2c_webkit_reportwebkit_report.py », line 287, in create_single_pdf
    File « C:Program Files (x86)OpenERP AllInOneServeraddonsc2c_webkit_report.zipc2c_webkit_reportwebkit_report.py », line 99, in get_lib
    except_osv: (‘warning’, ‘Please install wkhtmltopdf 0.9.9(sudo apt-get install wkhtmltopdf) or download it from here: http://code.google.com/p/wkhtmltopdf/downloads/list. You can set executable path into the company’)

    • Joël Grand-Guillaume dit :

      Hi,

      Apparently you miss some libs. You need to install the webkit htmltopdf engine.

      As it says, download it from code.google.com.

      Regards,

      Joël

  8. Nicolas dit :

    Bonjour,

    @Discovery, il semble que le module Python ‘commands’ ne soit pas disponible dans la distribution de Python utilisée. Cela est probablement du au fait que ‘command’ n’est jamais utilisée dans les addons de base et n’a pas été inclue dans l’installeur Python OpenERP. Normalement ‘commands’ fait partie des librairies standards de python 2.x

    Nicolas

  9. Nicolas dit :

    Hi,

    Ray, can you please fill an bug on launchpad in extra-addons and put the complete error trace.
    I have too few info to help you here.

    Regards

    Nicolas

  10. Ray dit :

    helo joel,

    I tried using wizard in c2c_webkit_report but it give error that NO SUCH FILE OR DIRECTORIES .While debugging I came to know that I am getting error in webkit_report.py file and in genreate_pdf method.

    So can u assist to solve this above error.

    Ray..

  11. Ray dit :

    First of all very nicely done.

    I am using your module and it is working fine.

    I like to know, can you assist me to use wizard for customised the required field before generating the pdf report.

    Since I want a few field to be selected before generating the report

    Ray..

    • Joël Grand-Guillaume dit :

      Hi,

      Thank you for your interest, we appreciate the success of our new reporting tools 🙂 Unfortunately, I will not answer your question directly. The documentation provided by OpenERP SA explain how you can extend / create new wizard on reports.

      Our reporting system works exactly the same than the standard one and you can extend it as you did with RML.

      Good luck ,

      Regards,

      Joël

  12. Rémi dit :

    Bonjour,

    j’essai de télécharger ce module sur un serveur windows. Le serveur est protéger par Kaspersky (à jour). Et lors du téléchargment, Kaspersky bloque le fichier « wkhtmltopdf.exe » qui est soit disant infecté par un programme malveillant du nom de « hoax.win32.ArchSMS.ahd ».

    J’ai essayé d’effectuer le téléchargement depuis :
    http://openlabs.co.uk/openerp/repositories/extra-50/c2c_webkit_report/
    http://download.sisalp.net/openerp-extra-addons-5.uptodate.tar.gz
    http://www.openerp.com/download/modules/5.0/c2c_webkit_report.zip

    et j’ai toujours le même résultat :
     »
    18/08/2010 10:43:22 Infecté programme malveillant Hoax.Win32.ArchSMS.ahd http://openlabs.co.uk/tmp/c2c_webkit_report.zip/lib/wkhtmltopdf/wkhtmltopdf.exe
     »

    S’il vous plaît est-ce que quelqu’un sait si cette menace est vraiment dangereuse ? Est-ce vraiment une menace ? Et si oui, comment l’enlever ? Parce que je n’obtiendrai pas l’autorisation de l’utiliser tant que cette menace sera détectée, ce qui est vraiment dommage !

    Merci,
    Rémi.

    • Joël Grand-Guillaume dit :

      Bonjour,

      Nous avons fait le nécessaire et il semble selon nos tests que ce fichier .exe ne représente aucune menace. Il est considéré comme un virus pour une raison inconnue (cela peut se produire en de rare occasion). Cependant, et dans un soucis continu d’amélioration, nous avons retiré cet executable du module.

      Nous vous enjoignons donc à reprendre la dernière version du module et à installer la librairie de manière séparée.

      Cordialement,

      Joël

  13. 5H dit :

    Oups, I ended up finding it here: http://www.openerp.com/download/modules/5.0/c2c_webkit_report.zip

    My bad, should have looked better first. Hope it can help somebody else! 😉

  14. 5H dit :

    I guess I’m just not familiar enough with Bazaar, Launchpad and such but I can’t seem to find « c2c_webkit_report » in lp:openobject-addons.

    Any guidance would be very much appreciated. Thanks in advance!

    Hayssam

  15. Discovery dit :

    Bonjour tous le monde

    est ce qu’il y a quelqu’un qui a installé le module c2c_webkit_report

    je l’ai téléchargé avec bazaar depuis la branche /stable_5.0-extra-addons

    j’essaye de l’installer mais j’ai un message d’erreur :

    Environment Information :
    System : Windows-XP-5.1.2600-SP2
    OS Name : nt
    Operating System Release : XP
    Operating System Version : 5.1.2600
    Operating System Architecture : 32bit
    Operating System Locale : fr_FR.cp1252
    Python Version : 2.5.2
    OpenERP-Client Version : 5.0.10
    Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
    File « netsvc.pyo », line 245, in dispatch
    File « netsvc.pyo », line 74, in __call__
    File « serviceweb_services.pyo », line 632, in execute
    File « serviceweb_services.pyo », line 612, in _execute
    File « wizard__init__.pyo », line 178, in execute
    File « wizard__init__.pyo », line 73, in execute_cr
    File « C:Program FilesOpenERP Serveraddonsbasemodulewizardwizard_module_upgrade.py », line 92, in _upgrade_module
    File « pooler.pyo », line 62, in restart_pool
    File « pooler.pyo », line 40, in get_db_and_pool
    File « addons__init__.pyo », line 740, in load_modules
    File « addons__init__.pyo », line 581, in load_module_graph
    File « addons__init__.pyo », line 403, in register_class
    File « C:Program FilesOpenERP Serveraddonsc2c_webkit_report__init__.py », line 35, in
    File « C:Program FilesOpenERP Serveraddonsc2c_webkit_reportwebkit_report.py », line 47, in
    ImportError: No module named commands

  16. wabi dit :

    Hi,

    i have successfully installed the c2c_webkit_report as you described it in your sample video and its working nicely in reporting in english.

    I haven’t found out how to configure the webkit_reports to display translated reports (german, french ) as well.

    If the partner language is set to a different language than english, it seems that the reports do translate « formatLang » entries correctly but leave other words to be translated unparsed.

    For example, on an invoice, currencies and the partners country name are translated/converted correctly into german but « Invoice » « VAT: », « Total: » etc. are not translated at all.

    Am i missing an important installation/configuration step ?

    Is there some additional documentation/video available on how to do multilanguage capable webkit_reports ?

    Best regards

    wabi

    • Joël Grand-Guillaume dit :

      Hi,

      We are still working hands-in-hands with OpenERP to fix this issue. We want to include the report parsing in the translation like it is with other standard report.

      We could have done a temporary solution, but we prefer to wait till having the right one. We’ll keep you inform on Planet Openobject about that !

      Thanks for using c2c_web_kit_report.

      Regards,

      Joël

  17. Jim Norman dit :

    Very nicely done. Can you estimate when this will be available in Trunk?

    Thanks

    • Joël Grand-Guillaume dit :

      Hi,

      I went to belgium a few weeks ago and I had a talk with OpenERP’s team about the trunk integration. They are responsible for doing that part, so I can’t give you an precise date, but it’ll be done when the 6.0 will be released.

      Regards,

      Joël

  18. interfasys dit :

    OK, bug filed.
    Regarding the header, I created a new IMG entry and a new header, I assigned them to my company, went to invoices and pressed on the webkit invoice button. The c2c logo and header was used instead of my own.

  19. Nicolas dit :

    Hello,

    The module is a standard OpenERP extra-addons you can summit bug in this project.
    I will do a other screen cast that will explain header customization more in details today.

    Regards

    Nicolas

  20. interfasys dit :

    From Launchpad:
    « OpenERP WebKit Report does not use Launchpad for bug tracking. »
    So…where?

    Also, I just tried to create an additional logo and header, but when I generate the invoice, OE still uses the default settings.

  21. Nicolas dit :

    @GEM

    To avoid these unicode problem simply use the entity filter in mako template ${my unicode sting |entity }

    and it will be all set.

    Please post this kind of problem on Launchpad.

    Regards

    Nicolas

  22. interfasys dit :

    Joli boulot 🙂
    Cependant, il y a des problèmes avec l’Unicode:
    Traceback (most recent call last):
    File « /usr/local/lib/python2.6/dist-packages/openerp-server/service/web_services.py », line 683, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
    File « /usr/local/lib/python2.6/dist-packages/openerp-server/addons/c2c_webkit_report/webkit_report.py », line 369, in create
    fnct_ret = self.create_source_webkit(cursor, uid, ids, data, report_xml, context)
    File « /usr/local/lib/python2.6/dist-packages/openerp-server/addons/c2c_webkit_report/webkit_report.py », line 342, in create_source_webkit
    context
    File « /usr/local/lib/python2.6/dist-packages/openerp-server/addons/c2c_webkit_report/webkit_report.py », line 245, in create_single_pdf
    setLang=self.parser_instance.setLang,
    File « /usr/local/lib/python2.6/dist-packages/Mako-0.2.5-py2.6.egg/mako/template.py », line 133, in render
    return runtime._render(self, self.callable_, args, data)
    File « /usr/local/lib/python2.6/dist-packages/Mako-0.2.5-py2.6.egg/mako/runtime.py », line 364, in _render
    _render_context(template, callable_, context, *args, **_kwargs_for_callable(callable_, data))
    File « /usr/local/lib/python2.6/dist-packages/Mako-0.2.5-py2.6.egg/mako/runtime.py », line 381, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
    File « /usr/local/lib/python2.6/dist-packages/Mako-0.2.5-py2.6.egg/mako/runtime.py », line 414, in _exec_template
    callable_(context, *args, **kwargs)
    File « memory:0xad87b4c », line 111, in render_body
    UnicodeEncodeError: ‘ascii’ codec can’t encode character u’xe9′ in position 8: ordinal not in range(128)

  23. GEM dit :

    thanks to the team,
    will test the module son.
    Regards.

  24. GEM dit :

    Hi,
    I try to install your module on vista (server include, build with sources of today), after a first problem solved when I added module commands in serverlibrary.zip, I have second error now, see the message given :

    OpenERP-Client Version : 5.0.11
    Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
    File « netsvc.pyo », line 247, in dispatch
    File « netsvc.pyo », line 76, in __call__
    File « serviceweb_services.pyo », line 633, in execute
    File « serviceweb_services.pyo », line 613, in _execute
    File « wizard__init__.pyo », line 178, in execute
    File « wizard__init__.pyo », line 73, in execute_cr
    File « d:OpenERP AllInOneServeraddonsbasemodulewizardwizard_module_upgrade.py », line 92, in _upgrade_module
    File « pooler.pyo », line 62, in restart_pool
    File « pooler.pyo », line 40, in get_db_and_pool
    File « addons__init__.pyo », line 741, in load_modules
    File « addons__init__.pyo », line 631, in load_module_graph
    File « toolsconvert.pyo », line 874, in convert_xml_import
    File « toolsconvert.pyo », line 771, in parse
    File « toolsconvert.pyo », line 735, in _tag_record
    File « toolsconvert.pyo », line 756, in id_get
    File « toolsmisc.pyo », line 683, in cached_result
    File « d:OpenERP AllInOneServeraddonsbaseirir_model.py », line 447, in _get_id
    ValueError: No references to webkit_report.field_ir_act_report_xml_webkit_header

    hope you will find the problem.
    thanks

    • Joël Grand-Guillaume dit :

      Hi,

      Thanks for your interest ! I just commit the fix right now.. Sorry for the inconvenience, but we just renamed the module and forgot some links inside.

      Everything is fixed now, just take the last extra-addons sources.

      Regards,

      Joël

  25. xrg dit :

    Well done!Thank you..

  26. Nhomar dit :

    Simply amazing folks….. great work…..