Odoo10 macOS开发环境配置

2023/05/12 posted in  Python 后端
  1. 执行 xcode-select --install ,如果已安装请忽略
  2. 下载odoo10,执行 git clone https://www.github.com/odoo/odoo --depth 1 --branch 10.0 --single-branch odoo10
    1. 速度慢使用镜像: git clone https://gitee.com/mirrors/odoo.git --depth 1 --branch 10.0 --single-branch odoo10
  3. 安装pip
    1. curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
    2. python get-pip.py
    3. 需要在.bash_profile.zprofile添加export PATH=~/Library/Python/2.7/bin:${PATH}
    4. pip镜像使用,执行pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
      1. 镜像说明: https://mirrors.tuna.tsinghua.edu.cn/help/pypi/
  4. cd odoo10
  5. 注释requirements.txt的 Pillow==3.4.1 python-ldap==2.4.27 reportlab==3.3.0
  6. pip install -r requirements.txt
    1. pip install python-ldap==2.4.27 --global-option=build_ext --global-option="-I$(xcrun --show-sdk-path)/usr/include/sasl"
    2. pip install reportlab
    3. pip install Pillow==4.0.0
  7. 安装postgresapp点击直接下载
    1. 点击initialize初始化
  8. 安装node https://nodejs.org/en/
    1. 执行sudo npm install -g less@3.0.4 less-plugin-clean-css
  9. 启动Odoo
    1. python odoo-bin --addons-path=addons --db-filter=postgres
    2. 配置说明
    3. 打开 http://localhost:8069/
    4. 创建数据库
    5. 执行python odoo-bin --addons-path=addons --db-filter=数据库名字