03 April 2009

New module: base_report_unicode

The final solution to the unicode printing problem many times mentioned in this blog! Simply install this module and your reports will have the truetype fonts needed. That's all, no patching, no tinkering with reportlab and the fonts:)
I've uploaded this module to the community addons mentioned in the previous post.

26 comments:

  1. Thanx! Works fine, at last I can see all my reports in russian.
    But there is one detail - this module should be installed by copying its folder to openerp's addons folder. When I tried to install it from a zip file directly in openerp's interface - I have got an error with printing.

    ReplyDelete
  2. Sorry I've never used zip files:) I have a development setup: bazaar branches and links to the module directories in the addons folder. Did you make that zip file yourself?

    ReplyDelete
  3. I am not too experienced openerp user. Working with bazaar is still uncomfortable for me. :)

    So, at first, I downloaded all the files from web-interface, and archived them to test openerp's web-installation.

    ReplyDelete
  4. Yes, now I see it's a problem. If you install a zip module, the files stay in the zip. For python code its not a problem but for the font files that have to be accessed by an external application (reportlab), it is.

    ReplyDelete
  5. Shouldn't this be marked as bug/enhancement: "zip modules should be exploded"

    ReplyDelete
  6. Thank tou for the useful contribution.

    I've just installed the module. Still I get blank squares in the printed report, whenever there is arabic characters.

    Does the module support arabic too?

    ReplyDelete
  7. First make sure you didn't install from a zip file but copied the directory to the addons.
    Second problem is that Times fonts are not supported in Arabic, the other fonts like Helvetica are OK.
    Try this: edit __init__.py and replace the word 'Serif' with 'Sans' everywhere. That would be a good start.

    ReplyDelete
  8. And please write here about the results or come to the irc channel.

    ReplyDelete
  9. How could I join OpenERP IRC channel?

    ReplyDelete
  10. It's on the freenode irc server, channel #openobject
    If you don't have an irc client, try http://mibbit.com/chat/

    ReplyDelete
  11. Or if freenode is missing from mibbit, you can find a lot of irc clients.

    ReplyDelete
  12. Is it possible for someone to re-link to the location where these files can be found? They're no longer in community addons and I can't find them on bazaar.

    Thanks!
    Damon

    ReplyDelete
  13. Found it!

    https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-extra-addons

    Thanks!

    ReplyDelete
  14. Üdv!

    Nálam nem működnek az ékezetes karakterek.

    Kovat

    ReplyDelete
  15. Ennyi információból nem lehet rájönni a hiba okára:) Gyere fel irc-re és segítek működésre bírni.

    ReplyDelete
  16. húú, most lehet, hogy őskövület vagyok, de még életemben nem kellet irc-znem.
    Hogy is kell?

    ReplyDelete
  17. Sikerült IRC-t megoldanom. Remélem ott alkalomadtán beszélhetünk.

    Üdv

    ReplyDelete
  18. Dukai,
    I've problems with same symbols (ą,ś,ć,ź,ż,ń,ł).
    I dont know how to install fonts in openerp's addons folder.

    ReplyDelete
  19. If you use linux, I can help you setting up this module. Come to the openerp irc channel.

    ReplyDelete
  20. I get this error:

    File "/usr/lib/python2.4/site-packages/openerp-server/addons/base_report_unicode/__init__.py", line 80
    return method(data, args[1:] if len(args) > 2 else args[1], **argv)
    ^
    SyntaxError: invalid syntax

    I really need this to work since we are based in Taiwan where business is conducted in traditional Chinese...

    ReplyDelete
  21. Never tested with python 2.4. Try python 2.5 or 2.6 if you can. You'll also have to replace the built-in dejavu fonts with something else that supports Chinese.

    ReplyDelete
  22. I've got the same problem as Paul.

    Python 2.6, linux, cannot use ąęćżź and similar stuff in reports. I've already tried various instructions with no result

    ReplyDelete
  23. Any news on ąęćżź please? Linux and Python are generally ok with these, why pdf creation would be different out of a sudden?

    ReplyDelete
  24. After installing version 1.1, when printing timesheet report (Reporting - Timesheet - Print My Timesheet), I got this message: "TTFError: Can't open file "c:\program files (x86)\openerp allinone\server\addons\base_report_unicode\fonts\dejavuserifcondensed-bold.ttf"".

    The font probably got damaged.

    ReplyDelete
  25. how can i download it ?? where's the link ??

    ReplyDelete
  26. The link is in this post: http://exploringopenerp.blogspot.com/2009/05/basereportunicode-v11.html

    ReplyDelete

Note: Only a member of this blog may post a comment.