Odoo18开发方面的关键变化

模块版本号:

例如  17.0.1.0.0 ->  18.0.1.0.0

前端方面:

const { Component, useState, useEffect, onWillUnmount } = owl;
需要改为显式使用 import ... from ...
import { Component, useState, useEffect, onWillUnmount } from "@odoo/owl";

前端已去掉router:
this.router = useService("router");

jQuery已默认不再加载,将js中使用$的地方做相应转化
例如 this._search_def = $.Deferred();改为如下:
        this._search_def = new Promise((resolve) => {
            this._resolveSearch = resolve;
        });

 


关注我们


Jone 2025年1月26日
标签
异步任务队列模块 task_queue 使用介绍