Skip to Content
Menu
This question has been flagged
2 Replies
20996 Views

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)

Avatar
Discard
Best Answer

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"));
});


Avatar
Discard
Author Best Answer

Thanks Lijo

Avatar
Discard
Related Posts Replies Views Activity
1
Aug 24
1979
1
Dec 23
1826
1
Jun 24
2382
2
Apr 24
3691
0
Dec 23
1212