Skip to Content
Menú
This question has been flagged
2 Respostes
24266 Vistes

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
Descartar
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
Descartar
Autor Best Answer

Thanks Lijo

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
d’ag. 24
2606
1
de des. 23
2631
1
de juny 24
3234
2
d’abr. 24
5133
0
de des. 23
1706