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

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

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

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

在导出PO翻译文件的时候出了错误,求解!



  • 0_1522060025100_8835372f-aad9-4f98-a352-9e223497735b-image.png
    当我想要导出CRM功能模块的PO文件时报出了下面的错误,谁能告诉我如何解决?刚接触odoo
    0_1522059928429_4dab94e0-b590-4742-aef5-57bc12a02dc3-image.png



  • 应该是Odoo的Bug。
    或许,你可以切换到英文再试一下。


  • 管理员

    @jalins 错误信息要贴完整,最重要的信息往往在最后几行



  • Traceback (most recent call last):
    File "/opt/odoo/odoo/http.py", line 648, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
    File "/opt/odoo/odoo/http.py", line 309, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
    File "/opt/odoo/odoo/http.py", line 685, in dispatch
    result = self._call_function(**self.params)
    File "/opt/odoo/odoo/http.py", line 341, in _call_function
    return checked_call(self.db, *args, **kwargs)
    File "/opt/odoo/odoo/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
    File "/opt/odoo/odoo/http.py", line 334, in checked_call
    result = self.endpoint(*a, **kw)
    File "/opt/odoo/odoo/http.py", line 929, in call
    return self.method(*args, **kw)
    File "/opt/odoo/odoo/http.py", line 514, in response_wrap
    response = f(*args, **kw)
    File "/opt/odoo/odoo/addons/web/controllers/main.py", line 920, in call_button
    action = self._call_kw(model, method, args, {})
    File "/opt/odoo/odoo/addons/web/controllers/main.py", line 908, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
    File "/opt/odoo/odoo/api.py", line 689, in call_kw
    return call_kw_multi(method, model, args, kwargs)
    File "/opt/odoo/odoo/api.py", line 680, in call_kw_multi
    result = method(recs, *args, **kwargs)
    File "/opt/odoo/odoo/addons/base/module/wizard/base_export_language.py", line 38, in act_getfile
    tools.trans_export(lang, mods, buf, this.format, self._cr)
    File "/opt/odoo/odoo/tools/translate.py", line 711, in trans_export
    translations = trans_generate(lang, modules, cr)
    File "/opt/odoo/odoo/tools/translate.py", line 916, in trans_generate
    push_local_constraints(module, Model, 'sql_constraints')
    File "/opt/odoo/odoo/tools/translate.py", line 904, in push_local_constraints
    push_constraint_msg(module, term_type, model._name, constraint[msg_pos])
    File "/opt/odoo/odoo/tools/translate.py", line 893, in push_constraint_msg
    push_translation(encode(module), term_type, encode(model), 0, msg)
    File "/opt/odoo/odoo/tools/translate.py", line 133, in encode
    assert isinstance(s, pycompat.text_type)
    AssertionError

    这是错误信息的全部,求帮助



  • 这个真是很有意思,我们用中文写,u '款号',u '颜色',u '尺码'类似的比较快,但要导出来翻译时,就出不来,PO文件中根本没有“款号、颜色、尺码”3个源术语项目。我还不想用 style ,colore,size,于是修改代码为u 'u款号',居然也出不来,所以要用u 'xyz款号'这样的源术语就出来了,odoo的翻译我觉得是方便的,但在这里感觉确实算个bug。



  • 急,老板在催要PO文件,我真的不知道这个问题出在哪里?网上也很难找到解决的办法,有谁知道的请教一下,感激不尽



  • @保定-粉刷匠 当我导出“采购管理”这个应用的时候一切都是正常的,所以应该不是bug,不然应该是全都不可以导出来,现在真的很纳闷,有一些可以导出来有一些不可以