Odoo10 macOS开发环境配置
执行
xcode-select --install
,如果已安装请忽略下载odoo10,执行
git clone https://www.github.com/odoo/odoo --depth 1 --branch 10.0 --single-branch odoo10
- 速度慢使用镜像:
git clone https://gitee.com/mirrors/odoo.git --depth 1 --branch 10.0 --single-branch odoo10
- 速度慢使用镜像:
安装Python2
安装pip
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
python get-pip.py
- 需要在
.bash_profile
或.zprofile
添加export PATH=~/Library/Python/2.7/bin:${PATH}
- pip镜像使用,执行
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
cd odoo10
注释requirements.txt的
Pillow==3.4.1
python-ldap==2.4.27
reportlab==3.3.0
pip install -r requirements.txt
- pip install python-ldap==2.4.27 –global-option=build_ext –global-option=”-I$(xcrun –show-sdk-path)/usr/include/sasl”
- pip install reportlab
- pip install Pillow==4.0.0
-
- 点击
initialize
初始化
- 点击
安装node https://nodejs.org/en/
- 执行
sudo npm install -g less@3.0.4 less-plugin-clean-css
- 执行
启动Odoo
python odoo-bin --addons-path=addons --db-filter=postgres
- 配置说明
- 打开 http://localhost:8069/
- 创建数据库
- 执行
python odoo-bin --addons-path=addons --db-filter=数据库名字
vscode启动odoo10配置调试
插件:- Pylance
- Python
v2022.2.1924087327
注意版本
.vscode/launch.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18{
"version": "0.2.0",
"configurations": [
{
"name": "Python:Odoo",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"python": "${command:python.interpreterPath}",
"console": "integratedTerminal",
"program": "${workspaceRoot}/odoo-bin",
"args": ["--config=${workspaceRoot}/odoo.conf", "--dev=xml"],
"cwd": "${workspaceRoot}",
"env": {},
"envFile": "${workspaceRoot}/.env"
}
]
}.vscode/settings.json
1
2
3
4
5
6
7
8
9
10{
"git.ignoreLimitWarning": true,
"python.pythonPath": "/Library/Frameworks/Python.framework/Versions/2.7/bin/python",
"python.analysis.extraPaths": [],
"python.linting.pylintEnabled": false,
"python.linting.pycodestyleEnabled": true,
"python.linting.enabled": true,
"python.linting.flake8Enabled": false,
"python.linting.pycodestyleArgs": ["--ignore=E501"]
}
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 yinxianwei!
评论