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

原论坛用户的基本信息和发帖这里都予以保留,请注意:原论坛用户无需重新注册新用户,但是您的密码需要重置

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

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

打印->Print Screen 时,出错



  • <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. &amp; ID :Bazaar Package not Found !Traceback (most recent call last):<br />&nbsp; File &quot;/usr/local/lib/python2.6/dist-packages/openerp-server/service/web_services.py&quot;, line 683, in go<br />&nbsp; &nbsp; (result, format) = obj.create(cr, uid, ids, datas, context)<br />&nbsp; File &quot;/usr/local/lib/python2.6/dist-packages/openerp-server/report/printscreen/ps_list.py&quot;, line 82, in create<br />&nbsp; &nbsp; res = self._create_table(uid, datas&#91;&#039;ids&#039;], result&#91;&#039;fields&#039;], fields_order, rows, context, model_desc)<br />&nbsp; File &quot;/usr/local/lib/python2.6/dist-packages/openerp-server/report/printscreen/ps_list.py&quot;, line 97, in _create_table<br />&nbsp; &nbsp; _append_node(&#039;date&#039;, time.strftime(str(locale.nl_langinfo(locale.D_FMT).replace(&#039;%y&#039;, &#039;%Y&#039;))))<br />&nbsp; File &quot;/usr/local/lib/python2.6/dist-packages/openerp-server/report/printscreen/ps_list.py&quot;, line 94, in _append_node<br />&nbsp; &nbsp; n.text = text<br />&nbsp; File &quot;lxml.etree.pyx&quot;, line 821, in lxml.etree._Element.text.__set__ (src/lxml/lxml.etree.c:32944)<br />&nbsp; File &quot;apihelpers.pxi&quot;, line 645, in lxml.etree._setNodeText (src/lxml/lxml.etree.c:15265)<br />&nbsp; File &quot;apihelpers.pxi&quot;, 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




  • 我隐约觉得这个问题有一定的普遍意义,所以即使我使用笨拙的办法把它解决了,但是还希望哪位仔细分析下,所以就把它提了出来。

    Chip