升级

An upgrade involves moving a database from an older version to a newer supported version (e.g., from Odoo 15.0 to Odoo 17.0). Regular upgrades are crucial as each version offers new features, bug fixes, and security patches. Using a supported version is strongly recommended. Each major version is supported for three years.

Depending on the hosting type and Odoo version used, a database upgrade can be mandatory.

  • If a database is on a major version (e.g., 15.0, 16.0, 17.0), an upgrade is mandatory every two years.

  • If a database is on a minor version (e.g., 17.1, 17.2, 17.4), an upgrade is mandatory a few weeks after the next version is released. Minor versions are usually released every three months.

You will receive a notification in your database a few weeks before a mandatory upgrade will be automatically carried out. You are in control of the process as long as the deadline is not reached.

数据库右上方的升级信息提示

Concretely, Odoo’s Upgrade Team performs a silent test upgrade of every database that should be upgraded. If the test is successful and lasts less than 20 minutes, you can directly trigger the upgrade from the database. If the test fails, you can test an upgrade using the database manager.

When you are invited to upgrade, it is strongly recommended to request an upgraded test database first and spend time testing it.

An automatic upgrade to the next version will be triggered if no action is taken before the specified due date.

升级不包括:

  • 降级到 Odoo 以前的版本

  • :doc:`转换版本 <on_premise/community_to_enterprise>`(例如,从社区版转换到企业版)

  • :ref:`更改托管类型 <hosting/change-solution>`(例如,从本地安装到 Odoo 云端版)

  • 从另一个企业资源规划系统迁移到 Odoo

警告

If your database contains custom modules, it cannot be upgraded until a version of your custom modules is available for the target version of Odoo. For customers maintaining their own custom modules, we recommend to parallelize the process by requesting an upgraded database while also upgrading the source code of your custom modules.

升级概述

  1. Request an upgraded test database (see obtaining an upgraded test database).

  2. 如果适用,请升级自定义模块的源代码,使其与新版本的 Odoo 兼容(请参阅 Upgrade a customized database)。

  3. Thoroughly test the upgraded database (see testing the new version of the database).

  4. Report any issue encountered during the testing to Odoo by going to the Support page and selecting “An issue related to my future upgrade (I am testing an upgrade)”.

  5. 一旦所有问题都得到解决,并且确信升级后的数据库可以作为主数据库使用而不会出现任何问题,就可以计划升级生产数据库。

  6. Request the upgrade for the production database, rendering it unavailable for the time it takes to complete the process (see upgrading the production database).

  7. Report any issue encountered during the upgrade to Odoo by going to the Support page and selecting “An issue related to my upgrade (production)”.

获取升级后的测试数据库

The Upgrade page is the main platform for requesting an upgraded database. However, depending on the hosting type, you can upgrade from the command line (on-premise), the Odoo Online database manager, or your Odoo.sh project.

注解

升级平台遵循与 Odoo.com 其他服务相同的 `隐私政策<https://www.odoo.com/privacy>`_。访问 一般数据保护条例 页面<https://www.odoo.com/gdpr>`_,了解更多有关Odoo 如何处理您的数据和隐私的信息。

Odoo Online databases can be manually upgraded via the database manager.

数据库管理器会显示与用户账户相关的所有数据库。不在最新版本 Odoo 上的数据库名称旁边会显示一个圆圈图标中的箭头,表示这些数据库可以升级。

数据库管理器,在数据库名称旁边有一个升级按钮。

点击**圆圈中的箭头**图标,启动升级程序。在弹出窗口中,填写:

  • 您要升级到的 Odoo 版本,通常是最新版本

  • 应收到升级数据库链接的**电子邮件**地址

  • 升级的 目的,第一次升级请求会自动设置为 测试

“升级数据库” 弹窗。

数据库名称旁边会显示 正在升级 标记,直至完成。一旦升级成功,就会向提供的地址发送一封电子邮件,其中包含升级后测试数据库的链接。也可以通过点击数据库名称前的下拉箭头,从数据库管理器访问数据库。

点击菜单箭头,显示升级后的测试数据库。

注解

如果您希望多次测试升级,可以申请多个测试数据库。

注解

升级请求完成后,升级成功邮件会附上一份升级报告,属于 “管理/设置” 组的用户可在内部讨论应用程序中查看该报告。该报告提供了有关新版本所引入更改的重要信息。

测试新版数据库

It is essential to test the upgraded test database to ensure that you are not stuck in your day-to-day activities by a change in views, behavior, or an error message once the upgrade goes live.

注解

测试数据库被中性化,一些功能被禁用,以防止它们影响生产数据库:

  1. 计划的操作已禁用。

  2. 通过将现有邮件服务器存档并添加一个假服务器来禁用外发邮件服务器。

  3. 支付提供商和快递公司将重置到测试环境中。

  4. 银行同步已禁用。如果您想测试同步,请联系银行同步提供商获取沙盒凭证。

强烈建议尽可能多地测试业务流程,以确保其正常运行,并进一步熟悉新版本。

基本测试清单

  • 是否存在在测试数据库中停用但在生产数据库中激活的视图?

  • 您的常规视图是否仍能正确显示?

  • 您的报告(发票、销售订单等)是否正确生成?

  • 您的网站页面是否正常运行?

  • 您是否能够创建和修改记录?(销售订单、发票、采购、用户、联系人、公司等)。

  • 您的邮件模板有问题吗?

  • 已保存的翻译有问题吗?

  • 您的搜索筛选器是否仍然存在?

  • 能否导出数据?

  • 在产品目录中随机抽取一个产品,比较其测试数据和生产数据,以验证所有内容(产品类别、售价、成本价、供应商、账户、路线等)是否相同。

  • 购买本产品(采购应用程序)。

  • 确认接收该产品(库存应用程序)。

  • 检查生产数据库(库存应用程序)中接收该产品的路径是否相同。

  • 向随机客户销售该产品(销售应用程序)。

  • 打开客户数据库(通讯录应用程序),选择客户(或公司)并检查其数据。

  • 运送该产品(库存应用程序)。

  • 检查运送该产品的路线是否与生产数据库(库存应用程序)中的路线相同。

  • 验证客户发票(开票或会计应用程序)。

  • 将发票记入贷方(开具贷项凭单)并检查其是否与生产数据库中的一致。

  • 查看报告结果(会计应用程序)。

  • 随机检查您的税款、货币、银行账户和财政年度(会计应用程序)。

  • 在线订购(网站应用程序),从在商店中选择产品到结账,检查所有操作是否与生产数据库中的一致。

本列表**并非**详尽无遗。请根据您对 Odoo 的使用情况,将示例扩展到其他应用程序。

If you face an issue while testing your upgraded test database, you can request the assistance of Odoo by going to the Support page and selecting “An issue related to my future upgrade (I am testing an upgrade)”. In any case, it is essential to report any problem encountered during the testing to fix it before upgrading your production database.

在测试过程中,您可能会遇到标准视图、功能、字段和模型之间的重大差异。这些更改无法逐一还原。但是,如果新版本引入的更改破坏了定制,则您的定制模块维护者有责任使其与新版本的 Odoo 兼容。

小技巧

不要忘记测试:

  • 与外部软件(电子数据交换、应用程序接口等)整合

  • 不同应用程序之间的工作流程(电子商务在线销售、将潜在客户转化为销售订单、交付产品等)

  • 数据导出

  • 自动动作

  • 在表单视图的操作菜单中执行服务器操作,以及在列表视图中选择多个记录执行服务器操作

升级生产数据库

Once the tests are completed and you are confident that the upgraded database can be used as your main database without any issues, it is time to plan the go-live day.

在升级期间,您的生产数据库将不可用。因此,我们建议在数据库使用量最小的时候计划升级。

由于标准升级脚本和您的数据库都在不断变化,因此建议经常申请另一个升级测试数据库,以确保升级过程仍然成功,尤其是在升级需要很长时间才能完成的情况下。还建议在升级生产数据库的前一天充分演练升级过程。

重要

在没有进行首次测试的情况下投入生产可能会导致:

  • 用户无法适应变化和新功能

  • 业务中断(例如,不再可能验证操作)

  • 糟糕的客户体验(例如,电子商务网站无法正常运行)

The process of upgrading a production database is similar to upgrading a test database, but with a few exceptions.

The process is similar to obtaining an upgraded test database, except for the purpose option, which must be set to Production instead of Test.

警告

一旦请求升级,数据库将不可用,直到升级完成。一旦升级完成,就无法恢复到以前的版本。

In case of an issue with your production database, you can request the assistance of Odoo by going to the Support page and selecting “An issue related to my future upgrade (I am testing an upgrade)”.

服务水平协议(SLA)

使用 Odoo 企业版,将数据库升级到最新版本 Odoo 完全 免费,包括为纠正升级后数据库中潜在差异所需的任何支持。

有关企业许可证中包含的升级服务的信息,请参阅 Odoo 企业订阅协议。本节将说明您可以期待哪些升级服务。

服务水平协议涵盖的升级服务

在 Odoo 云平台(Odoo 云端版和 Odoo.sh)上托管的数据库或自行托管的数据库(On-Premise)可随时享受升级服务:

  • 升级所有**标准应用程序**;

  • 升级所有使用定制应用程序**创建的**定制功能,前提是仍安装定制应用程序,且相关订阅仍处于激活状态;以及

  • 升级定制维护订购**所涵盖的所有**开发和定制。

升级服务仅限于对数据库(标准模块和数据)进行技术转换和调整,使其与升级目标版本兼容。

《服务水平协议》未涵盖的升级服务

**不包括**以下与升级有关的服务:

  • 在升级时**清除**已有的数据和配置;

  • 升级内部或第三方**(包括 Odoo 合作伙伴)创建的**定制模块;

  • 添加到标准模块的行代码,即在定制应用程序之外创建的定制功能、手动输入的代码,以及 :ref:` 使用 Python 代码 <studio/automated-actions/action>` 的自动操作;以及

  • 关于使用升级版功能和工作流程的**培训**。