有关windows在调试ODOO8.0有些问题

   继Ubuntu建筑物8.0调试环境后,,尝试windows设置开发环境。

   最后的调试和开发,或将返回Linux环境,由于前一段时间手贱,改变分区表,该grub搞哈。哎!后来重建mbr,手动检索分区表(无备份)。总算数据没丢。

   安装的windows开发环境,为了暂时解决几个问题。总结一下,对于Windows和Linux共存的问题,在磁盘紧张的时候,尴尬手不能贱啊!-_-!!!

   调试odoo8.0的系统环境是win2012 R2评估版,已经过期;在vm虚拟机中安装。pycharm调试。

   安装过程都非常easy,网上较多教程,下面仅仅说明几个问题,是须要注意的部分:

   (一)  假设想调试比較简单,建议分别在机器上先下载allinone7.0和8.0的版本号。然后分别安装在不同的文件夹。(下载地址见注一)

   至于原因,大致是部分组件或环境在安装包中能够配置或者已经部署,是一种简单的方式,反正调试不会直接用到它们。


   (二) 类似按《Ubuntu下用PyCharm 执行调试 Odoo 8.0 可能存在的问题》的方式设置pycharm的debug配置參数。

   由于是暂时的开发环境,我没有下载源代码调试,而是用的green版本号。在pycharm中加入green版的文件夹,然后debug调试openerp-server文件。

  

  (三) 除了7.0调试时须要安装的组件,还须要安装下面组件,条件是仅仅要正常訪问外网就可以。

--下面是odoo8.0调试须要多安装的组件,相比較7.0而言.
	ImportError: No module named pyPdf
C:\Users\Administrator>easy_install pyPdf
Searching for pyPdf
Reading https://pypi.python.org/simple/pyPdf/
Reading http://pybrary.net/pyPdf/
Download error on http://pybrary.net/pyPdf/: [Errno 11002] getaddrinfo failed -- Some packages may not be found!
Reading http://stompstompstomp.com/pyPdf/
Download error on http://stompstompstomp.com/pyPdf/: [Errno 11002] getaddrinfo failed -- Some packages may not be found!
Best match: pyPdf 1.13
Downloading https://pypi.python.org/packages/source/p/pyPdf/pyPdf-1.13.tar.gz#md5=7a75ef56f227b78ae62d6e38d4b6b1da
Processing pyPdf-1.13.tar.gz
Writing c:\users\admini~1\appdata\local\temp\easy_install-bjtpkg\pyPdf-1.13\setup.cfg
Running pyPdf-1.13\setup.py -q bdist_egg --dist-dir c:\users\admini~1\appdata\local\temp\easy_install-bjtpkg\pyPdf-1.13\egg-dist-tmp-etbabh
Not SVN Repository
zip_safe flag not set; analyzing archive contents...
Adding pypdf 1.13 to easy-install.pth file

Installed d:\python27\lib\site-packages\pypdf-1.13-py2.7.egg
Processing dependencies for pyPdf
Finished processing dependencies for pyPdf

	ImportError: No module named passlib.context
C:\Users\Administrator>easy_install passlib
Searching for passlib
Reading https://pypi.python.org/simple/passlib/
Best match: passlib 1.6.2
Downloading https://pypi.python.org/packages/source/p/passlib/passlib-1.6.2.tar.gz#md5=2f872ae7c72ca338634c618f2cff5863
Processing passlib-1.6.2.tar.gz
Writing c:\users\admini~1\appdata\local\temp\easy_install-gydh8e\passlib-1.6.2\setup.cfg
Running passlib-1.6.2\setup.py -q bdist_egg --dist-dir c:\users\admini~1\appdata\local\temp\easy_install-gydh8e\passlib-1.6.2\egg-dist-tmp-bsbrr3
Not SVN Repository
Adding passlib 1.6.2 to easy-install.pth file

Installed d:\python27\lib\site-packages\passlib-1.6.2-py2.7.egg
Processing dependencies for passlib
Finished processing dependencies for passlib

   (四) 在debug前,绿色版的配置文件openerp-server.conf须要移动到source文件夹下。

否则会报类似这种错误'ERROR: No user specified for the connection to the database'。


   (五) 假设提示无法訪问数据库,调试的时候多看看log,可能是默认訪问的数据库去找postgres了。

能够在配置文件openerp-server.conf中,加入參数例如以下

db_name = False
dbfilter = GPT8a1
我没有改动py文件,也不必操心类似这个问题,它会去找你指定的db。

如图1


   (六) 至于为什么8.0在启动时。addons会从3个不同的位置载入?

当然,正确的addons取决于你在配置文件里addons_path的设置!

下面是绿色版的说明:

data\\addons\\8.0文件夹是系统自己主动生成的,你临时能够不用管它;

'D:\\GreenOdoo-8.0-win32\\source\\openerp\\addons'文件夹。这里面仅仅是base基础模块,你最好别去动它,相应内置的base_addons參数;

'D:\\GreenOdoo-8.0-win32\\source\\addons'文件夹。这里面的组件是剩下最全的。你动吧!它对于内置的main_addons參数值。



   (七) 有人会发现,为什么我安装的版本号里面。没有pg库。或者我在调试的时候无法启动pg库怎么办?

非常easy。你不是安装了allinone7.0吗?它pg的服务是独立的。简单吧?偷笑启动它(尽管它的版本号可能是9.2的。没关系!

)。

在调试的时候,相同配置文件里指定pg_path吧。

比方我的调试配置文件是这样,很多其它參数能够相同设定:

[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = openpg
db_password = openpgpwd
db_name = False
dbfilter = GPT8a1
pg_path = D:/OpenERP 7.0-20140305-001210/PostgreSQL/bin
addons_path = D:\GreenOdoo-8.0-win32\source\addons
data_dir = data
log_level = debug_sql
; logfile = openerp-server.log
; logrotate = True

  大笑没有问题把。就是这样简单,别把时间耗在搭建好开发环境上。呵呵。结果类似这样,

如图2


  注一:

 1)步科绿色版:

  https://github.com/buke/GreenOdoo

 2)官方:

 源代码下载  https://github.com/odoo/odoo

 Openerp 7.0程序(及源码)下载http://nightly.openerp.com/7.0

 odoo 8.0   程序(及源码)下载http://nightly.openerp.com/8.0/nightly/

 3)移动版:

  http://mobile.odoo.co.in

 4)非官方的二进制python包

 http://www.lfd.uci.edu/~gohlke/pythonlibs/


--EOF


版权声明:本文博客原创文章,博客,未经同意,不得转载。

posted @ 2015-07-18 14:46  phlsheji  阅读(611)  评论(0编辑  收藏  举报