请测试中文报表打印
-
经过不懈的努力.
发现我一直用旧版的 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] -
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 服务器打印报表,问题解决
-
按这里换了个 init.py www.shine-it.net/redirect.php?tid=614& ;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,还是会出错的 -
已更新,请帮忙继续测试,谢谢。