Browse Source

Jan 22 [UPDT] : Updated 'advanced_dynamic_dashboard'

pull/302/head
AjmalCybro 1 year ago
parent
commit
af22e77cdb
  1. 0
      advanced_dynamic_dashboard/README.rst
  2. 0
      advanced_dynamic_dashboard/__init__.py
  3. 4
      advanced_dynamic_dashboard/__manifest__.py
  4. 0
      advanced_dynamic_dashboard/controllers/__init__.py
  5. 0
      advanced_dynamic_dashboard/controllers/advanced_dynamic_dashboard.py
  6. 0
      advanced_dynamic_dashboard/doc/RELEASE_NOTES.md
  7. 0
      advanced_dynamic_dashboard/models/__init__.py
  8. 0
      advanced_dynamic_dashboard/models/dashboard_block.py
  9. 0
      advanced_dynamic_dashboard/models/dashboard_menu.py
  10. 0
      advanced_dynamic_dashboard/models/domain_to_sql.py
  11. 0
      advanced_dynamic_dashboard/security/ir.model.access.csv
  12. 0
      advanced_dynamic_dashboard/static/description/assets/cybro-odoo.png
  13. 0
      advanced_dynamic_dashboard/static/description/assets/hero.gif
  14. 0
      advanced_dynamic_dashboard/static/description/assets/icons/1.png
  15. 0
      advanced_dynamic_dashboard/static/description/assets/icons/2.png
  16. 0
      advanced_dynamic_dashboard/static/description/assets/icons/3.png
  17. 0
      advanced_dynamic_dashboard/static/description/assets/icons/4.png
  18. 0
      advanced_dynamic_dashboard/static/description/assets/icons/5.png
  19. 0
      advanced_dynamic_dashboard/static/description/assets/icons/6.png
  20. 0
      advanced_dynamic_dashboard/static/description/assets/icons/check.png
  21. 0
      advanced_dynamic_dashboard/static/description/assets/icons/chevron.png
  22. 0
      advanced_dynamic_dashboard/static/description/assets/icons/cogs.png
  23. 0
      advanced_dynamic_dashboard/static/description/assets/icons/consultation.png
  24. 0
      advanced_dynamic_dashboard/static/description/assets/icons/down.svg
  25. 0
      advanced_dynamic_dashboard/static/description/assets/icons/ecom-black.png
  26. 0
      advanced_dynamic_dashboard/static/description/assets/icons/education-black.png
  27. 0
      advanced_dynamic_dashboard/static/description/assets/icons/faq.png
  28. 0
      advanced_dynamic_dashboard/static/description/assets/icons/feature.png
  29. 0
      advanced_dynamic_dashboard/static/description/assets/icons/hotel-black.png
  30. 0
      advanced_dynamic_dashboard/static/description/assets/icons/license.png
  31. 0
      advanced_dynamic_dashboard/static/description/assets/icons/lifebuoy.png
  32. 0
      advanced_dynamic_dashboard/static/description/assets/icons/manufacturing-black.png
  33. 0
      advanced_dynamic_dashboard/static/description/assets/icons/pos-black.png
  34. 0
      advanced_dynamic_dashboard/static/description/assets/icons/puzzle.png
  35. 0
      advanced_dynamic_dashboard/static/description/assets/icons/restaurant-black.png
  36. 0
      advanced_dynamic_dashboard/static/description/assets/icons/screenshot.png
  37. 0
      advanced_dynamic_dashboard/static/description/assets/icons/service-black.png
  38. 0
      advanced_dynamic_dashboard/static/description/assets/icons/support.png
  39. 0
      advanced_dynamic_dashboard/static/description/assets/icons/test-2.png
  40. 0
      advanced_dynamic_dashboard/static/description/assets/icons/trading-black.png
  41. 0
      advanced_dynamic_dashboard/static/description/assets/icons/training.png
  42. 0
      advanced_dynamic_dashboard/static/description/assets/icons/update.png
  43. 0
      advanced_dynamic_dashboard/static/description/assets/icons/user.png
  44. 0
      advanced_dynamic_dashboard/static/description/assets/icons/video.png
  45. 0
      advanced_dynamic_dashboard/static/description/assets/icons/whatsapp.png
  46. 0
      advanced_dynamic_dashboard/static/description/assets/icons/wrench.png
  47. 0
      advanced_dynamic_dashboard/static/description/assets/screenshots/1.png
  48. 0
      advanced_dynamic_dashboard/static/description/assets/screenshots/10.png
  49. 0
      advanced_dynamic_dashboard/static/description/assets/screenshots/11.png
  50. 0
      advanced_dynamic_dashboard/static/description/assets/screenshots/12.png
  51. 0
      advanced_dynamic_dashboard/static/description/assets/screenshots/13.png
  52. 0
      advanced_dynamic_dashboard/static/description/assets/screenshots/14.png
  53. 0
      advanced_dynamic_dashboard/static/description/assets/screenshots/15.png
  54. 0
      advanced_dynamic_dashboard/static/description/assets/screenshots/17.png
  55. 0
      advanced_dynamic_dashboard/static/description/assets/screenshots/18.png
  56. 0
      advanced_dynamic_dashboard/static/description/assets/screenshots/2.png
  57. 0
      advanced_dynamic_dashboard/static/description/assets/screenshots/3.png
  58. 0
      advanced_dynamic_dashboard/static/description/assets/screenshots/4.png
  59. 0
      advanced_dynamic_dashboard/static/description/assets/screenshots/5.png
  60. 0
      advanced_dynamic_dashboard/static/description/assets/screenshots/6.png
  61. 0
      advanced_dynamic_dashboard/static/description/assets/screenshots/8.png
  62. 0
      advanced_dynamic_dashboard/static/description/assets/screenshots/9.png
  63. 0
      advanced_dynamic_dashboard/static/description/banner.png
  64. 0
      advanced_dynamic_dashboard/static/description/icon.png
  65. 0
      advanced_dynamic_dashboard/static/description/index.html
  66. 0
      advanced_dynamic_dashboard/static/lib/css/gridstack.min.css
  67. 0
      advanced_dynamic_dashboard/static/src/css/dynamic_dashboard.css
  68. 51
      advanced_dynamic_dashboard/static/src/js/dynamic_dashboard.js
  69. 0
      advanced_dynamic_dashboard/static/src/scss/dynamic_dashboard.scss
  70. 0
      advanced_dynamic_dashboard/static/src/xml/dynamic_dashboard_template.xml
  71. 0
      advanced_dynamic_dashboard/views/dashboard_menu_views.xml
  72. 0
      advanced_dynamic_dashboard/views/dashboard_views.xml
  73. 0
      advanced_dynamic_dashboard/views/dynamic_block_views.xml

0
advanced_dynamic_dashboard/README.rst

0
advanced_dynamic_dashboard/__init__.py

4
advanced_dynamic_dashboard/__manifest__.py

@ -21,7 +21,7 @@
################################################################################
{
'name': "Advanced Dynamic Dashboard",
'version': '16.0.1.0.1',
'version': '16.0.2.0.1',
'category': 'Productivity',
'summary': """Create Configurable Dashboards Easily""",
'description': """Create Configurable Advanced Dynamic Dashboard to get the
@ -40,14 +40,12 @@
],
'assets': {
'web.assets_backend': [
"https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css",
'advanced_dynamic_dashboard/static/lib/css/gridstack.min.css',
'advanced_dynamic_dashboard/static/src/css/dynamic_dashboard.css',
'advanced_dynamic_dashboard/static/src/scss/dynamic_dashboard.scss',
"https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.3/font/bootstrap-icons.css",
'https://cdnjs.cloudflare.com/ajax/libs/gridstack.js/0.2.6/gridstack.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.bundle.js',
"https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js",
"https://cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js",
"https://cdnjs.cloudflare.com/ajax/libs/bootbox.js/4.4.0/bootbox.min.js",
'https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.min.js',

0
advanced_dynamic_dashboard/controllers/__init__.py

0
advanced_dynamic_dashboard/controllers/advanced_dynamic_dashboard.py

0
advanced_dynamic_dashboard/doc/RELEASE_NOTES.md

0
advanced_dynamic_dashboard/models/__init__.py

0
advanced_dynamic_dashboard/models/dashboard_block.py

0
advanced_dynamic_dashboard/models/dashboard_menu.py

0
advanced_dynamic_dashboard/models/domain_to_sql.py

0
advanced_dynamic_dashboard/security/ir.model.access.csv

0
advanced_dynamic_dashboard/static/description/assets/cybro-odoo.png

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

0
advanced_dynamic_dashboard/static/description/assets/hero.gif

Before

Width:  |  Height:  |  Size: 4.1 MiB

After

Width:  |  Height:  |  Size: 4.1 MiB

0
advanced_dynamic_dashboard/static/description/assets/icons/1.png

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

0
advanced_dynamic_dashboard/static/description/assets/icons/2.png

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

0
advanced_dynamic_dashboard/static/description/assets/icons/3.png

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

0
advanced_dynamic_dashboard/static/description/assets/icons/4.png

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

0
advanced_dynamic_dashboard/static/description/assets/icons/5.png

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

0
advanced_dynamic_dashboard/static/description/assets/icons/6.png

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

0
advanced_dynamic_dashboard/static/description/assets/icons/check.png

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

0
advanced_dynamic_dashboard/static/description/assets/icons/chevron.png

Before

Width:  |  Height:  |  Size: 310 B

After

Width:  |  Height:  |  Size: 310 B

0
advanced_dynamic_dashboard/static/description/assets/icons/cogs.png

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

0
advanced_dynamic_dashboard/static/description/assets/icons/consultation.png

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
advanced_dynamic_dashboard/static/description/assets/icons/down.svg

Before

Width:  |  Height:  |  Size: 542 B

After

Width:  |  Height:  |  Size: 542 B

0
advanced_dynamic_dashboard/static/description/assets/icons/ecom-black.png

Before

Width:  |  Height:  |  Size: 576 B

After

Width:  |  Height:  |  Size: 576 B

0
advanced_dynamic_dashboard/static/description/assets/icons/education-black.png

Before

Width:  |  Height:  |  Size: 733 B

After

Width:  |  Height:  |  Size: 733 B

0
advanced_dynamic_dashboard/static/description/assets/icons/faq.png

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

0
advanced_dynamic_dashboard/static/description/assets/icons/feature.png

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

0
advanced_dynamic_dashboard/static/description/assets/icons/hotel-black.png

Before

Width:  |  Height:  |  Size: 911 B

After

Width:  |  Height:  |  Size: 911 B

0
advanced_dynamic_dashboard/static/description/assets/icons/license.png

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

0
advanced_dynamic_dashboard/static/description/assets/icons/lifebuoy.png

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

0
advanced_dynamic_dashboard/static/description/assets/icons/manufacturing-black.png

Before

Width:  |  Height:  |  Size: 673 B

After

Width:  |  Height:  |  Size: 673 B

0
advanced_dynamic_dashboard/static/description/assets/icons/pos-black.png

Before

Width:  |  Height:  |  Size: 878 B

After

Width:  |  Height:  |  Size: 878 B

0
advanced_dynamic_dashboard/static/description/assets/icons/puzzle.png

Before

Width:  |  Height:  |  Size: 653 B

After

Width:  |  Height:  |  Size: 653 B

0
advanced_dynamic_dashboard/static/description/assets/icons/restaurant-black.png

Before

Width:  |  Height:  |  Size: 905 B

After

Width:  |  Height:  |  Size: 905 B

0
advanced_dynamic_dashboard/static/description/assets/icons/screenshot.png

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

0
advanced_dynamic_dashboard/static/description/assets/icons/service-black.png

Before

Width:  |  Height:  |  Size: 839 B

After

Width:  |  Height:  |  Size: 839 B

0
advanced_dynamic_dashboard/static/description/assets/icons/support.png

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

0
advanced_dynamic_dashboard/static/description/assets/icons/test-2.png

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

0
advanced_dynamic_dashboard/static/description/assets/icons/trading-black.png

Before

Width:  |  Height:  |  Size: 427 B

After

Width:  |  Height:  |  Size: 427 B

0
advanced_dynamic_dashboard/static/description/assets/icons/training.png

Before

Width:  |  Height:  |  Size: 627 B

After

Width:  |  Height:  |  Size: 627 B

0
advanced_dynamic_dashboard/static/description/assets/icons/update.png

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

0
advanced_dynamic_dashboard/static/description/assets/icons/user.png

Before

Width:  |  Height:  |  Size: 988 B

After

Width:  |  Height:  |  Size: 988 B

0
advanced_dynamic_dashboard/static/description/assets/icons/video.png

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

0
advanced_dynamic_dashboard/static/description/assets/icons/whatsapp.png

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

0
advanced_dynamic_dashboard/static/description/assets/icons/wrench.png

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

0
advanced_dynamic_dashboard/static/description/assets/screenshots/1.png

Before

Width:  |  Height:  |  Size: 300 KiB

After

Width:  |  Height:  |  Size: 300 KiB

0
advanced_dynamic_dashboard/static/description/assets/screenshots/10.png

Before

Width:  |  Height:  |  Size: 376 KiB

After

Width:  |  Height:  |  Size: 376 KiB

0
advanced_dynamic_dashboard/static/description/assets/screenshots/11.png

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

0
advanced_dynamic_dashboard/static/description/assets/screenshots/12.png

Before

Width:  |  Height:  |  Size: 300 KiB

After

Width:  |  Height:  |  Size: 300 KiB

0
advanced_dynamic_dashboard/static/description/assets/screenshots/13.png

Before

Width:  |  Height:  |  Size: 300 KiB

After

Width:  |  Height:  |  Size: 300 KiB

0
advanced_dynamic_dashboard/static/description/assets/screenshots/14.png

Before

Width:  |  Height:  |  Size: 265 KiB

After

Width:  |  Height:  |  Size: 265 KiB

0
advanced_dynamic_dashboard/static/description/assets/screenshots/15.png

Before

Width:  |  Height:  |  Size: 285 KiB

After

Width:  |  Height:  |  Size: 285 KiB

0
advanced_dynamic_dashboard/static/description/assets/screenshots/17.png

Before

Width:  |  Height:  |  Size: 261 KiB

After

Width:  |  Height:  |  Size: 261 KiB

0
advanced_dynamic_dashboard/static/description/assets/screenshots/18.png

Before

Width:  |  Height:  |  Size: 212 KiB

After

Width:  |  Height:  |  Size: 212 KiB

0
advanced_dynamic_dashboard/static/description/assets/screenshots/2.png

Before

Width:  |  Height:  |  Size: 308 KiB

After

Width:  |  Height:  |  Size: 308 KiB

0
advanced_dynamic_dashboard/static/description/assets/screenshots/3.png

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 100 KiB

0
advanced_dynamic_dashboard/static/description/assets/screenshots/4.png

Before

Width:  |  Height:  |  Size: 263 KiB

After

Width:  |  Height:  |  Size: 263 KiB

0
advanced_dynamic_dashboard/static/description/assets/screenshots/5.png

Before

Width:  |  Height:  |  Size: 288 KiB

After

Width:  |  Height:  |  Size: 288 KiB

0
advanced_dynamic_dashboard/static/description/assets/screenshots/6.png

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 96 KiB

0
advanced_dynamic_dashboard/static/description/assets/screenshots/8.png

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

0
advanced_dynamic_dashboard/static/description/assets/screenshots/9.png

Before

Width:  |  Height:  |  Size: 288 KiB

After

Width:  |  Height:  |  Size: 288 KiB

0
advanced_dynamic_dashboard/static/description/banner.png

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

0
advanced_dynamic_dashboard/static/description/icon.png

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

0
advanced_dynamic_dashboard/static/description/index.html

0
advanced_dynamic_dashboard/static/lib/css/gridstack.min.css

0
advanced_dynamic_dashboard/static/src/css/dynamic_dashboard.css

51
advanced_dynamic_dashboard/static/src/js/dynamic_dashboard.js

@ -42,7 +42,7 @@ odoo.define('advanced_dynamic_dashboard.Dashboard', function (require) {
this.set("title", 'Dashboard');
return this._super().then(function () {
self.render_dashboards();
self.gridstack_init(self);
// self.gridstack_init(self);
});
},
fetch_data: function () {//Fetch data and call rpc query to create chart or tile. return block_ids
@ -79,25 +79,35 @@ odoo.define('advanced_dynamic_dashboard.Dashboard', function (require) {
this.$el.find('.dropdown-export').toggleClass('dropdown-menu-dark', isDarkTheme);
},
_onchangeFilter: function() {
this.$('#edit_layout').show();
var start_date = $('#start-date').val();
var end_date = $('#end-date').val();
var self = this;
if (!start_date) {
start_date = "null";
}
if (!end_date) {
end_date = "null";
}
this._rpc({
model: 'dashboard.block',
method: 'get_dashboard_vals',
args: [[], this.action_id, start_date, end_date],
}).then(function (result) {
self.block_ids = result;
self.$('.o_dynamic_dashboard').empty(); // Clear existing blocks before rendering
self.render_dashboards(); // Re-render the dashboard with updated data
self.gridstack_init(self); // Reinitialize gridstack after rendering
});
if (!start_date) {
start_date = "null";
}
if (!end_date) {
end_date = "null";
}
console.log(start_date,"start")
console.log(end_date,"end")
this._rpc({
model: 'dashboard.block',
method: 'get_dashboard_vals',
args: [[], this.action_id, start_date, end_date],
}).then(function (result) {
console.log(result,"res")
self.block_ids = result;
self.$('.o_dynamic_dashboard').empty(); // Clear existing blocks before rendering
self.render_dashboards(); // Re-render the dashboard with updated data
// var gridstack = self.$('.grid-stack').data('gridstack');
// gridstack.enableMove(true);
// gridstack.enableResize(true);
// console.log(gridstack,"selffffffff")
// self.gridstack_init(self);
// self.gridstack_on(self);
// self.gridstack_init(self); // Reinitialize gridstack after rendering
});
},
get_colors: function (x_axis) {//Function fetch random color values and set chart color
return x_axis.map(() => `rgb(${Math.floor(Math.random() * 255)}, ${Math.floor(Math.random() * 255)}, ${Math.floor(Math.random() * 255)})`);
@ -196,6 +206,7 @@ odoo.define('advanced_dynamic_dashboard.Dashboard', function (require) {
return [data, options];
},
gridstack_init: function (self) {// Used gridstack to drag and resize chart and tile.
console.log(self,"selfselfselfselfself")
self.$('.grid-stack').gridstack({
animate: true,
duration: 200,
@ -206,6 +217,7 @@ odoo.define('advanced_dynamic_dashboard.Dashboard', function (require) {
},
resizable:{
aspectRatio:20/18,
// autoHide: false,
},
alwaysShowResizeHandle: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),
float: true
@ -213,9 +225,12 @@ odoo.define('advanced_dynamic_dashboard.Dashboard', function (require) {
self.gridstack_off(self);
},
gridstack_on: function (self) {// Enable move and resize functionality
console.log(self,"---")
var gridstack = self.$('.grid-stack').data('gridstack');
console.log(gridstack,"gridddddd")
gridstack.enableMove(true);
gridstack.enableResize(true);
console.log(gridstack,"selffffffff")
},
gridstack_off: function (self) {// Disable move and resize functionality
var gridstack = self.$('.grid-stack').data('gridstack');
@ -223,6 +238,7 @@ odoo.define('advanced_dynamic_dashboard.Dashboard', function (require) {
gridstack.enableResize(false);
},
render_dashboards: function () {
console.log(this.block_ids,"prefghj")
self = this;
self.$("#save_layout").hide();//Hide save_layout button
_.each(this.block_ids, function (block) {//Loop all chart and tile
@ -479,6 +495,7 @@ odoo.define('advanced_dynamic_dashboard.Dashboard', function (require) {
// FETCHING SAVED LAYOUT FROM LOCAL STORAGE MEMORY
},
_onClick_edit_layout: function (e) {// Function to hide edit_layout button and show save_layout button. and also work the function gridstack_on(self)
console.log(e,"oooo")
e.stopPropagation();
self = this;
self.$("#edit_layout").hide();

0
advanced_dynamic_dashboard/static/src/scss/dynamic_dashboard.scss

0
advanced_dynamic_dashboard/static/src/xml/dynamic_dashboard_template.xml

0
advanced_dynamic_dashboard/views/dashboard_menu_views.xml

0
advanced_dynamic_dashboard/views/dashboard_views.xml

0
advanced_dynamic_dashboard/views/dynamic_block_views.xml

Loading…
Cancel
Save