Skip to content

Commit

Permalink
[Solution] 2.1. A new Layout
Browse files Browse the repository at this point in the history
  • Loading branch information
fdardenne authored and ged-odoo committed Oct 27, 2022
1 parent 94c82ed commit a24c571
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
20 changes: 17 additions & 3 deletions awesome_tshirt/static/src/dashboard.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
/** @odoo-module **/

import { registry } from "@web/core/registry";
import { Layout } from "@web/search/layout";
import { getDefaultConfig } from "@web/views/view";

const { Component } = owl;
const { Component, useSubEnv } = owl;

class AwesomeDashboard extends Component {}
class AwesomeDashboard extends Component {
setup() {
useSubEnv({
config: {
...getDefaultConfig(),
...this.env.config,
},
});
this.display = {
controlPanel: { "top-right": false, "bottom-right": false },
};
}
}

AwesomeDashboard.components = {};
AwesomeDashboard.components = { Layout };
AwesomeDashboard.template = "awesome_tshirt.clientaction";

registry.category("actions").add("awesome_tshirt.dashboard", AwesomeDashboard);
6 changes: 5 additions & 1 deletion awesome_tshirt/static/src/dashboard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
<templates xml:space="preserve">

<t t-name="awesome_tshirt.clientaction" owl="1">

<Layout display="display">
<t t-set-slot="control-panel-bottom-left">
Hello owl
</t>
</Layout>
</t>

</templates>

0 comments on commit a24c571

Please sign in to comment.