2023年11月8日 Odoo 17已正式发布,本次图标上做了较大更新,坦白说我个人不太适应,觉得设计不如之前的版本。安装脚本(非官方):https://github.com/Yenthe666/InstallScript。很可能不会有Odoo 16和 Odoo 17的《开发手册》和《开发指南》的出版了,一方面 Daniel Reis 没有回应新书的撰写,另一方面Packt 接下来会出版的只看到有Implementing Odoo for Supply Chain Management and Manufacturing,还没有任何预览。
相关文章
Docker 安装
官方的 Dockerfile待更新,这可能是最简单的安装方式了,直接访问https://github.com/odoo/docker/tree/master/17.0查看。如未更新可直接拿16.0的Dockerfile 魔改如下部分:
1 2 3 4 |
# Install Odoo ENV ODOO_VERSION 17.0 ARG ODOO_RELEASE=20231108 ARG ODOO_SHA=0ae778db57a1c452123602c4c0a5456b97c8f612 |
全局替换bullseye为bookworm,注释第49行&& echo ${WKHTMLTOPDF_SHA} wkhtmltox.deb | sha1sum -c - \
,这是个偷懒的做法,实际应更新44-46行中的SHA校验和部分。
打包镜像及启动服务:
1 2 3 4 |
docker build -t odoo:17 . docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:12 # 挂载自定义插件并启动服务 /path/to 部分请按自己的情况修改 docker run -v /path/to/addons:/mnt/extra-addons -p 8069:8069 --name odoo --link db:db -t odoo:17 |
更新内容
链接地址:https://www.odoo.com/odoo-17-release-notes
New UI design
The redesign encompasses significant improvements in both usability and esthetics. The primary goal was to enhance the overall UX and provide a visually appealing interface that promotes intuitive interactions.
“Search more” becomes “View all”
Users can now click ‘View all’ in dropdown menus, which opens a list in a dialog, facilitating differentiation between potentially identical records.
Advanced search
Edit existing searches and create custom filters easily using the new advanced search. Filters created by users are more efficient by default, searching on records instead of text.
Avatar card preview
Get information regarding a user or an employee by clicking on their avatar. HR and Contact information will display in a card format.
Map sidebar
The map view sidebar is now on the left, similar to other views in Odoo.
Chatter: message and note translations
Enable translations for messages and notes in the chatter.
Confirm and cancel shortcuts
Keyboard shortcuts to confirm (ALT/CMD+Q) or cancel (ALT/CMD+X) have been made more consistent across all apps.
Date formatting on import
Use custom date and datetime formats during import.
Dialog validation shortcut
Confirm dialog boxes anywhere in Odoo with the CTRL+Enter keyboard shortcut.
Disable opening of form view modal
Clicking on a read-only embedded list item no longer opens a dialog with a form view for the item.
Disable spell checks
Text inputs are ignored by browser spell checks when the text field is not selected.
Domain editor folding
The domain editor takes less space by default and can be unfolded to show its contents, saving some screen real estate.
Domain selector
The domain selector field has been improved and comes with a clearer UI to allow faster data entry.
Duration tracking / stage
The form view’s status pipeline shows how long a task, ticket, or lead has stayed in each stage.
Editor: integrate ChatGPT in powerbox
Use AI to generate and improve existing text based on a prompt with the /ChatGPT shortcut.
Email aliases feedback
Get feedback on the status of email aliases.
Email bounce feedback
Get feedback on why your email bounced.
Email template management
Create and manage your own email templates as a user.
Freeze headers
Kanban and List column titles remain visible at all times when scrolling.
Gamification: track karma
Track where karma points come from in a dedicated menu.
Group by properties
Group your records with the values of property fields.
Human-readable numeric fields
Developers can now display numeric fields using abbreviations (e.g., 500k instead of 500,000).
Kanban: quick record creation
Kanban views grouped by a many-to-many relation (e.g., tags, assignees, etc.) now allow the quick creation of records directly in the column.
List view: mass-duplicate records
Mass-duplicate records directly from any list view.
Mixed stacked bar / line chart
Analyze trends more easily on stacked bar charts by adding a line graph displaying group totals.
Mobile app shortcuts
Access useful Odoo apps with shortcuts on the mobile application.
Moveable dialog windows
Dialog windows in Odoo can be moved around, allowing users to see data that may otherwise be hidden.
Multi-domain aliases
Use multiple mail domains on a single database.
Odoo PWA
Install Odoo as a Progressive Web App to install it on any device for easy access. Get all the features of the old Odoo mobile app without the need to download anything from your device’s app store.
OWL grid view
The grid view has been converted to OWL, improving the view’s performance and enabling new features, such as displaying sample data.
Properties support in domain selector
Property fields can now be searched properly in the advanced search.
Property fields
Property fields have been added to additional models.
Property fields in list views
Display property fields in list view by adding optional columns.
Quick user assign
Quickly assign or unassign users from records in kanban views by clicking the avatar.
Range selection shortcut
Select/unselect ranges in list view using the Shift key and mouse clicks or the Up and Down Arrow keys.
Ratings on email templates
Ask customers for their opinion by adding ratings to your email templates.
Re-order apps
Each user can re-order their app icons on the dashboard by dragging-and-dropping them.
Responsible fields
Assign yourself to records instantly: your user is always suggested first when using “responsible” fields.
Search property fields
Search for records using the property fields you created.
Separator field type
Group property fields into categories by using collapsible separator fields.
SMS status
Receive feedback on the status of your SMS text messages.
Stacked bar charts
Stacked bar charts now include a line graph displaying the groups’ totals for easier trend analysis.
Text editor: font size input
Enter any value to set a text’s font size.
Unfollow from inbox
Unfollow threads from their message in your email or Odoo inbox.
Unselect all records
Unselect all list view records from the control panel.
Ubuntu 22.04 LTS安装(待验证)
1、系统安装包的升级和基本安全加固
1 2 |
sudo apt-get update sudo apt-get install openssh-server fail2ban |
2、安装 Python 3和相关依赖
1 2 |
sudo apt-get install -y python3-pip sudo apt-get install python-dev python3-dev libxml2-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev build-essential libssl-dev libffi-dev libmysqlclient-dev libjpeg-dev libpq-dev libjpeg8-dev liblcms2-dev libblas-dev libatlas-base-dev |
1 2 3 4 |
sudo apt-get install -y npm sudo ln -s /usr/bin/nodejs /usr/bin/node sudo npm install -g less less-plugin-clean-css sudo apt-get install -y node-less |
1 2 3 4 5 6 7 8 9 10 |
sudo apt-get install postgresql sudo su - postgres # 创建一个odoo17用户,也可直接创建一个与接下来的用户名相同的用户 createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo17 # 超级用户权限(可选) psql ALTER USER odoo17 WITH SUPERUSER; # 退出 \q exit |
1 |
sudo adduser --system --home=/opt/odoo --group odoo |
1 2 3 4 5 6 |
sudo apt-get install git # 切换至 odoo 用户 sudo su - odoo -s /bin/bash # 克隆最新代码至 odoo 家目录 git clone https://www.github.com/odoo/odoo --depth 1 --branch master --single-branch . exit |
1 2 3 4 5 |
sudo pip3 install -r /opt/odoo/requirements.txt # 安装 PDF报告所使用到的Wkhtmltopdf sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.6/wkhtmltox_0.12.6.1-3.bookworm_amd64.deb sudo dpkg -i wkhtmltox_0.12.6.1-3.bookworm_amd64.deb sudo apt install -f |
1 2 |
sudo cp /opt/odoo/debian/odoo.conf /etc/odoo.conf sudo vi /etc/odoo.conf |
1 2 3 4 5 6 7 8 9 |
[options] ; This is the password that allows database operations: admin_passwd = admin db_host = False db_port = False db_user = odoo17 db_password = False addons_path = /opt/odoo/addons logfile = /var/log/odoo/odoo.log |
- db_user: 数据库用户名
- db_password: 创建数据库用户时所设置的密码
- admin_passwd: 用于管理数据库增删改查等操作的超级用户。
- db_host: 数据库主机
- db_port: 数据库端口
- addons_path: Odoo 的插件目录,有多个目录时用逗号分隔
- logfile: 日志文件路径
1 2 |
sudo chown odoo: /etc/odoo.conf sudo chmod 640 /etc/odoo.conf |
1 2 |
sudo mkdir /var/log/odoo sudo chown odoo:root /var/log/odoo |
1 |
sudo vi /etc/systemd/system/odoo.service |
1 2 3 4 5 6 7 8 9 10 |
[Unit] Description=Odoo Documentation=http://www.odoo.com [Service] # Ubuntu/Debian convention: Type=simple User=odoo ExecStart=/opt/odoo/odoo-bin -c /etc/odoo.conf [Install] WantedBy=default.target |
1 2 |
sudo chmod 755 /etc/systemd/system/odoo.service sudo chown root: /etc/systemd/system/odoo.service |
1 2 3 |
sudo systemctl start odoo.service # 查看服务启动状态 sudo systemctl status odoo.service |
1 |
“http://<your_domain_or_IP_address>:8069” |
常见问题
- psycopg2.errors.UndefinedFunction: function jsonb_path_query_array(jsonb, unknown) does not exist
Odoo 17中所用到的方法需要使用至少 PostgreSQL 12