安装aeroo report时的问题
-
我想测试一下aeroo report,看看是不是更好用,但是过程中碰到一些问题:
一,第一个报错,具体什么忘了,(记起来的时候一定不上,不好意思)记得好像要修改一下文件:report_aeroo_direct_print/openerp.py:就是添加一行:“installer.xml”
[quote]'update_xml': ["data/report_aeroo_direct_data.xml",
"installer.xml",#就是添加这一行。
"report_aeroo_direct_print_view.xml",
"installer.xml",
"security/security_rules.xml",
"security/ir.model.access.csv"],[/quote]
二,第二个报错:点击“print screen”时,报错信息如下:
[quote]Aeroo Reports: Error while generating the report "name of the report"
13-04-20 10:15:36,721 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [01]:
2013-04-20 10:15:36,722 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [02]: Environment Information :
2013-04-20 10:15:36,722 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [03]: System : Linux-3.5.0-27-generic-i686-with-Ubuntu-12.10-quantal
2013-04-20 10:15:36,722 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [04]: OS Name : posix
2013-04-20 10:15:36,722 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [05]: Distributor ID: Ubuntu
2013-04-20 10:15:36,722 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [06]: Description: Ubuntu 12.10
2013-04-20 10:15:36,722 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [07]: Release: 12.10
2013-04-20 10:15:36,722 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [08]: Codename: quantal
2013-04-20 10:15:36,722 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [09]: Operating System Release : 3.5.0-27-generic
2013-04-20 10:15:36,722 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [10]: Operating System Version : #46-Ubuntu SMP Mon Mar 25 20:00:05 UTC 2013
2013-04-20 10:15:36,723 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [11]: Operating System Architecture : 32bit
2013-04-20 10:15:36,723 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [12]: Operating System Locale : it_IT.UTF-8
2013-04-20 10:15:36,723 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [13]: Python Version : 2.7.3
2013-04-20 10:15:36,723 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [14]: OpenERP-Server Version : 7.0
2013-04-20 10:15:36,723 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [15]: Report generation error!
2013-04-20 10:15:36,723 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [16]: Traceback (most recent call last):
2013-04-20 10:15:36,723 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [17]: File "/home/openerp/addons/report_aeroo/report_aeroo.py", line 439, in create_aeroo_report
2013-04-20 10:15:36,723 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [18]: data = basic.generate(**oo_parser.localcontext).render().getvalue()
2013-04-20 10:15:36,723 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [19]: File "/usr/local/lib/python2.7/dist-packages/aeroolib-1.0.0.RC4-py2.7.egg/aeroolib/plugins/base.py", line 51, in render
2013-04-20 10:15:36,723 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [20]: return self.serializer(self.events)
2013-04-20 10:15:36,724 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [21]: File "/usr/local/lib/python2.7/dist-packages/aeroolib-1.0.0.RC4-py2.7.egg/aeroolib/plugins/opendocument.py", line 1202, in call
2013-04-20 10:15:36,724 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [22]: content = TContent(serialized_stream)
2013-04-20 10:15:36,724 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [23]: File "/usr/local/lib/python2.7/dist-packages/aeroolib-1.0.0.RC4-py2.7.egg/aeroolib/plugins/opendocument.py", line 808, in init
2013-04-20 10:15:36,724 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [24]: self.tree = lxml.etree.parse(StringIO(content))
2013-04-20 10:15:36,724 5868 ERROR gmc openerp.loglevels.deprecated.report_aeroo: [25]: UnicodeEncodeError: 'ascii' codec can't encode character u'\u2022' in position 13593: ordinal not in range(128)
2013-04-20 10:15:36,725 5868 ERROR gmc openerp.service.web_services: Exception: (u'Aeroo Reports: Error while generating the report "Sample Report".', UnicodeEncodeError('ascii', u'<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="ur
...
cut
...
tt\xf5s .</text:p></text:section><text:section text:style-name="Sect2" text:name="Section2"><text:p text:style-name="P9"/></text:section></office:text></office:body></office:document-content>', 13593, 13594, 'ordinal not in range(128)'))[/quote]
解决方案是:genshi的版本问题:只能是0.6.x版本,不能太高也不能太低。查看方法:
import genshi
print genshi.version
附件附上genshi 0.6.1版本
希望对大家有用,谢谢。 -
@winson97,
windows下可以用ms office 做模板吗?
请问哪里有好的文档? -
windows 下没试过
doc不能做模板,office文档要先转为.odt, .ods,但可以输出doc,xls
文档在这:http://www.alistek.com/wiki/index.php/Main_Page