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

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

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

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

Ubuntu下用PyCharm 运行调试 Odoo 8.0



  • 又花了一天时间在Ubuntu下用PyCharm运行 Odoo 8.0. 好看的格式在我的博客网站[url=http://www.mindissoftware.com/2014/09/11/Run-Odoo-in-PyCharm-Ubuntu/]http://www.mindissoftware.com/2014/09/11/Run-Odoo-in-PyCharm-Ubuntu/[/url]<br /><br />我试了各种功能都正常。 希望能帮助大家少走点弯路。 <br /><br />[b]Run and Debug Odoo using PyCharm in Ubuntu[/b]<br />11 Sep 2014<br />As a beginner, being able to debug through the Odoo source code is a great learning experience. PyCharm Professional Edition is a wonderful tool to develop/debug Python applications. The following are steps to run/debug Odoo using PyCharm in Ubuntu. Though not officially stated, running Odoo in Windows is not a good idea. I started with a freshly installed Ubuntu 14.04.1 LTS desktop.<br /><br />[b]1. Update server and install tools[/b]<br />Check that the Ubuntu /etc/default/locale is set to LANG="en_US.UTF-8". Then run the following to update the Ubuntu and install tools.<br /><br />sudo apt-get update<br />sudo apt-get upgrade -y<br />sudo apt-get install -y vim git python-pip<br /><br />[b]2. Install PostgreSQL and required packages[/b]<br />sudo apt-get install -y postgresql python-dateutil python-feedparser python-ldap python-libxslt1 python-lxml python-mako python-openid python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python-docutils python-psutil python-mock python-unittest2 python-jinja2 python-pypdf python-decorator python-passlib<br /><br />sudo pip install gdata<br /><br />[b] 3. Start PostgreSQL and create a new role for Odoo[/b]<br /><br />In my case, I create a superuser "odoo" and set its password as "odoo". <br /><br />```python<br /># Add PostgreSQL role<br />sudo -u postgres /etc/init.d/postgresql start <br />sudo -u postgres psql -e --command "CREATE USER odoo WITH SUPERUSER PASSWORD 'odoo'"<br /><br />[b]4. Get Odoo 8.0 source code[/b]<br /># in the directory that you want put odoo source code <br />git clone -b 8.0 https://github.com/odoo/odoo.git<br /><br />[b]5. Create Odoo configuration file[/b]<br />In Odoo project root, copy debian/openerp-server.conf to another folder. In my case, it is copied as /home/ying/dev/projects/odoo-config/openerp-server.conf , edit the file to have the following configurations:<br /><br />[options]<br />; This is the password that allows database operations:<br />; admin_passwd = admin<br />db_host = localhost<br />db_port = 5432<br />db_user = odoo<br />db_password = odoo<br />addons_path = /home/ying/dev/projects/odoo/addons,/home/ying/dev/projects/odoo-connector<br />In the addons_path option, set it to the addons directory in the Odoo project root. The second part is a path of a custom addon.<br /><br />[b]6. Install Java SDK[/b]<br />PyCharm needs Java SDK. Download Java SDK .rpm file from Oracle's website.<br /><br />We need alien to covert RPM package to Ubuntu package. Type:<br />sudo apt-get install -y alien<br /><br />To install Java SDK, type: sudo alien -i -c <path to the Java SDK RPM file><br /><br />The installation takes a while. Once it is done, test the installation with: java -version<br /><br />[b]7. Install PyCharm Professional[/b]<br />Downalod PyCharm PRofessional from JetBrains web site to the desired installation location.<br /><br />Unpack the pycharm-.tar.gz using the following command: tar xfz pycharm-.tar.gz<br /><br />Remove the pycharm-*.tar.gz to save disk space (optional).<br /><br />Run pycharm.sh from the bin subdirectory<br /><br />[b]8. Config PyCharm to run Odoo[/b]<br />Then in PyCharm menu Run --> Edit Configurations, click "+" on the top left to create a new configuration with the following settings:<br /><br />Name:  odoo8<br />Single instance checkbox: checked<br />Script: Python 2.7.6 (usr/bin/python2.7)    <br />Script parameters:    --config=--config=/home/ying/dev/projects/odoo-config/openerp-server.conf<br /><br />Congratulations, you should be able to run and debug Odoo !!!<br /><br />[b]9. Issues and solutions[/b]<br />You may need to drop the newly created database if something is wrong when you run Odoo to create the initial database. There might be some garbage left in the database and you see an error message like "QWebTemplateNotFound: External ID not found in the system: web.login".<br /><br />I had this error when Odoo couldn't find Python passlib package. I installed the package, deleted the newly created database, and restarted Odoo.<br />



  • 又花了一天时间在Ubuntu下用PyCharm运行 Odoo 8.0. 好看的格式在我的博客网站[url=http://www.mindissoftware.com/2014/09/11/Run-Odoo-in-PyCharm-Ubuntu/]http://www.mindissoftware.com/2014/09/11/Run-Odoo-in-PyCharm-Ubuntu/[/url]<br /><br />我试了各种功能都正常。 希望能帮助大家少走点弯路。 <br /><br />[b]Run and Debug Odoo using PyCharm in Ubuntu[/b]<br />11 Sep 2014<br />As a beginner, being able to debug through the Odoo source code is a great learning experience. PyCharm Professional Edition is a wonderful tool to develop/debug Python applications. The following are steps to run/debug Odoo using PyCharm in Ubuntu. Though not officially stated, running Odoo in Windows is not a good idea. I started with a freshly installed Ubuntu 14.04.1 LTS desktop.<br /><br />[b]1. Update server and install tools[/b]<br />Check that the Ubuntu /etc/default/locale is set to LANG="en_US.UTF-8". Then run the following to update the Ubuntu and install tools.<br /><br />sudo apt-get update<br />sudo apt-get upgrade -y<br />sudo apt-get install -y vim git python-pip<br /><br />[b]2. Install PostgreSQL and required packages[/b]<br />sudo apt-get install -y postgresql python-dateutil python-feedparser python-ldap python-libxslt1 python-lxml python-mako python-openid python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python-docutils python-psutil python-mock python-unittest2 python-jinja2 python-pypdf python-decorator python-passlib<br /><br />sudo pip install gdata<br /><br />[b] 3. Start PostgreSQL and create a new role for Odoo[/b]<br /><br />In my case, I create a superuser "odoo" and set its password as "odoo". <br /><br />```python<br /># Add PostgreSQL role<br />sudo -u postgres /etc/init.d/postgresql start <br />sudo -u postgres psql -e --command "CREATE USER odoo WITH SUPERUSER PASSWORD 'odoo'"<br /><br />[b]4. Get Odoo 8.0 source code[/b]<br /># in the directory that you want put odoo source code <br />git clone -b 8.0 https://github.com/odoo/odoo.git<br /><br />[b]5. Create Odoo configuration file[/b]<br />In Odoo project root, copy debian/openerp-server.conf to another folder. In my case, it is copied as /home/ying/dev/projects/odoo-config/openerp-server.conf , edit the file to have the following configurations:<br /><br />[options]<br />; This is the password that allows database operations:<br />; admin_passwd = admin<br />db_host = localhost<br />db_port = 5432<br />db_user = odoo<br />db_password = odoo<br />addons_path = /home/ying/dev/projects/odoo/addons,/home/ying/dev/projects/odoo-connector<br />In the addons_path option, set it to the addons directory in the Odoo project root. The second part is a path of a custom addon.<br /><br />[b]6. Install Java SDK[/b]<br />PyCharm needs Java SDK. Download Java SDK .rpm file from Oracle's website.<br /><br />We need alien to covert RPM package to Ubuntu package. Type:<br />sudo apt-get install -y alien<br /><br />To install Java SDK, type: sudo alien -i -c <path to the Java SDK RPM file><br /><br />The installation takes a while. Once it is done, test the installation with: java -version<br /><br />[b]7. Install PyCharm Professional[/b]<br />Downalod PyCharm PRofessional from JetBrains web site to the desired installation location.<br /><br />Unpack the pycharm-.tar.gz using the following command: tar xfz pycharm-.tar.gz<br /><br />Remove the pycharm-*.tar.gz to save disk space (optional).<br /><br />Run pycharm.sh from the bin subdirectory<br /><br />[b]8. Config PyCharm to run Odoo[/b]<br />Then in PyCharm menu Run --> Edit Configurations, click "+" on the top left to create a new configuration with the following settings:<br /><br />Name:  odoo8<br />Single instance checkbox: checked<br />Script: Python 2.7.6 (usr/bin/python2.7)    <br />Script parameters:    --config=--config=/home/ying/dev/projects/odoo-config/openerp-server.conf<br /><br />Congratulations, you should be able to run and debug Odoo !!!<br /><br />[b]9. Issues and solutions[/b]<br />You may need to drop the newly created database if something is wrong when you run Odoo to create the initial database. There might be some garbage left in the database and you see an error message like "QWebTemplateNotFound: External ID not found in the system: web.login".<br /><br />I had this error when Odoo couldn't find Python passlib package. I installed the package, deleted the newly created database, and restarted Odoo.<br />



  • 好文,支持


登录后回复
 

与 Odoo 中文社区 的连接断开,我们正在尝试重连,请耐心等待