<br />Environment Information : <br />System : Linux-2.6.32-29-generic-i686-with-Ubuntu-10.04-lucid<br />OS Name : posix<br />Distributor ID: Ubuntu<br />Description: Ubuntu 10.04.2 LTS<br />Release: 10.04<br />Codename: lucid<br />Operating System Release : 2.6.32-29-generic<br />Operating System Version : #58-Ubuntu SMP Fri Feb 11 19:00:09 UTC 2011<br />Operating System Architecture : 32bit<br />Operating System Locale : en_US.UTF8<br />Python Version : 2.6.5<br />OpenERP-Client Version : 5.0.15<br />Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):<br /> File "/usr/local/lib/python2.6/dist-packages/openerp-server/service/web_services.py", line 683, in go<br /> (result, format) = obj.create(cr, uid, ids, datas, context)<br /> File "/usr/local/lib/python2.6/dist-packages/openerp-server/report/printscreen/ps_list.py", line 82, in create<br /> res = self._create_table(uid, datas['ids'], result['fields'], fields_order, rows, context, model_desc)<br /> File "/usr/local/lib/python2.6/dist-packages/openerp-server/report/printscreen/ps_list.py", line 97, in _create_table<br /> _append_node('date', time.strftime(str(locale.nl_langinfo(locale.D_FMT).replace('%y', '%Y'))))<br /> File "/usr/local/lib/python2.6/dist-packages/openerp-server/report/printscreen/ps_list.py", line 94, in _append_node<br /> n.text = text<br /> File "lxml.etree.pyx", line 821, in lxml.etree._Element.text.__set__ (src/lxml/lxml.etree.c:32944)<br /> File "apihelpers.pxi", line 645, in lxml.etree._setNodeText (src/lxml/lxml.etree.c:15265)<br /> File "apihelpers.pxi", line 1242, in lxml.etree._utf8 (src/lxml/lxml.etree.c:19848)<br />ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes<br />
系统: Ubuntu OpenERP GTK client
动作: 每个Tree view 中, 打印->Print Screen时出错!
上下文:全新套帐,已安装base_report_cn模块
自诊:好像locale.nl_langinfo(locale.D_FMT)取得的date字段为空了,而要求不为空
无效尝试:1. 更改、删除当前user的时区
2. 更换用户
3. 更改用户的语言
解决:ps_list.py中:
注释掉这行: #_append_node('date', time.strftime(str(locale.nl_langinfo(locale.D_FMT).replace('%y', '%Y'))))
把这行的注释去掉: _append_node('date', time.strftime('%d/%m/%Y'))
请求: 怎么回事 ?
Chip