Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
24625 Lượt xem

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)

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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


Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Thanks Lijo

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 8 24
2720
1
thg 12 23
2766
1
thg 6 24
3345
2
thg 4 24
5320
0
thg 12 23
1805