坑1
有几个关键的库需要安装,参见requirements.txt
pip install babel lxml passlib werkzeug==0.15.5 PyPDF2 psycopg2==2.7.3.1 psutil reportlab html2text docutils num2words Wkhtmltopdf libsass
为odoo新添加自定义模块addones时,会遇到werkzeug问题,提示缺少module,比如werkzeug.contribute或者wrappers等
原因:werkzeug版本不对
解决办法:替换werkzeug版本
1:首先查看werkzeug版本 pip show wekzeug
如果是1.0.0,则需要卸载该版本werkzeug
2:卸载1.0.0版本werkzeug
pip uninstall werkzeug
3:安装0.15.5版本werkzeug
pip install werkzeug==0.15.5 -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com --default-timeout=100
结束。
坑2
刚刚添加自定义模块addones,可能在Apps中找不到,需要先在顶层菜单点击Updates Apps List。
坑3
如果是Linux环境出现如下报错:
ERROR odoo odoo.modules.loading: Database odoo not initialized, you can force it with -i base
则
sudo su odoo
cd /opt/odoo/odoo12
./odoo-bin -i base -d odoodbname
坑4
Linux环境,如果安装addons目录模块时,报该错误,则表示模块放置位置有误。
应该放到安装环境给分配的 odoo12-custom-addons 或myaddons 等自定义addon 目录。
参见: