Build Dashboard - Bagian Layout
solusi untuk tutorial https://www.odoo.com/documentation/18.0/developer/tutorials/discover_js_framework/02_build_a_dashboard.html bagian pertama (layout)
file static/src/dashboard/dashboard.js
/** @odoo-module **/
import { Component } from "@odoo/owl";
import { registry } from "@web/core/registry";
import { Layout } from "@web/search/layout";
class AwesomeDashboard extends Component {
static template = "awesome_dashboard.AwesomeDashboard";
static components = { Layout };
}
registry.category("actions").add("awesome_dashboard.dashboard", AwesomeDashboard);
file static/src/dashboard/dashboard.xml
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-name="awesome_dashboard.AwesomeDashboard">
<Layout display="display" className="'o_dashboard h-100'">
some content
</Layout>
</t>
</templates>
file static/src/dashboard/dashboard.scss
.o_dashboard {
background-color: gray;
}
Comments
Post a Comment