Odoo中文社区可以通过以下两个域名访问:shine-it.net , odoo.net.cn

由于系统升迁的原因,本论坛部分较早期的内容存在格式和链接损坏失效的问题,并非本论坛系统本身的缺陷,望谅解

本社区没有维护任何QQ群讨论组,任何与本社区同名的QQ群讨论组的言论与本社区无关!

开发人员可以登录gitter讨论组: http://gitter.im/odoo-china/Talk, 需要github账号

如果您登录系统碰到问题,请在微信公众号留言:

请测试中文报表打印


  • 管理员

    今天把base_report_cn装了一下,中文打印报错。我的系统是Ubuntu9.04, openerp服务器版本5.05-bzr。

    中文打印有问题的,没问题的都跟个贴吧,告诉我你的系统平台,Python版本, openerp服务器版本,出错信息(如果有的话)

    测试方法:
    1 安装base_report_cn, 把sagas修改的__init__.py 替换原来的__init__.py shine-it.net/viewthread.php?tid=447&page=2#pid2402 ;
    2 选择一个客户将其‘语言’设置为中文
    3 用该客户开一张销售订单,打印报表

    看看是我的RP问题,还是模块需要修正。谢谢了。

    [[i] 本帖最后由 digitalsatori 于 2009-9-4 12:42 编辑 [/i]]



  • 建议集体去官方论坛呼吁换 relatorio 引擎


  • 管理员

    虽然没有仔细比较,但是感觉reportlab的功能应该是很强大的,毕竟背后有一个商业公司在推进。relatorio还年轻,需要时间证明其有效性。



  • windos xp sp2
    open erp 5.0.1

    出错信息:报表的中文依然不能显示

    [[i] 本帖最后由 linyaohui 于 2009-9-15 13:11 编辑 [/i]]



  • 经过不懈的努力.

    发现我一直用旧版的 init.py 在玩.

    然后 从 shine-it.net/tinyerp/viewthread.php?tid=447&extra=page%3D1&page=1
    下载最新的 init.py 后..

    测试未果. 删除 init.pyo 文件后,发现 根本就没有自动生成 init.py .
    更新模块(更新成功) 再运行报表(产品-->价格表或者 产品->Product Labels) 依旧黑块. init.pyo 文件依旧未生成.

    重启 server 端后.

    有结果了.:[code]
    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 : zh_CN.cp936
    Python Version : 2.5.2
    OpenERP-Client Version : 5.0.3
    Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
    File "serviceweb_services.pyo", line 687, in go
    File "reportreport_sxw.pyo", line 364, in create
    File "reportreport_sxw.pyo", line 421, in create_source_pdf
    File "reportreport_sxw.pyo", line 439, in create_single_pdf
    File "reportinterface.pyo", line 199, in create_pdf
    File "reportrenderrender.pyo", line 50, in render
    File "reportrenderrml.pyo", line 41, in render
    File "C:Program FilesOpenERP AllInOneServeraddonsbase_report_cn__init
    _.py", line 88, in convert2TrueType
    File "reportrenderrml2pdftrml2pdf.pyo", line 780, in parseNode
    File "reportrenderrml2pdftrml2pdf.pyo", line 195, in render
    File "reportrenderrml2pdftrml2pdf.pyo", line 774, in render
    File "reportlabplatypusdoctemplate.pyo", line 782, in build
    File "reportlabplatypusdoctemplate.pyo", line 724, in _endBuild
    File "reportlabpdfgencanvas.pyo", line 881, in save
    File "reportlabpdfbasepdfdoc.pyo", line 219, in SaveToFile
    File "reportlabpdfbasepdfdoc.pyo", line 231, in GetPDFData
    File "reportlabpdfbasettfonts.pyo", line 1104, in addObjects
    File "reportlabpdfbasepdfdoc.pyo", line 484, in Reference
    ValueError: redefining named object: 'toUnicodeCMap:AAAAAA+WenQuanYiZenHei'
    [/code]



  • 但 使用 Product Labels 报表时,
    汉字能正常显示. 不黑框了...



  • 1.下载中文模块
    z.xiaoi.com/r?code.google.com%2Fp%2Fopenerp-community-addons%2Fdownloads%2Flist
    2.解压,用附件里的__init__.py 替换解压出来的__init__.py
    3.把文件夹base_report_cn放到安装目录下E:Program FilesOpenERP AllInOneServeraddons(例如)
    4.安装该模块
    5.重新启动open erp 服务器

    打印报表,问题解决



  • 跟着做了一次, 出了 Error

    ValueError: Can't map determine family/bold/italic for simhei-oblique



  • 按这里换了个 init.py www.shine-it.net/redirect.php?tid=614&amp ;goto=lastpost

    单据可以打印出来汉字,但是 打印产品标签 出错:

    Environment Information :
    System : Windows-XP-5.1.2600-SP3
    OS Name : nt
    Operating System Release : XP
    Operating System Version : 5.1.2600
    Operating System Architecture : 32bit
    Operating System Locale : zh_CN.cp936
    Python Version : 2.5.2
    OpenERP-Client Version : 5.0.6
    Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
    File "serviceweb_services.pyo", line 687, in go
    File "reportinterface.pyo", line 100, in create
    File "reportinterface.pyo", line 199, in create_pdf
    File "reportrenderrender.pyo", line 50, in render
    File "reportrenderrml.pyo", line 41, in render
    File "C:Program FilesOpenERP AllInOneServeraddonsbase_report_cn__init
    _.py", line 86, in convert2TrueType
    File "reportrenderrml2pdftrml2pdf.pyo", line 780, in parseNode
    File "reportrenderrml2pdftrml2pdf.pyo", line 195, in render
    File "reportrenderrml2pdftrml2pdf.pyo", line 774, in render
    File "reportlabplatypusdoctemplate.pyo", line 756, in build
    File "reportlabplatypusdoctemplate.pyo", line 649, in handle_flowable
    File "reportlabplatypusframes.pyo", line 174, in _add
    File "reportlabplatypusflowables.pyo", line 102, in drawOn
    File "reportlabplatypusflowables.pyo", line 86, in _drawOn
    File "reportlabplatypustables.pyo", line 1282, in draw
    File "reportlabplatypustables.pyo", line 1361, in _drawCell
    File "reportlabpdfgencanvas.pyo", line 1306, in setFont
    File "reportlabpdfbasepdfmetrics.pyo", line 659, in findFontAndRegister
    File "reportlabpdfbasepdfmetrics.pyo", line 618, in getTypeFace
    KeyError: 'SimHeiOblique'


  • 管理员

    解决了以上测试中提到的两个问题: KeyError: 'SimHeiOblique' 和 ValueError: redefining named object: 'toUnicodeCMap:AAAAAA+WenQuanYiZenHei'

    欢迎下载: code.google.com/p/openerp-community-addons/downloads/list



  • 仅安装了 产品模块.

    添加一个"商品001" 分类"分类001"

    打印商品价格表字体正常

    当打印 product label 的时候. 仍然出错.

    File "C:Program FilesOpenERPServerlibrary.zipreportlabplatypusframes.py", line 174, in _add
    File "C:Program FilesOpenERPServerlibrary.zipreportlabplatypusflowables.py", line 105, in drawOn
    File "C:Program FilesOpenERPServerlibrary.zipreportlabplatypusflowables.py", line 89, in _drawOn
    File "C:Program FilesOpenERPServerlibrary.zipreportlabplatypustables.py", line 1283, in draw
    File "C:Program FilesOpenERPServerlibrary.zipreportlabplatypustables.py", line 1362, in _drawCell
    File "C:Program FilesOpenERPServerlibrary.zipreportlabpdfgencanvas.py", line 1378, in setFont
    File "C:Program FilesOpenERPServerlibrary.zipreportlabpdfbasepdfmetrics.py", line 680, in _py_getFont
    File "C:Program FilesOpenERPServerlibrary.zipreportlabpdfbasepdfmetrics.py", line 662, in findFontAndRegister
    File "C:Program FilesOpenERPServerlibrary.zipreportlabpdfbasepdfmetrics.py", line 621, in getTypeFace
    KeyError: 'SimHeiOblique'



  • File "reportlabplatypusparaparser.pyo", line 647, in start_para
    File "reportlabplatypusparaparser.pyo", line 641, in _initial_frag
    File "reportlablibfonts.pyo", line 68, in ps2tt
    ValueError: Can't map determine family/bold/italic for simhei-oblique
    如果在销售订单输入订单行的note,还是会出错的


  • 管理员

    已更新,请帮忙继续测试,谢谢。



  • OK, 测试通过... 岡岡的....

    感谢您对开发社区做出的具大贡献..


  • 管理员

    测试,成功。大家安装模块后记得重启server...:Q


Log in to reply