跳至内容
菜单
此问题已终结
2 回复
24315 查看

when i click on button and my code return action in Odoo 16.0 Community version

this error coming i try to resolve but not idea.

Please anyone help.

OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)
    at handleError (http://localhost:8069/web/assets/debug/web.assets_common.js:17973:35) (/web/static/lib/owl/owl.js:1579)
    at owl.App.handleError (http://localhost:8069/web/assets/debug/web.assets_common.js:22181:20) (/web/static/lib/owl/owl.js:5787)
    at RootFiber.complete (http://localhost:8069/web/assets/debug/web.assets_common.js:18182:26) (/web/static/lib/owl/owl.js:1788)
    at Scheduler.processFiber (http://localhost:8069/web/assets/debug/web.assets_common.js:22026:27) (/web/static/lib/owl/owl.js:5632)
    at Scheduler.processTasks (http://localhost:8069/web/assets/debug/web.assets_common.js:22002:22) (/web/static/lib/owl/owl.js:5608)
    at http://localhost:8069/web/assets/debug/web.assets_common.js:21992:68 (/web/static/lib/owl/owl.js:5598)

Caused by: TypeError: this.child.mount is not a function
    at VToggler.mount (http://localhost:8069/web/assets/debug/web.assets_common.js:16436:24) (/web/static/lib/owl/owl.js:42)
    at B.mount (http://localhost:8069/web/assets/debug/web.assets_common.js:17478:35) (/web/static/lib/owl/owl.js:1084)
    at B.mount (http://localhost:8069/web/assets/debug/web.assets_common.js:17478:35) (/web/static/lib/owl/owl.js:1084)
    at ComponentNode.mount (http://localhost:8069/web/assets/debug/web.assets_common.js:18944:18) (/web/static/lib/owl/owl.js:2550)
    at VMulti.mount (http://localhost:8069/web/assets/debug/web.assets_common.js:16830:27) (/web/static/lib/owl/owl.js:436)
    at ComponentNode.mount (http://localhost:8069/web/assets/debug/web.assets_common.js:18944:18) (/web/static/lib/owl/owl.js:2550)
    at VList.patch (http://localhost:8069/web/assets/debug/web.assets_common.js:17699:32) (/web/static/lib/owl/owl.js:1305)
    at B.patch (http://localhost:8069/web/assets/debug/web.assets_common.js:17513:40) (/web/static/lib/owl/owl.js:1119)
    at ComponentNode._patch (http://localhost:8069/web/assets/debug/web.assets_common.js:18974:23) (/web/static/lib/owl/owl.js:2580)
    at RootFiber.complete (http://localhost:8069/web/assets/debug/web.assets_common.js:18157:22) (/web/static/lib/owl/owl.js:1763)

形象
丢弃
最佳答案

Component.mount method has been removed in OWL 2.0 (Odoo 16.0). Details here. I suspect that is the cause of this error. 

In OWL 2.0, you can use the mount helper method instead, to mount an OWL component to dom.

/** @odoo-module **/

import { whenReady, mount } from "@odoo/owl";

class MyComponent extends Component {...}

whenReady().then(() => {
    mount(MyComponent, document.getElementById("my-id"));
});


形象
丢弃
编写者 最佳答案

Thanks Lijo

形象
丢弃
相关帖文 回复 查看 活动
1
8月 24
2644
1
12月 23
2649
1
6月 24
3248
2
4月 24
5161
0
12月 23
1715