第一次,
-
第一次在windowsxp下安装python和bzr,然后下载openerp,操作步骤如下:
bzr branch lp:openerp
cd openerp
python bzr_set.py遇到错误如下,请指点一下,
Branch lp:~openerp-commiter/openobject-addons/trunk-extra-addons to .addons-ext
ra
No handlers could be found for logger "bzr"
Branch lp:~openerp/openobject-client-web/trunk to .web
Branch lp:~openerp/openobject-addons/trunk to .addons
Branch lp:~openerp/openobject-client/trunk to .client
Branch lp:~openerp/openobject-server/trunk to .server
(Re)Computing Symbolic links...
Traceback (most recent call last):
File "bzr_set.py", line 70, in <module>
os.symlink(os.path.realpath(src), dest)
AttributeError: 'module' object has no attribute 'symlink' -
看了一下bzr_set.py文件。在文件的末尾Computing Symbolic links部分的代码(用以在addons Branch与server branch中的addons目录之间建立符号连结)使用了os.symlink, 而windows下的python是不支持的。
所以,你可以把以下代码注释掉:
[code]#print '(Re)Computing Symbolic links...'
#for src2,dest2 in bzr_links.items():src2 = os.path.join(dest_dir, src2)
dest2 = os.path.join(dest_dir, dest2)
for src in glob.glob(src2):
dest = os.path.join(dest2, os.path.basename(src))
if not os.path.isdir(dest):
os.symlink(os.path.realpath(src), dest)
for local in bzr_repository:
if dest.startswith(local):
file(os.path.join(local,'.bzrignore'), 'ab+').write(dest[len(local):]+'n')[/code]
再运行python bzr_set.py就不会有问题了。
要让OpenERP的server使用下载的addons Branch中的模块,在启动Open ERP时,输入下列命令:
[quote] python tinyerp-server.py --addons-path=ADDONS_PATH[/quote]