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

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

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

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

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

GTK 客户端出错



  • 各位大大,
    小弟新手,最近在测试openerp时遇到一个GTK客户端出错的问题, 具体如下:
    服务器环境: LinuxMint 12  32bit(ubuntu 11.10), openerp版本6.1
    客户端环境: Window XP SP3,gtk客户端版本6.1.

    客户端可以正常连接,进入后点击左侧菜单里的组件很多都无法访问, 如销售线索, 商机等, 点击后没有任何反应。 做了下测试:
    1. 服务器如果是linux, 客户端是windows, 就有这个问题,
    2. 服务器windows,客户端windows, 没有问题,
    3. 服务器linux, 客户端linux, 没有问题
    4. 服务器windows,客户端linux, 也没有问题。

    因此,貌似只有服务器是linux而客户端是windows下就会出错。 出错代码如下:

    Traceback (most recent call last):<br />&nbsp; File &quot;modules\gui\window\tree.pyo&quot;, line 212, in sig_open<br />&nbsp; File &quot;modules\gui\window\tree.pyo&quot;, line 201, in sig_action<br />&nbsp; File &quot;modules\action\main.pyo&quot;, line 206, in exec_keyword<br />&nbsp; File &quot;modules\action\main.pyo&quot;, line 147, in _exec_action<br />&nbsp; File &quot;modules\gui\window\__init__.pyo&quot;, line 48, in create<br />&nbsp; File &quot;modules\gui\window\form.pyo&quot;, line 75, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 134, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 594, in add_view_id<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 640, in add_view<br />&nbsp; File &quot;widget\view\widget_parse.pyo&quot;, line 53, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 161, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 449, in __init__<br />ValueError: Invalid format string<br />Traceback (most recent call last):<br />&nbsp; File &quot;modules\gui\window\tree.pyo&quot;, line 212, in sig_open<br />&nbsp; File &quot;modules\gui\window\tree.pyo&quot;, line 201, in sig_action<br />&nbsp; File &quot;modules\action\main.pyo&quot;, line 206, in exec_keyword<br />&nbsp; File &quot;modules\action\main.pyo&quot;, line 147, in _exec_action<br />&nbsp; File &quot;modules\gui\window\__init__.pyo&quot;, line 48, in create<br />&nbsp; File &quot;modules\gui\window\form.pyo&quot;, line 75, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 134, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 594, in add_view_id<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 640, in add_view<br />&nbsp; File &quot;widget\view\widget_parse.pyo&quot;, line 53, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 161, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 449, in __init__<br />ValueError: Invalid format string<br />Traceback (most recent call last):<br />&nbsp; File &quot;modules\gui\window\tree.pyo&quot;, line 212, in sig_open<br />&nbsp; File &quot;modules\gui\window\tree.pyo&quot;, line 201, in sig_action<br />&nbsp; File &quot;modules\action\main.pyo&quot;, line 206, in exec_keyword<br />&nbsp; File &quot;modules\action\main.pyo&quot;, line 147, in _exec_action<br />&nbsp; File &quot;modules\gui\window\__init__.pyo&quot;, line 48, in create<br />&nbsp; File &quot;modules\gui\window\form.pyo&quot;, line 75, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 134, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 594, in add_view_id<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 640, in add_view<br />&nbsp; File &quot;widget\view\widget_parse.pyo&quot;, line 53, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 161, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 449, in __init__<br />ValueError: Invalid format string<br />C:\Program Files\OpenERP 6.1\Client\openerp-client.exe:138: PangoWarning: couldn&#039;t load font &quot;Times New Bold Not-Rotated 10&quot;, falling back to &quot;Sans Bold Not-Rotated 10&quot;, expect ugly output.<br />C:\Program Files\OpenERP 6.1\Client\library.zip\widget\view\form_gtk\image.py:185: GtkWarning: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.<br />Traceback (most recent call last):<br />&nbsp; File &quot;widget\view\form_gtk\parser.pyo&quot;, line 123, in button_clicked<br />&nbsp; File &quot;widget\model\record.pyo&quot;, line 382, in get_button_action<br />&nbsp; File &quot;modules\action\main.pyo&quot;, line 117, in _exec_action<br />TypeError: &#039;int&#039; object is unsubscriptable<br />C:\Program Files\OpenERP 6.1\Client\library.zip\widget\view\form_gtk\image.py:185: GtkWarning: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.<br />C:\Program Files\OpenERP 6.1\Client\library.zip\common\common.py:353: GtkWarning: Could not find the icon &#039;gtk-file&#039;. The &#039;hicolor&#039; theme<br />was not found either, perhaps you need to install it.<br />You can get a copy from:<br />	http://icon-theme.freedesktop.org/releases<br />Traceback (most recent call last):<br />&nbsp; File &quot;widget\view\form_gtk\many2one.pyo&quot;, line 279, in sig_edit<br />&nbsp; File &quot;widget\view\form_gtk\many2one.pyo&quot;, line 77, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 134, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 594, in add_view_id<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 640, in add_view<br />&nbsp; File &quot;widget\view\widget_parse.pyo&quot;, line 53, in parse<br />&nbsp; File &quot;widget\view\form_gtk\parser.pyo&quot;, line 488, in parse<br />&nbsp; File &quot;widget\view\form_gtk\one2many_list.pyo&quot;, line 174, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 134, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 588, in add_view_id<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 640, in add_view<br />&nbsp; File &quot;widget\view\widget_parse.pyo&quot;, line 53, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 161, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 449, in __init__<br />ValueError: Invalid format string<br />C:\Program Files\OpenERP 6.1\Client\library.zip\widget\view\form_gtk\many2one.py:246: Warning: gsignal.c:2392: instance `028794E8&#039; has no handler with id `2942&#039;<br />Traceback (most recent call last):<br />&nbsp; File &quot;widget\view\form_gtk\many2one.pyo&quot;, line 263, in sig_find<br />&nbsp; File &quot;modules\gui\window\win_search.pyo&quot;, line 122, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 134, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 594, in add_view_id<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 640, in add_view<br />&nbsp; File &quot;widget\view\widget_parse.pyo&quot;, line 53, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 161, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 449, in __init__<br />ValueError: Invalid format string<br />C:\Program Files\OpenERP 6.1\Client\library.zip\widget\view\form_gtk\many2one.py:275: Warning: gsignal.c:2392: instance `028794E8&#039; has no handler with id `2942&#039;<br />Traceback (most recent call last):<br />&nbsp; File &quot;widget\view\form_gtk\many2one.pyo&quot;, line 279, in sig_edit<br />&nbsp; File &quot;widget\view\form_gtk\many2one.pyo&quot;, line 77, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 134, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 594, in add_view_id<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 640, in add_view<br />&nbsp; File &quot;widget\view\widget_parse.pyo&quot;, line 53, in parse<br />&nbsp; File &quot;widget\view\form_gtk\parser.pyo&quot;, line 488, in parse<br />&nbsp; File &quot;widget\view\form_gtk\one2many_list.pyo&quot;, line 174, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 134, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 588, in add_view_id<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 640, in add_view<br />&nbsp; File &quot;widget\view\widget_parse.pyo&quot;, line 53, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 161, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 449, in __init__<br />ValueError: Invalid format string<br />Traceback (most recent call last):<br />&nbsp; File &quot;widget\view\form_gtk\many2one.pyo&quot;, line 279, in sig_edit<br />&nbsp; File &quot;widget\view\form_gtk\many2one.pyo&quot;, line 77, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 134, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 594, in add_view_id<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 640, in add_view<br />&nbsp; File &quot;widget\view\widget_parse.pyo&quot;, line 53, in parse<br />&nbsp; File &quot;widget\view\form_gtk\parser.pyo&quot;, line 488, in parse<br />&nbsp; File &quot;widget\view\form_gtk\one2many_list.pyo&quot;, line 174, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 134, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 588, in add_view_id<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 640, in add_view<br />&nbsp; File &quot;widget\view\widget_parse.pyo&quot;, line 53, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 161, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 449, in __init__<br />ValueError: Invalid format string<br />Traceback (most recent call last):<br />&nbsp; File &quot;widget\view\form_gtk\many2one.pyo&quot;, line 279, in sig_edit<br />&nbsp; File &quot;widget\view\form_gtk\many2one.pyo&quot;, line 77, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 134, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 594, in add_view_id<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 640, in add_view<br />&nbsp; File &quot;widget\view\widget_parse.pyo&quot;, line 53, in parse<br />&nbsp; File &quot;widget\view\form_gtk\parser.pyo&quot;, line 488, in parse<br />&nbsp; File &quot;widget\view\form_gtk\one2many_list.pyo&quot;, line 174, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 134, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 588, in add_view_id<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 640, in add_view<br />&nbsp; File &quot;widget\view\widget_parse.pyo&quot;, line 53, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 161, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 449, in __init__<br />ValueError: Invalid format string<br />Traceback (most recent call last):<br />&nbsp; File &quot;widget\view\form_gtk\many2one.pyo&quot;, line 279, in sig_edit<br />&nbsp; File &quot;widget\view\form_gtk\many2one.pyo&quot;, line 77, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 134, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 594, in add_view_id<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 640, in add_view<br />&nbsp; File &quot;widget\view\widget_parse.pyo&quot;, line 53, in parse<br />&nbsp; File &quot;widget\view\form_gtk\parser.pyo&quot;, line 488, in parse<br />&nbsp; File &quot;widget\view\form_gtk\one2many_list.pyo&quot;, line 174, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 134, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 588, in add_view_id<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 640, in add_view<br />&nbsp; File &quot;widget\view\widget_parse.pyo&quot;, line 53, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 161, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 449, in __init__<br />ValueError: Invalid format string<br />Traceback (most recent call last):<br />&nbsp; File &quot;widget\view\form_gtk\many2one.pyo&quot;, line 279, in sig_edit<br />&nbsp; File &quot;widget\view\form_gtk\many2one.pyo&quot;, line 77, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 134, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 594, in add_view_id<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 640, in add_view<br />&nbsp; File &quot;widget\view\widget_parse.pyo&quot;, line 53, in parse<br />&nbsp; File &quot;widget\view\form_gtk\parser.pyo&quot;, line 488, in parse<br />&nbsp; File &quot;widget\view\form_gtk\one2many_list.pyo&quot;, line 174, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 134, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 588, in add_view_id<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 640, in add_view<br />&nbsp; File &quot;widget\view\widget_parse.pyo&quot;, line 53, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 161, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 449, in __init__<br />ValueError: Invalid format string<br />C:\Program Files\OpenERP 6.1\Client\library.zip\widget\view\form_gtk\image.py:194: GtkWarning: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.<br />Traceback (most recent call last):<br />&nbsp; File &quot;widget\view\form_gtk\many2one.pyo&quot;, line 279, in sig_edit<br />&nbsp; File &quot;widget\view\form_gtk\many2one.pyo&quot;, line 77, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 134, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 594, in add_view_id<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 640, in add_view<br />&nbsp; File &quot;widget\view\widget_parse.pyo&quot;, line 53, in parse<br />&nbsp; File &quot;widget\view\form_gtk\parser.pyo&quot;, line 488, in parse<br />&nbsp; File &quot;widget\view\form_gtk\one2many_list.pyo&quot;, line 174, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 134, in __init__<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 588, in add_view_id<br />&nbsp; File &quot;widget\screen\screen.pyo&quot;, line 640, in add_view<br />&nbsp; File &quot;widget\view\widget_parse.pyo&quot;, line 53, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 161, in parse<br />&nbsp; File &quot;widget\view\tree_gtk\parser.pyo&quot;, line 449, in __init__<br />ValueError: Invalid format string<br />C:\Program Files\OpenERP 6.1\Client\library.zip\widget\view\form_gtk\many2one.py:275: Warning: gsignal.c:2392: instance `02879400&#039; has no handler with id `6930&#039;<br /><br />ValueError: Invalid format string<br />
    




    字数限制,我把完整日志文件贴在附件中, 哪位大大能帮忙解决这个问题? 公司服务器必须是linux的, 而公司客户端大都是xp的系统的。 万分感谢!



  • 个人推荐你用 6.0.4



  • 回楼上, 6.04也有同样的问题。。。。



  • File "C:\Program Files\OpenERP 6.1\Client\widget\view\form_gtk\calendar.py", line 46, in init
        self.fmt_length = len((DT.now()).strftime(self.format))
    ValueError: Invalid format string

    错误信息不需要贴那么长,最后几行就行
    这个问题是GTK的日期控件有个Bug,只有在服务器是linux而gtk在Windows中文版时会遇到。


  • 管理员

    这个是因为OpenERP的服务器端的编码和客户端不同的时候就会出错。例如你在linux下是utf-8,windows下默认是cp936。这里有个快速的解决办法 🙂
    就是到语言哪里把中文的

    &quot;%Y年%m月%d日&quot;
    

    改为

    &quot;%Y/%m/%d&quot;
    

    或者

    &quot;%Y-%m-%d&quot;
    

    总之就是不要出现中文字符。



  • 感谢J大帮忙, 我是新手,还想弱弱多问两句:
    1. 日期格式在哪里改的?
    2. linux下安装服务器或者win下安装客户端有无可能预先更改编码的?

    谢谢!



  • 我找到了更改日期的方法。 切换到扩展模式(用admin登陆系统点击右上角的齿轮图标进入个人设置内容,选择扩展界面即可),然后操作:系统管理–>翻译–>语言,然后编辑“Chinese (CN) / 简体中文”,把日期格式“%Y年%m月%d日”改为“%Y-%m-%d”,时间格式“%H时%M分%S秒”改为“%H:%M:%S”,最后保存并退出OpenERP,然后再登陆就OK了

    问题解决了。 谢谢大大。

    不过我还是想知道,如果安装时能否自选编码呢?

    谢谢!


Log in to reply