如何在macOS中设置odoo 10进行开发

时间:2017-01-13 16:21:07

标签: openerp

我已按照教程安装了所有预先请求。

当我尝试使用以下命令运行odoo时,

./odoo.py --addons-path=addons,../mymodules --db-filter=mydb$

我收到以下错误消息。

-bash: ./odoo.py: No such file or directory

enter image description here

Jinn-MacBook-Air:odoo juasoft$ ./odoo-bin 
Traceback (most recent call last):
  File "./odoo-bin", line 9, in <module>
    odoo.cli.main()
  File "/Users/juasoft/git/odoo/odoo/cli/command.py", line 64, in main
    o.run(args)
  File "/Users/juasoft/git/odoo/odoo/cli/server.py", line 164, in run
    main(args)
  File "/Users/juasoft/git/odoo/odoo/cli/server.py", line 122, in main
    odoo.tools.config.parse_config(args)
  File "/Users/juasoft/git/odoo/odoo/tools/config.py", line 315, in parse_config
    odoo.netsvc.init_logger()
  File "/Users/juasoft/git/odoo/odoo/netsvc.py", line 120, in init_logger
    resetlocale()
  File "/Users/juasoft/git/odoo/odoo/tools/translate.py", line 1185, in resetlocale
    for ln in get_locales():
  File "/Users/juasoft/git/odoo/odoo/tools/translate.py", line 1154, in get_locales
    lang = locale.getdefaultlocale()[0]
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 545, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 477, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
Jinn-MacBook-Air:odoo juasoft$ 

1 个答案:

答案 0 :(得分:2)

更改为您的主目录

cd ~

编辑.bash_profile(使用vim或任何文本编辑器)

vim .bash_profile

添加以下行

export LC_ALL=es_US.UTF-8
export LANG=en_US.UTF-8

然后最后source文件使更改立即生效(如果没有这个,您必须注销并再次登录,因为.bash_profile仅在登录时执行)

source .bash_profile