');
g++;
-
if (key in late) {
$('#' + key + ' .dashboard-card__stats').append('
@@ -120,7 +112,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
var name = Object.values(result[3]) // Add data values to array
var count = Object.values(result[0])
var j = 0;
-
for (var c in count) {
$('#operation_type_table').append('
'+name[j]+'
'+count[c]+'
')
j++;
@@ -144,7 +135,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
"#a05195",
"#6d5c16",
"#CCCCFF"
-
],
borderColor: [
"#003f5c",
@@ -179,7 +169,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
});
});
},
-
// top ten bar graph
render_top_product_bar_graph:function(){
var self = this
@@ -214,7 +203,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
"#a05195",
"#6d5c16",
"#CCCCFF"
-
],
borderColor: [
"#003f5c",
@@ -228,7 +216,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
"#6d5c16",
"#CCCCFF"
],
-
barPercentage: 0.5,
barThickness: 6,
maxBarThickness: 8,
@@ -250,7 +237,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
});
});
},
-
// product categories doughnut graph
render_product_category:function(){
var self = this
@@ -286,11 +272,9 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
"#a05195",
"#6d5c16",
"#CCCCFF"
-
],
borderColor: [
"#003f5c",
-
],
barPercentage: 0.5,
barThickness: 6,
@@ -313,7 +297,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
});
});
},
-
// product move line graph
render_product_move_graph_this_month:function(){
var self = this
@@ -336,7 +319,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
$('#product_move_selection').append('')
k++;
}
-
});
var opti = $(self.target).val();
var option = $( "#product_move_selection" ).val();
@@ -383,12 +365,9 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
maintainAspectRatio: false, // Add to prevent default behaviour of full-width/height
}
});
-
});
});
-
},
-
// stock moves pie graph
render_stock_moves:function(){
rpc.query({
@@ -422,7 +401,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
"#a05195",
"#6d5c16",
"#CCCCFF"
-
],
borderColor: [
"#003f5c",
@@ -457,7 +435,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
});
});
},
-
// location-on hand table
render_storage_location:function(){
var self = this
@@ -471,7 +448,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
});
});
},
-
//out of stock graph
render_out_of_stock_graph:function(){
var self = this
@@ -525,10 +501,8 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
}
});
}
-
});
},
-
//dead stock graph
render_dead_of_stock_graph:function(){
var self = this
@@ -536,7 +510,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
model: "stock.move",
method: "get_dead_of_stock",
}).then(function (result) {
-
if (result) {
$('#graphs').append('
Dead Stock
@@ -583,10 +556,8 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
}
});
}
-
});
},
-
// event functions
//top product selection
onclick_top_product_selection:function(events){
@@ -626,7 +597,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
"#a05195",
"#6d5c16",
"#CCCCFF"
-
],
borderColor: [
"#003f5c",
@@ -640,7 +610,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
"#6d5c16",
"#CCCCFF"
],
-
barPercentage: 0.5,
barThickness: 6,
maxBarThickness: 8,
@@ -661,7 +630,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
}
});
});
-
}
if (option == 'top_last_30_days'){
var self = this;
@@ -698,7 +666,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
"#a05195",
"#6d5c16",
"#CCCCFF"
-
],
borderColor: [
"#003f5c",
@@ -712,7 +679,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
"#6d5c16",
"#CCCCFF"
],
-
barPercentage: 0.5,
barThickness: 6,
maxBarThickness: 8,
@@ -768,7 +734,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
"#a05195",
"#6d5c16",
"#CCCCFF"
-
],
borderColor: [
"#003f5c",
@@ -838,7 +803,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
"#a05195",
"#6d5c16",
"#CCCCFF"
-
],
borderColor: [
"#003f5c",
@@ -852,7 +816,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
"#6d5c16",
"#CCCCFF"
],
-
barPercentage: 0.5,
barThickness: 6,
maxBarThickness: 8,
@@ -875,7 +838,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
});
}
},
-
// stock moves this_mont,last_year change
onclick_stock_moves_selection:function(events){
var option = $(events.target).val();
@@ -913,7 +875,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
"#a05195",
"#6d5c16",
"#CCCCFF"
-
],
borderColor: [
"#003f5c",
@@ -946,9 +907,7 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
maintainAspectRatio: false, // Add to prevent default behaviour of full-width/height
}
});
-
});
-
}
if (option == 'this_month'){
rpc.query({
@@ -984,7 +943,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
"#a05195",
"#6d5c16",
"#CCCCFF"
-
],
borderColor: [
"#003f5c",
@@ -1017,9 +975,7 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
maintainAspectRatio: false, // Add to prevent default behaviour of full-width/height
}
});
-
});
-
}
if (option == 'last_3_month'){
rpc.query({
@@ -1055,7 +1011,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
"#a05195",
"#6d5c16",
"#CCCCFF"
-
],
borderColor: [
"#003f5c",
@@ -1088,9 +1043,7 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
maintainAspectRatio: false, // Add to prevent default behaviour of full-width/height
}
});
-
});
-
}
else if (option == 'last_year'){
rpc.query({
@@ -1126,7 +1079,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
"#a05195",
"#6d5c16",
"#CCCCFF"
-
],
borderColor: [
"#003f5c",
@@ -1159,11 +1111,9 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
maintainAspectRatio: false, // Add to prevent default behaviour of full-width/height
}
});
-
});
}
},
-
// product move selection
onclick_product_moves_selection:function(events){
var option = $(events.target).val();
@@ -1211,10 +1161,8 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
maintainAspectRatio: false, // Add to prevent default behaviour of full-width/height
}
});
-
});
},
-
// tile click
onclick_tiles: function(f) {
var id = parseInt(this.$(f.currentTarget).attr('id'));
@@ -1231,8 +1179,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
target: 'current',
}, options);
},
-
-
// tile late status onclick
onclick_late_status: function(f) {
f.stopPropagation();
@@ -1251,7 +1197,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
target: 'current',
}, options)
},
-
// tile waiting status onclick
onclick_waiting_status: function(f) {
f.stopPropagation();
@@ -1269,7 +1214,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
target: 'current',
}, options)
},
-
// tile backorder status onclick
onclick_backorders_status: function(f) {
f.stopPropagation();
@@ -1287,7 +1231,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
target: 'current',
}, options)
},
-
// top ten product show details button click
onclick_top_product_info: function(f) {
var x = document.getElementById("pro_info");
@@ -1297,7 +1240,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
x.style.display = "none";
}
},
-
// product category graph show details button click
onclick_pro_cate_info: function(f) {
var x = document.getElementById("category_table");
@@ -1307,7 +1249,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
x.style.display = "none";
}
},
-
// stock moves show details button click
onclick_location_info: function(f) {
var x = document.getElementById("location_table");
@@ -1317,7 +1258,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
x.style.display = "none";
}
},
-
// operation types table show details button click
onclick_operation_type_info: function(f) {
var x = document.getElementById("operation_type_table");
@@ -1327,7 +1267,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
x.style.display = "none";
}
},
-
// dead stock table show details button click
onclick_dead_stock_info: function(f) {
var x = document.getElementById("dead_stock_table");
@@ -1337,7 +1276,6 @@ odoo.define("inventory_dashboard.dashboard", function (require) {
x.style.display = "none";
}
},
-
// out of stock table show details button click
onclick_out_of_stock_info: function(f) {
var x = document.getElementById("out_of_stock_table");
diff --git a/inventory_stock_dashboard_odoo/static/src/xml/dashboard.xml b/inventory_stock_dashboard_odoo/static/src/xml/dashboard.xml
index 00003a4bc..2eb5ae785 100644
--- a/inventory_stock_dashboard_odoo/static/src/xml/dashboard.xml
+++ b/inventory_stock_dashboard_odoo/static/src/xml/dashboard.xml
@@ -1,175 +1,191 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Top Moving Products
-
-
-
-
-
-
-
Products
-
Quantity Transfered
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Product Categories
-
-
-
-
-
Categories
-
Onhand Quantity
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Top Moving Products
+
+
+
+
+
+
+
Products
+
Quantity Transfered
+
+
+
+
+
+
+
+
+
+
+
+
+
Product Categories
+
+
+
+
Categories
+
Onhand Quantity
+
+
+
+
+
+
+
+
+
+
+
+
-
Product Moves By Category
-
-
-
-
-
-
-
Products
-
Quantity Done
-
-
-
-
-
-
-
-
-
-
-
-
-
Product Moves By Category
+
+
+
+
+
+
+
Products
+
Quantity Done
+
+
+
+
+
+
+
+
+
+
+
+
-
Stock Moves By Location
-
-
-
-
-
-
-
-
Location
-
Stock Moves Count
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Operation Types
-
-
-
-
-
Operation Types
-
Transfer Count
-
-
-
-
-
-
-
-
-
+
Stock Moves By Location
+
+
+
+
+
+
+
Location
+
Stock Moves Count
+
+
+
+
+
+
+
+
+
+
+
+
+
Operation Types
+
+
+
+
Operation Types
+
Transfer Count
+
+
+
+
+
+
+
+
+
+
+
+
+
Locations
+
+
+
+
+
+
+
Location
+
+
+
On Hand Quantity
+
+
+
+
+
+
+
+
+
+
-
-
-
-
Locations
-
-
-
-
-
Location
-
-
-
On Hand Quantity
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/inventory_stock_dashboard_odoo/views/dashboard_menu.xml b/inventory_stock_dashboard_odoo/views/dashboard_menus.xml
similarity index 58%
rename from inventory_stock_dashboard_odoo/views/dashboard_menu.xml
rename to inventory_stock_dashboard_odoo/views/dashboard_menus.xml
index 9090fedb1..4889f9436 100644
--- a/inventory_stock_dashboard_odoo/views/dashboard_menu.xml
+++ b/inventory_stock_dashboard_odoo/views/dashboard_menus.xml
@@ -1,11 +1,10 @@
- Dashboard
- inventory_dashboard_tag
-
-