diff --git a/dynamic_dashboard_odoo/README.md b/dynamic_dashboard_odoo/README.md deleted file mode 100755 index be94c4207..000000000 --- a/dynamic_dashboard_odoo/README.md +++ /dev/null @@ -1,34 +0,0 @@ -Odoo Dynamic Dashboard -====================== - -Dynamically Arrange the dashboard to get the information that are relevant to your business, department, or a specific process or need. - - -Installation -============ -- www.odoo.com/documentation/14.0/setup/install.html -- Install our custom addon - -License -======= -GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) -(http://www.gnu.org/licenses/agpl.html) - -Bug Tracker -=========== -Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. - -Credits -======= -* Cybrosys Techno Solutions - -Author ------- -Developer: Irfan @ Cybrosys, Afras @Cybrosys - -Maintainer ----------- -This module is maintained by Cybrosys Technologies. - -For support and more information, please visit https://www.cybrosys.com. - diff --git a/dynamic_dashboard_odoo/__init__.py b/dynamic_dashboard_odoo/__init__.py deleted file mode 100644 index 54752ce10..000000000 --- a/dynamic_dashboard_odoo/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################# -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2021-TODAY Cybrosys Technologies() -# Author: Cybrosys Techno Solutions() -# -# You can modify it under the terms of the GNU LESSER -# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. -# -# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE -# (LGPL v3) along with this program. -# If not, see . -# -############################################################################# - -from . import models -from . import controllers diff --git a/dynamic_dashboard_odoo/__manifest__.py b/dynamic_dashboard_odoo/__manifest__.py deleted file mode 100644 index 21a43ecdb..000000000 --- a/dynamic_dashboard_odoo/__manifest__.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################# -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2021-TODAY Cybrosys Technologies() -# Author: Cybrosys Techno Solutions() -# -# You can modify it under the terms of the GNU LESSER -# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. -# -# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE -# (LGPL v3) along with this program. -# If not, see . -# -############################################################################# -{ - 'name': "Odoo Dynamic Dashboard", - 'version': '14.0.1.0.0', - 'category': 'Extra Tools', - 'summary': """Create Configurable Dashboards Easily""", - 'description': """Create Configurable Dashboard Dynamically to get the information that are relevant to your business, department, or a specific process or need, Dynamic Dashboard, Dashboard, Dashboard Odoo""", - 'author': 'Cybrosys Techno Solutions', - 'website': "https://www.cybrosys.com", - 'company': 'Cybrosys Techno Solutions', - 'maintainer': 'Cybrosys Techno Solutions', - 'depends': ['base', 'web'], - 'data': [ - 'views/dashboard_view.xml', - 'views/dynamic_block_view.xml', - 'views/dashboard_menu_view.xml', - 'security/ir.model.access.csv', - ], - 'images': ['static/description/banner.png'], - 'qweb': ["static/src/xml/dynamic_dashboard_template.xml"], - 'license': "AGPL-3", - 'installable': True, - 'auto_install': False, - 'application': False, -} diff --git a/dynamic_dashboard_odoo/controllers/__init__.py b/dynamic_dashboard_odoo/controllers/__init__.py deleted file mode 100644 index 0cdabcead..000000000 --- a/dynamic_dashboard_odoo/controllers/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################# -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2021-TODAY Cybrosys Technologies() -# Author: Cybrosys Techno Solutions() -# -# You can modify it under the terms of the GNU LESSER -# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. -# -# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE -# (LGPL v3) along with this program. -# If not, see . -# -############################################################################# - -from . import main diff --git a/dynamic_dashboard_odoo/controllers/main.py b/dynamic_dashboard_odoo/controllers/main.py deleted file mode 100644 index 96624d86d..000000000 --- a/dynamic_dashboard_odoo/controllers/main.py +++ /dev/null @@ -1,55 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################# -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2021-TODAY Cybrosys Technologies() -# Author: Cybrosys Techno Solutions() -# -# You can modify it under the terms of the GNU LESSER -# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. -# -# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE -# (LGPL v3) along with this program. -# If not, see . -# -############################################################################# - -from odoo import http, _ -from odoo.http import request -from odoo.exceptions import UserError - - -class DynamicDashboard(http.Controller): - - @http.route('/create/tile', type='json', auth='user') - def tile_creation(self, **kw): - """While clicking ADD Block""" - type = kw.get('type') - action_id = kw.get('action_id') - tile_id = request.env['dashboard.block'].sudo().create({ - 'name': 'New Block', - 'type': type, - 'tile_color': '#1f6abb', - 'text_color': '#FFFFFF', - 'fa_icon': 'fa fa-money', - 'edit_mode': True, - 'client_action': int(action_id), - }) - - return {'id': tile_id.id, 'name': tile_id.name, 'type': type, 'icon': 'fa fa-money', - 'color': 'background-color: #1f6abb;', - 'text_color': 'color: #FFFFFF', - 'icon_color': 'color: #1f6abb'} - - @http.route('/tile/details', type='json', auth='user') - def tile_details(self, **kw): - tile_id = request.env['dashboard.block'].sudo().search([('id', '=', kw.get('id'))]) - if tile_id: - return {'model': tile_id.model_id.model, 'filter': tile_id.filter, 'model_name': tile_id.model_id.name} - return False diff --git a/dynamic_dashboard_odoo/doc/RELEASE_NOTES.md b/dynamic_dashboard_odoo/doc/RELEASE_NOTES.md deleted file mode 100755 index b6827255b..000000000 --- a/dynamic_dashboard_odoo/doc/RELEASE_NOTES.md +++ /dev/null @@ -1,8 +0,0 @@ - -## Module - -#### 14.12.2021 -#### Version 14.0.1.0.0 - -##### Initial Commit for dynamic_dashboard_odoo - diff --git a/dynamic_dashboard_odoo/models/__init__.py b/dynamic_dashboard_odoo/models/__init__.py deleted file mode 100644 index 1a4f700b1..000000000 --- a/dynamic_dashboard_odoo/models/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################# -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2021-TODAY Cybrosys Technologies() -# Author: Cybrosys Techno Solutions() -# -# You can modify it under the terms of the GNU LESSER -# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. -# -# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE -# (LGPL v3) along with this program. -# If not, see . -# -############################################################################# - -from . import dashboard_block -from . import domain_to_sql -from . import dashboard_menu diff --git a/dynamic_dashboard_odoo/models/dashboard_block.py b/dynamic_dashboard_odoo/models/dashboard_block.py deleted file mode 100644 index b9143c270..000000000 --- a/dynamic_dashboard_odoo/models/dashboard_block.py +++ /dev/null @@ -1,135 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################# -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2021-TODAY Cybrosys Technologies() -# Author: Cybrosys Techno Solutions() -# -# You can modify it under the terms of the GNU LESSER -# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. -# -# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE -# (LGPL v3) along with this program. -# If not, see . -# -############################################################################# - -from odoo import models, fields, api -from odoo.osv import expression -from ast import literal_eval - - -class DashboardBlock(models.Model): - _name = "dashboard.block" - _description = "Dashboard Blocks" - _rec_name = "name" - - def get_default_action(self): - action_id = self.env.ref('dynamic_dashboard_odoo.action_dynamic_dashboard') - if action_id: - return action_id.id - else: - return False - - name = fields.Char(string="Name", help='Name of the block') - field_id = fields.Many2one('ir.model.fields', 'Measured Field',domain="[('store', '=', True), ('model_id', '=', model_id), ('ttype', 'in', ['float','integer','monetary'])]") - fa_icon = fields.Char(string="Icon") - graph_size = fields.Selection( - selection=[("col-lg-4", "Small"), ("col-lg-6", "Medium"), ("col-lg-12", "Large")], - string="Graph Size",default='col-lg-4') - operation = fields.Selection( - selection=[("sum", "Sum"), ("avg", "Average"), ("count", "Count")], - string="Operation", help='Tile Operation that needs to bring values for tile') - - graph_type = fields.Selection( - selection=[("bar", "Bar"), ("radar", "Radar"), ("pie", "Pie"), ("line", "Line"), ("doughnut", "Doughnut")], - string="Chart Type", help='Type of Chart') - measured_field = fields.Many2one("ir.model.fields", "Measured Field") - client_action = fields.Many2one('ir.actions.client', default = get_default_action) - - type = fields.Selection( - selection=[("graph", "Chart"), ("tile", "Tile")], string="Type", help='Type of Block ie, Chart or Tile') - x_axis = fields.Char(string="X-Axis") - y_axis = fields.Char(string="Y-Axis") - group_by = fields.Many2one("ir.model.fields", store=True, string="Group by(Y-Axis)", help='Field value for Y-Axis') - tile_color = fields.Char(string="Tile Color", help='Primary Color of Tile') - text_color = fields.Char(string="Text Color", help='Text Color of Tile') - fa_color = fields.Char(string="Icon Color", help='Icon Color of Tile') - filter = fields.Char(string="Filter") - model_id = fields.Many2one('ir.model', 'Model') - model_name = fields.Char(related='model_id.model', readonly=True) - - filter_by = fields.Many2one("ir.model.fields", string=" Filter By") - filter_values = fields.Char(string="Filter Values") - - sequence = fields.Integer(string="Sequence") - edit_mode = fields.Boolean(default=False, invisible=True) - - def get_dashboard_vals(self, action_id): - """Dashboard block values""" - block_id = [] - dashboard_block = self.env['dashboard.block'].sudo().search([('client_action', '=', int(action_id))]) - for rec in dashboard_block: - color = rec.tile_color if rec.tile_color else '#1f6abb;' - icon_color = rec.tile_color if rec.tile_color else '#1f6abb;' - text_color = rec.text_color if rec.text_color else '#FFFFFF;' - vals = { - 'id': rec.id, - 'name': rec.name, - 'type': rec.type, - 'graph_type': rec.graph_type, - 'icon': rec.fa_icon, - 'cols': rec.graph_size, - 'color': 'background-color: %s;' % color, - 'text_color': 'color: %s;' % text_color, - 'icon_color': 'color: %s;' % icon_color, - } - domain = [] - if rec.filter: - domain = expression.AND([literal_eval(rec.filter)]) - if rec.model_name: - if rec.type == 'graph': - query = self.env[rec.model_name].get_query(domain, rec.operation, rec.measured_field, - group_by=rec.group_by) - self._cr.execute(query) - records = self._cr.dictfetchall() - x_axis = [] - for record in records: - x_axis.append(record.get(rec.group_by.name)) - y_axis = [] - for record in records: - y_axis.append(record.get('value')) - vals.update({'x_axis': x_axis, 'y_axis': y_axis}) - else: - query = self.env[rec.model_name].get_query(domain, rec.operation, rec.measured_field) - self._cr.execute(query) - records = self._cr.dictfetchall() - magnitude = 0 - total = records[0].get('value') - while abs(total) >= 1000: - magnitude += 1 - total /= 1000.0 - # add more suffixes if you need them - val = '%.2f%s' % (total, ['', 'K', 'M', 'G', 'T', 'P'][magnitude]) - - # if rec.measured_field.ttype == 'monetary': - # amount = str( - # value) + currency_id.symbol if currency_id.position == 'after' else currency_id.symbol + str( - # value) - records[0]['value'] = val - vals.update(records[0]) - block_id.append(vals) - return block_id - - -class DashboardBlockLine(models.Model): - _name = "dashboard.block.line" - - sequence = fields.Integer(string="Sequence") - block_size = fields.Integer(string="Block size") diff --git a/dynamic_dashboard_odoo/models/dashboard_menu.py b/dynamic_dashboard_odoo/models/dashboard_menu.py deleted file mode 100644 index 0c8573ab1..000000000 --- a/dynamic_dashboard_odoo/models/dashboard_menu.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################# -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2021-TODAY Cybrosys Technologies() -# Author: Cybrosys Techno Solutions() -# -# You can modify it under the terms of the GNU LESSER -# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. -# -# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE -# (LGPL v3) along with this program. -# If not, see . -# -############################################################################# - -from odoo import models, fields, api -from odoo.osv import expression - - -class DashboardMenu(models.Model): - _name = "dashboard.menu" - _description = "Dashboard Menu" - _rec_name = "name" - - name = fields.Char(string="Name") - menu_id = fields.Many2one('ir.ui.menu', string="Menu") - group_ids = fields.Many2many('res.groups', string='Groups', - related='menu_id.groups_id', - help="User need to be at least in one of these groups to see the menu") - client_action = fields.Many2one('ir.actions.client') - - @api.model - def create(self, vals): - """This code is to create menu""" - values = { - 'name': vals['name'], - 'tag': 'dynamic_dashboard', - } - action_id = self.env['ir.actions.client'].create(values) - vals['client_action'] = action_id.id - menu_id = self.env['ir.ui.menu'].create({ - 'name': vals['name'], - 'parent_id': vals['menu_id'], - 'action': 'ir.actions.client,%d' % (action_id.id,) - }) - return super(DashboardMenu, self).create(vals) diff --git a/dynamic_dashboard_odoo/models/domain_to_sql.py b/dynamic_dashboard_odoo/models/domain_to_sql.py deleted file mode 100644 index 9ebd7dbb4..000000000 --- a/dynamic_dashboard_odoo/models/domain_to_sql.py +++ /dev/null @@ -1,74 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################# -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2021-TODAY Cybrosys Technologies() -# Author: Cybrosys Techno Solutions() -# -# You can modify it under the terms of the GNU LESSER -# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. -# -# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE -# (LGPL v3) along with this program. -# If not, see . -# -############################################################################# - -from odoo.osv import expression -from odoo import models -from odoo.release import version_info - - -def get_query(self, args, operation, field, group_by=False, apply_ir_rules=False): - """Dashboard block Query Creation""" - query = self._where_calc(args) - if apply_ir_rules: - self._apply_ir_rules(query, 'read') - if operation and field: - data = 'COALESCE(%s("%s".%s),0) AS value' % (operation.upper(), self._table, field.name) - join = '' - group_by_str = '' - if group_by: - if group_by.ttype == 'many2one': - relation_model = group_by.relation.replace('.', '_') - join = ' INNER JOIN %s on "%s".id = "%s".%s' % ( - relation_model, relation_model, self._table, group_by.name) - rec_name = self.env[group_by.relation]._rec_name_fallback() - data = data + ',"%s".%s AS %s' % (relation_model, rec_name, group_by.name) - group_by_str = ' Group by "%s".%s' % (relation_model, rec_name) - else: - data = data + ',"%s".%s' % (self._table, group_by.name) - group_by_str = ' Group by "%s".%s' % (self._table, str(group_by.name)) - else: - data = '"%s".id' % (self._table) - - from_clause, where_clause, where_clause_params = query.get_sql() - where_str = where_clause and (" WHERE %s" % where_clause) or '' - if 'company_id' in self._fields: - if len(self.env.companies.ids) > 1: - operator = 'in' - company = str(tuple(self.env.companies.ids)) - else: - operator = '=' - company = self.env.companies.ids[0] - if where_str == '': - add = ' where' - else: - add = ' and' - multicompany_condition = '%s "%s".company_id %s %s' % (add, self._table, operator, company) - else: - multicompany_condition = '' - - query_str = 'SELECT %s FROM ' % data + from_clause + join + where_str + multicompany_condition + group_by_str - where_clause_params = map(lambda x: "'" + str(x) + "'", where_clause_params) - - return query_str % tuple(where_clause_params) - - -models.BaseModel.get_query = get_query diff --git a/dynamic_dashboard_odoo/security/ir.model.access.csv b/dynamic_dashboard_odoo/security/ir.model.access.csv deleted file mode 100644 index 39d2b04eb..000000000 --- a/dynamic_dashboard_odoo/security/ir.model.access.csv +++ /dev/null @@ -1,4 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_dashboard_block,access.dashboard.block,model_dashboard_block,base.group_user,1,1,1,1 -access_dashboard_menu,access.dashboard.menu,model_dashboard_menu,base.group_user,1,1,1,1 -access_dashboard_block_line,access.dashboard.block.line,model_dashboard_block_line,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/dynamic_dashboard_odoo/static/description/assets/icons/cogs.png b/dynamic_dashboard_odoo/static/description/assets/icons/cogs.png deleted file mode 100644 index 95d0bad62..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/icons/cogs.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/icons/consultation.png b/dynamic_dashboard_odoo/static/description/assets/icons/consultation.png deleted file mode 100644 index 8319d4baa..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/icons/consultation.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/icons/ecom-black.png b/dynamic_dashboard_odoo/static/description/assets/icons/ecom-black.png deleted file mode 100644 index a9385ff13..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/icons/ecom-black.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/icons/education-black.png b/dynamic_dashboard_odoo/static/description/assets/icons/education-black.png deleted file mode 100644 index 3eb09b27b..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/icons/education-black.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/icons/hotel-black.png b/dynamic_dashboard_odoo/static/description/assets/icons/hotel-black.png deleted file mode 100644 index 130f613be..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/icons/hotel-black.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/icons/license.png b/dynamic_dashboard_odoo/static/description/assets/icons/license.png deleted file mode 100644 index a5869797e..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/icons/license.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/icons/lifebuoy.png b/dynamic_dashboard_odoo/static/description/assets/icons/lifebuoy.png deleted file mode 100644 index 658d56ccc..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/icons/lifebuoy.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/icons/logo.png b/dynamic_dashboard_odoo/static/description/assets/icons/logo.png deleted file mode 100644 index 478462d3e..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/icons/logo.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/icons/manufacturing-black.png b/dynamic_dashboard_odoo/static/description/assets/icons/manufacturing-black.png deleted file mode 100644 index 697eb0e9f..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/icons/manufacturing-black.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/icons/pos-black.png b/dynamic_dashboard_odoo/static/description/assets/icons/pos-black.png deleted file mode 100644 index 97c0f90c1..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/icons/pos-black.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/icons/puzzle.png b/dynamic_dashboard_odoo/static/description/assets/icons/puzzle.png deleted file mode 100644 index 65cf854e7..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/icons/puzzle.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/icons/restaurant-black.png b/dynamic_dashboard_odoo/static/description/assets/icons/restaurant-black.png deleted file mode 100644 index 4a35eb939..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/icons/restaurant-black.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/icons/service-black.png b/dynamic_dashboard_odoo/static/description/assets/icons/service-black.png deleted file mode 100644 index 301ab51cb..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/icons/service-black.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/icons/tiny-star.png b/dynamic_dashboard_odoo/static/description/assets/icons/tiny-star.png deleted file mode 100644 index 3205e6e0c..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/icons/tiny-star.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/icons/trading-black.png b/dynamic_dashboard_odoo/static/description/assets/icons/trading-black.png deleted file mode 100644 index 9398ba2f1..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/icons/trading-black.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/icons/training.png b/dynamic_dashboard_odoo/static/description/assets/icons/training.png deleted file mode 100644 index 884ca024d..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/icons/training.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/icons/update.png b/dynamic_dashboard_odoo/static/description/assets/icons/update.png deleted file mode 100644 index ecbc5a01a..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/icons/update.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/icons/user.png b/dynamic_dashboard_odoo/static/description/assets/icons/user.png deleted file mode 100644 index 6ffb23d9f..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/icons/user.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/icons/wrench.png b/dynamic_dashboard_odoo/static/description/assets/icons/wrench.png deleted file mode 100644 index 6c04dea0f..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/icons/wrench.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/modules/approval_image.png b/dynamic_dashboard_odoo/static/description/assets/modules/approval_image.png deleted file mode 100644 index 84fe94e80..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/modules/approval_image.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/modules/budget_image.png b/dynamic_dashboard_odoo/static/description/assets/modules/budget_image.png deleted file mode 100644 index fe6aa6fe4..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/modules/budget_image.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/modules/follow_image.png b/dynamic_dashboard_odoo/static/description/assets/modules/follow_image.png deleted file mode 100644 index 16582ca06..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/modules/follow_image.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/modules/multiple-ref_image.png b/dynamic_dashboard_odoo/static/description/assets/modules/multiple-ref_image.png deleted file mode 100644 index 3fe90e552..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/modules/multiple-ref_image.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/modules/pos_image.png b/dynamic_dashboard_odoo/static/description/assets/modules/pos_image.png deleted file mode 100644 index c5932894b..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/modules/pos_image.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/modules/pos_order_image.png b/dynamic_dashboard_odoo/static/description/assets/modules/pos_order_image.png deleted file mode 100644 index 1217263a6..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/modules/pos_order_image.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/modules/shopify_image.png b/dynamic_dashboard_odoo/static/description/assets/modules/shopify_image.png deleted file mode 100644 index c6d92c16d..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/modules/shopify_image.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/screenshots/block.png b/dynamic_dashboard_odoo/static/description/assets/screenshots/block.png deleted file mode 100644 index 463565820..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/screenshots/block.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/screenshots/chart_form.png b/dynamic_dashboard_odoo/static/description/assets/screenshots/chart_form.png deleted file mode 100644 index ae1e173ef..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/screenshots/chart_form.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/screenshots/chart_set.png b/dynamic_dashboard_odoo/static/description/assets/screenshots/chart_set.png deleted file mode 100644 index 279ebba01..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/screenshots/chart_set.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/screenshots/dashboard-screenshot.jpg b/dynamic_dashboard_odoo/static/description/assets/screenshots/dashboard-screenshot.jpg deleted file mode 100644 index eebb6f9a6..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/screenshots/dashboard-screenshot.jpg and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/screenshots/graph.png b/dynamic_dashboard_odoo/static/description/assets/screenshots/graph.png deleted file mode 100644 index f48762a3e..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/screenshots/graph.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/screenshots/hero.jpg b/dynamic_dashboard_odoo/static/description/assets/screenshots/hero.jpg deleted file mode 100644 index d6c8f5f96..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/screenshots/hero.jpg and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/screenshots/menu_create.png b/dynamic_dashboard_odoo/static/description/assets/screenshots/menu_create.png deleted file mode 100644 index 5cdd1c417..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/screenshots/menu_create.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/screenshots/responsive-screenshot-1.jpg b/dynamic_dashboard_odoo/static/description/assets/screenshots/responsive-screenshot-1.jpg deleted file mode 100644 index 065d6beba..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/screenshots/responsive-screenshot-1.jpg and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/screenshots/responsive-screenshot-2.jpg b/dynamic_dashboard_odoo/static/description/assets/screenshots/responsive-screenshot-2.jpg deleted file mode 100644 index 32f7880e7..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/screenshots/responsive-screenshot-2.jpg and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/screenshots/responsive-screenshot-3.jpg b/dynamic_dashboard_odoo/static/description/assets/screenshots/responsive-screenshot-3.jpg deleted file mode 100644 index 269f0b4cd..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/screenshots/responsive-screenshot-3.jpg and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/screenshots/screenshot-1.png b/dynamic_dashboard_odoo/static/description/assets/screenshots/screenshot-1.png deleted file mode 100644 index d06ac1f46..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/screenshots/screenshot-1.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/screenshots/screenshot-2.png b/dynamic_dashboard_odoo/static/description/assets/screenshots/screenshot-2.png deleted file mode 100644 index 74a069286..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/screenshots/screenshot-2.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/screenshots/side-bar.jpg b/dynamic_dashboard_odoo/static/description/assets/screenshots/side-bar.jpg deleted file mode 100644 index e73d625a0..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/screenshots/side-bar.jpg and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/screenshots/tile.png b/dynamic_dashboard_odoo/static/description/assets/screenshots/tile.png deleted file mode 100644 index 81d180ae8..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/screenshots/tile.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/screenshots/tile_form.png b/dynamic_dashboard_odoo/static/description/assets/screenshots/tile_form.png deleted file mode 100644 index 4cd6c6560..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/screenshots/tile_form.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/assets/screenshots/tile_set.png b/dynamic_dashboard_odoo/static/description/assets/screenshots/tile_set.png deleted file mode 100644 index f0a58fee8..000000000 Binary files a/dynamic_dashboard_odoo/static/description/assets/screenshots/tile_set.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/banner.png b/dynamic_dashboard_odoo/static/description/banner.png deleted file mode 100644 index 713d6dee5..000000000 Binary files a/dynamic_dashboard_odoo/static/description/banner.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/icon.png b/dynamic_dashboard_odoo/static/description/icon.png deleted file mode 100644 index 684313beb..000000000 Binary files a/dynamic_dashboard_odoo/static/description/icon.png and /dev/null differ diff --git a/dynamic_dashboard_odoo/static/description/index.html b/dynamic_dashboard_odoo/static/description/index.html deleted file mode 100644 index 2fb27ba0a..000000000 --- a/dynamic_dashboard_odoo/static/description/index.html +++ /dev/null @@ -1,537 +0,0 @@ - -
- -
-
- -
-
- -
-
- -
-
- Community -
- -
-
- -
- - -
-
- -
-
- -
-
- -
-
-
-

- Dashboard Views

-
-
-
-
-
-
-

- Multiple Ways To Arrange
Your Dashboard -

-

Dynamically Arrange the dashboard to get the - information that are relevant to your business, department, or a specific process or need. -

- -
-
-
-
- New -

- View top deals easily -

-

View Top deals easily from dashboards based on current data leads to - time - savings.

- -
-
-
-
- - - - -
-
-
-

- Screenshots

-
-
-
-
-
-
-
- Add new tile or graph -
- - -
-
-
- Setting up new tile -
- -
-
-
- Setting up new chart -
- -
-
-
- Setting up the tile configuration -
- -
-
-
- Setting up the chart configuration -
- -
-
-
- List all blocks created -
- -
-
-
- Add a new menu under existing menus -
- -
-
-
-
- - - - -
-
-

- Suggested Products

-
-
-
- -
-
- - - -
-
- -
-

- Our - Services

-
-
- -
-
- -
-
- Odoo - Customization
-
- -
-
- -
-
- Odoo - Implementation
-
- -
-
- -
-
- Odoo - Support
-
- - -
-
- -
-
- Hire - Odoo - Developer
-
- -
-
- -
-
- Odoo - Integration
-
- -
-
- -
-
- Odoo - Migration
-
- - -
-
- -
-
- Odoo - Consultancy
-
- -
-
- -
-
- Odoo - Implementation
-
- -
-
- -
-
- Odoo - Licensing Consultancy
-
-
-
- - - -
-
-
-

- Our - Industries

-
-
- -
-
- -
- Trading -
-

- Easily procure - and - sell your products

-
-
- -
-
- -
- POS -
-

- Easy - configuration - and convivial experience

-
-
- -
-
- -
- Education -
-

- A platform for - educational management

-
-
- -
-
- -
- Manufacturing -
-

- Plan, track and - schedule your operations

-
-
- -
-
- -
- E-commerce & Website -
-

- Mobile - friendly, - awe-inspiring product pages

-
-
- -
-
- -
- Service Management -
-

- Keep track of - services and invoice

-
-
- -
-
- -
- Restaurant -
-

- Run your bar or - restaurant methodically

-
-
- -
-
- -
- Hotel Management -
-

- An - all-inclusive - hotel management application

-
-
- -
-
- - - - - -
-
- -
-

- Need - Help?

-
-
-
- - -
- -
- - -
- -
- -
- -
-
- -
- -
- -
-
- - -
diff --git a/dynamic_dashboard_odoo/static/src/js/dynamic_dashboard.js b/dynamic_dashboard_odoo/static/src/js/dynamic_dashboard.js deleted file mode 100644 index 72680b1b6..000000000 --- a/dynamic_dashboard_odoo/static/src/js/dynamic_dashboard.js +++ /dev/null @@ -1,269 +0,0 @@ -odoo.define('dynamic_dashboard_odoo.Dashboard', function (require) { -"use strict"; - -var AbstractAction = require('web.AbstractAction'); -var ajax = require('web.ajax'); -var core = require('web.core'); -var rpc = require('web.rpc'); -var session = require('web.session'); -var web_client = require('web.web_client'); -var _t = core._t; -var QWeb = core.qweb; - -var DynamicDashboard = AbstractAction.extend({ - template: 'dynamic_dashboard', - events: { - 'click .add_block': '_onClick_add_block', - 'click .add_grapgh': '_onClick_add_grapgh', - 'click .block_setting': '_onClick_block_setting', - 'click .tile': '_onClick_tile', - }, - - init: function(parent, context) { - this.action_id = context['id']; - this._super(parent, context); - this.block_ids = [] - }, - - start: function() { - var self = this; - this.set("title", 'Dashboard'); - - return this._super().then(function() { - self.render_dashboards(); - }); - }, - - - willStart: function() { - var self = this; - return $.when(ajax.loadLibs(this), this._super()).then(function() { - return self.fetch_data(); - }); - }, - - fetch_data: function() { - var self = this; - var def1 = this._rpc({ - model: 'dashboard.block', - method: 'get_dashboard_vals', - args: [[],this.action_id] - }).then(function(result) { - self.block_ids = result; - }); - return $.when(def1); - }, - - get_colors : function(x_axis) { - var color = [] - for (var j = 0; j < x_axis.length; j++) { - var r = Math.floor(Math.random() * 255); - var g = Math.floor(Math.random() * 255); - var b = Math.floor(Math.random() * 255); - color.push("rgb(" + r + "," + g + "," + b + ")"); - } - return color - }, - - get_values_bar : function(block){ - var labels = block['x_axis'] - var data = { - labels: labels, - datasets: [{ - label: "", - data: block['y_axis'], - backgroundColor: this.get_colors(block['x_axis']), - borderColor: 'rgba(200, 200, 200, 0.75)', - borderWidth: 1 - }] - }; - - var options = { - scales: { - y: { - beginAtZero: true - } - } - }, - bar_data = [data,options] - return bar_data; - }, - - get_values_pie : function(block){ - var data = { - labels: block['x_axis'], - datasets: [{ - label: '', - data: block['y_axis'], - backgroundColor: this.get_colors(block['x_axis']), - hoverOffset: 4 - }] - }; - var options = { }, - pie_data = [data,options] - return pie_data; - }, - - get_values_line : function(block){ - var labels = block['x_axis'] - var data = { - labels: labels, - datasets: [{ - label: '', - data: block['y_axis'], - fill: false, - borderColor: 'rgb(75, 192, 192)', - tension: 0.1 - }] - }; - var options = { }, - line_data = [data,options] - return line_data; - - }, - - get_values_doughnut : function(block){ - var data = { - labels: block['x_axis'], - datasets: [{ - label: '', - data: block['y_axis'], - backgroundColor: this.get_colors(block['x_axis']), - hoverOffset: 4 - }] - }; - var options = { }, - doughnut_data = [data,options] - return doughnut_data; - - - }, - - get_values_radar : function(block){ - var data = { - labels: block['x_axis'], - datasets: [{ - label: '', - data: block['y_axis'], - fill: true, - backgroundColor: 'rgba(255, 99, 132, 0.2)', - borderColor: 'rgb(255, 99, 132)', - pointBackgroundColor: 'rgb(255, 99, 132)', - pointBorderColor: '#fff', - pointHoverBackgroundColor: '#fff', - pointHoverBorderColor: 'rgb(255, 99, 132)' - }] - }; - var options = { - elements: { - line: { - borderWidth: 3 - } - } - }, - radar_data = [data,options] - return radar_data; - }, - - render_dashboards: function() { - var self = this; - _.each(this.block_ids, function(block) { - if (block['type'] == 'tile') { - self.$('.o_dynamic_dashboard').append(QWeb.render('DynamicDashboardTile', {widget: block})); - } - else{ - self.$('.o_dynamic_chart').append(QWeb.render('DynamicDashboardChart', {widget: block})); - var element = $('[data-id=' + block['id'] + ']') - if (!('x_axis' in block)){ - return false - } - var ctx =self.$('.chart_graphs').last() - var type = block['graph_type'] - var chart_type = 'self.get_values_' + `${type}(block)` - var data = eval(chart_type) - //create Chart class object - var chart = new Chart(ctx, { - type: type, - data: data[0], - options: data[1] - }); - } - }); - }, - - _onClick_block_setting : function(event){ - event.stopPropagation(); - var self = this; - var id = $(event.currentTarget).closest('.block').attr('data-id'); - this.do_action({ - type: 'ir.actions.act_window', - res_model: 'dashboard.block', - view_mode: 'form', - res_id: parseInt(id), - views: [[false,'form']], - context: {'form_view_initial_mode': 'edit'}, - }); - }, - - _onClick_add_block : function(e){ - var self = this; - var type = $(e.currentTarget).attr('data-type'); - ajax.jsonRpc('/create/tile', 'call', { - 'type' : type, - 'action_id' : self.action_id - }).then(function (result) { - if(result['type'] == 'tile'){ - self.$('.o_dynamic_dashboard').append(QWeb.render('DynamicDashboardTile', {widget: result})); - } - else{ - self.$('.o_dynamic_chart').append(QWeb.render('DynamicDashboardChart', {widget: result})); - var element = $('[data-id=' + result['id'] + ']') - var ctx =self.$('.chart_graphs').last() - var options = { - type: 'bar', - data: { - labels: [], - datasets: [ - { - data: [], - borderWidth: 1 - }, - ] - }, - } - var chart = new Chart(ctx, { - type: "bar", - data: options - }); - } - }); - }, - - _onClick_tile : function(e){ - e.stopPropagation(); - var self = this; - var id = $(e.currentTarget).attr('data-id'); - ajax.jsonRpc('/tile/details', 'call', { - 'id': id - }).then(function (result) { - self.do_action({ - name : result['model_name'], - type: 'ir.actions.act_window', - res_model:result['model'] , - view_mode: 'tree,form', - views: [[false, 'list'], [false, 'form']], - domain: result['filter'] - }); - }); - }, - - - -}); - - -core.action_registry.add('dynamic_dashboard', DynamicDashboard); - -return DynamicDashboard; - -}); diff --git a/dynamic_dashboard_odoo/static/src/scss/style.scss b/dynamic_dashboard_odoo/static/src/scss/style.scss deleted file mode 100644 index 0a174cf44..000000000 --- a/dynamic_dashboard_odoo/static/src/scss/style.scss +++ /dev/null @@ -1,94 +0,0 @@ -.card{ - border: none; - border-radius: 0px; - box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px; - -webkit-box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px; - -moz-box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px; -} -.card-header{ - background-color: transparent; - border: none; -} -:root { - /* Colors */ - --green: #00C689; - --blue: #3DA5F4; - --red: #F1536E; - --yellow: #FDA006; - /*Fonts*/ - --primary-font: 'Roboto', sans-serif; - } - - html .o_web_client > .o_action_manager { - overflow:auto; - } - - .bg-green { - background-color: var(--green); - } - - .bg-blue { - background-color: var(--blue); - } - - .bg-red { - background-color: var(--red); - } - - .bg-yellow { - background-color: var(--yellow); - } - - .text-color-yellow { - color: var(--yellow); - } - - .text-color-green { - color: var(--green); - } - - .text-color-blue { - color: var(--blue); - } - - .text-color-red { - color: var(--red); - } - - .text-color-yellow { - color: var(--yellow); - } - - .tile-container { - padding: 3.2rem 1.5rem; - border-radius: 2rem; - } - - .tile-container__icon-container { - border-radius: 50%; - width: 4.75rem; - height: 4.75rem; - font-size: 28px; - } - - .status-container__title { - font-family: var(--primary-font); - font-weight: 500; - font-size: 1.5rem; - line-height: 1.5rem; - } - - .status-container__figures { - font-family: var(--primary-font); - } - - .status-container__figures>h3 { - font-weight: 700; - font-size: 1.5rem; - line-height: 1.813rem; - } - - .tile-container__setting-icon { - top: 0.638rem; - right: 1rem; - } \ No newline at end of file diff --git a/dynamic_dashboard_odoo/static/src/xml/dynamic_dashboard_template.xml b/dynamic_dashboard_odoo/static/src/xml/dynamic_dashboard_template.xml deleted file mode 100644 index ab0e30642..000000000 --- a/dynamic_dashboard_odoo/static/src/xml/dynamic_dashboard_template.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - -
- - -
-
-
-
-
-
- -
-
- -
- -
-
-

-
-

-
-
-
-
-
- - - - - - Dashboard - - -
-
-
-
-
-

-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
- -
\ No newline at end of file diff --git a/dynamic_dashboard_odoo/views/dashboard_menu_view.xml b/dynamic_dashboard_odoo/views/dashboard_menu_view.xml deleted file mode 100644 index 0f5e6b92c..000000000 --- a/dynamic_dashboard_odoo/views/dashboard_menu_view.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - dashboard.menu.form.view - dashboard.menu - -
- - - - - - - - - - -
-
-
- - - dashboard.menu.tree.view - dashboard.menu - - - - - - - - - - Dashboard Menu - ir.actions.act_window - dashboard.menu - tree,form - - - - - -
\ No newline at end of file diff --git a/dynamic_dashboard_odoo/views/dashboard_view.xml b/dynamic_dashboard_odoo/views/dashboard_view.xml deleted file mode 100644 index f4f76bed9..000000000 --- a/dynamic_dashboard_odoo/views/dashboard_view.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - Dashboard - dynamic_dashboard - - - - - -