ch2.1 - A new Layout

This commit is contained in:
Matt Marcha 2024-09-20 10:07:49 -10:00
parent 98d33e57ec
commit 8217053199
3 changed files with 14 additions and 1 deletions

View file

@ -2,9 +2,17 @@
import { Component } from "@odoo/owl"; import { Component } from "@odoo/owl";
import { registry } from "@web/core/registry"; import { registry } from "@web/core/registry";
import { Layout } from "@web/search/layout";
class AwesomeDashboard extends Component { class AwesomeDashboard extends Component {
static template = "awesome_dashboard.AwesomeDashboard"; static template = "awesome_dashboard.AwesomeDashboard";
static components = { Layout };
setup() {
this.display = {
controlPanel: {},
};
}
} }
registry.category("actions").add("awesome_dashboard.dashboard", AwesomeDashboard); registry.category("actions").add("awesome_dashboard.dashboard", AwesomeDashboard);

View file

@ -0,0 +1,3 @@
.o_dashboard {
background-color:rgb(0, 116, 151);
}

View file

@ -2,7 +2,9 @@
<templates xml:space="preserve"> <templates xml:space="preserve">
<t t-name="awesome_dashboard.AwesomeDashboard"> <t t-name="awesome_dashboard.AwesomeDashboard">
hello dashboard <Layout display="display" className="'o_dashboard h-100'">
</Layout>
</t> </t>
</templates> </templates>