Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged

Hi, 

I'm running Odoo 16 CE and recently took on learning Odoo's JS framework by following the official Odoo 16 JS tutorial. In the first exercise, I tried to use the Layout component in my custom dashboard.

Here's the JS code for my dashboard component:
/** @odoo-module **/


import { registry } from "@web/core/registry";

import { Layout } from "@web/search/layout";

import { getDefaultConfig } from "@web/views/view";


const { Component, useSubEnv} = owl;


class AwesomeDashboard extends Component {

    setup() {

        

        useSubEnv({

            config: {

                ...getDefaultConfig(),

                ...this.env.config,

            },

        });

        this.display = {

            controlPanel: { "top-right": false, "bottom-right": false },

        }

    }

}


AwesomeDashboard.components = { Layout };

AwesomeDashboard.template = "awesome_tshirt.clientaction";


registry.category("actions").add("awesome_tshirt.dashboard", AwesomeDashboard);


I get the error "undefine resModel not found" on my browser. Please how can I fix this?

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
jul. 24
4849
0
jan. 24
1482
1
okt. 23
2130
0
sep. 23
1547
1
jan. 25
3580