File tree Expand file tree Collapse file tree 2 files changed +3
-43
lines changed
awesome_dashboard/static/src Expand file tree Collapse file tree 2 files changed +3
-43
lines changed Original file line number Diff line number Diff line change 1- import { Component , onWillStart } from "@odoo/owl" ;
1+ import { Component } from "@odoo/owl" ;
22import { registry } from "@web/core/registry" ;
3- import { Layout } from "@web/search/layout" ;
4- import { useService } from "@web/core/utils/hooks" ;
5- import { DashboardItem } from "./dashboard_item/dashboard_item" ;
63
74class AwesomeDashboard extends Component {
85 static template = "awesome_dashboard.AwesomeDashboard" ;
96}
107
11- registry . category ( "actions" ) . add ( "awesome_dashboard.dashboard" , AwesomeDashboard ) ;
8+ registry . category ( "actions" ) . add ( "awesome_dashboard.dashboard" , AwesomeDashboard ) ;
Original file line number Diff line number Diff line change 22<templates xml : space =" preserve" >
33
44 <t t-name =" awesome_dashboard.AwesomeDashboard" >
5- <Layout display =" display" className =" 'o_dashboard h-100'" >
6- <t t-set-slot =" layout-buttons" >
7- <button class =" btn btn-primary" t-on-click =" openCustomerView" >Customers</button >
8- <button class =" btn btn-primary" t-on-click =" openLeads" >Leads</button >
9- </t >
10- <div class =" d-flex flex-wrap" >
11- <DashboardItem >
12- Average amount of t-shirt by order this month
13- <div class =" fs-1 fw-bold text-success text-center" >
14- <t t-esc =" statistics.average_quantity" />
15- </div >
16- </DashboardItem >
17- <DashboardItem >
18- Average time for an order to go from 'new' to 'sent' or 'cancelled'
19- <div class =" fs-1 fw-bold text-success text-center" >
20- <t t-esc =" statistics.average_time" />
21- </div >
22- </DashboardItem >
23- <DashboardItem >
24- Number of new orders this month
25- <div class =" fs-1 fw-bold text-success text-center" >
26- <t t-esc =" statistics.nb_new_orders" />
27- </div >
28- </DashboardItem >
29- <DashboardItem >
30- Number of cancelled orders this month
31- <div class =" fs-1 fw-bold text-success text-center" >
32- <t t-esc =" statistics.nb_cancelled_orders" />
33- </div >
34- </DashboardItem >
35- <DashboardItem >
36- Total amount of new orders this month
37- <div class =" fs-1 fw-bold text-success text-center" >
38- <t t-esc =" statistics.total_amount" />
39- </div >
40- </DashboardItem >
41- </div >
42- </Layout >
5+ hello dashboard
436 </t >
447
458</templates >
You can’t perform that action at this time.
0 commit comments