diff --git a/portal_dashboard/README.rst b/portal_dashboard/README.rst new file mode 100644 index 000000000..45c1d034f --- /dev/null +++ b/portal_dashboard/README.rst @@ -0,0 +1,43 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +Portal Dashboard for Odoo 16 +================================================ +* Portal Dashboard for Odoo 16 used to get a dashboard view for my portal in website + +Installation +============ + - www.odoo.com/documentation/16.0/setup/install.html + - Install our custom addon + +License +------- +AFFERO General Public License, Version 3 (AGPL v3). +(https://www.odoo.com/documentation/16.0/legal/licenses.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer:(V16) Megha AP + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ + diff --git a/portal_dashboard/__init__.py b/portal_dashboard/__init__.py new file mode 100644 index 000000000..0756422bf --- /dev/null +++ b/portal_dashboard/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Megha A P (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import controllers +from . import models diff --git a/portal_dashboard/__manifest__.py b/portal_dashboard/__manifest__.py new file mode 100644 index 000000000..e259a2941 --- /dev/null +++ b/portal_dashboard/__manifest__.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Megha A P (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ + +{ + 'name': "Portal Dashboard", + 'version': '16.0.1.0.0', + 'summary': """Portal Dashboard to view the my account in dashboard view""", + 'description': 'View of my account in portal view is changed to dashboard ' + 'view for better user experience', + 'category': 'Extra Tools', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base', 'sale', 'project', 'crm', 'purchase', 'website'], + 'images': [ + '/static/description/banner.png', + ], + 'data': [ + 'views/res_config_settings_views.xml', + 'views/dashboard.xml', + ], + 'assets': { + 'web.assets_frontend': [ + 'portal_dashboard/static/src/js/portal_dashboard_graph.js', + 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.9.1/chart.min.js', + '/portal_dashboard/static/src/scss/style.scss' + ] + }, + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': True, + 'application': False, +} diff --git a/portal_dashboard/controllers/__init__.py b/portal_dashboard/controllers/__init__.py new file mode 100644 index 000000000..647ea2487 --- /dev/null +++ b/portal_dashboard/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Megha A P (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import portal_dashboard diff --git a/portal_dashboard/controllers/portal_dashboard.py b/portal_dashboard/controllers/portal_dashboard.py new file mode 100644 index 000000000..f17461acd --- /dev/null +++ b/portal_dashboard/controllers/portal_dashboard.py @@ -0,0 +1,233 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Megha A P (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo.http import request, route +from odoo.addons.portal.controllers.portal import CustomerPortal + + +class DashboardPortal(CustomerPortal): + """ This class is used to super already existing dashboard portal to + change the template""" + @route(['/my', '/my/home'], type='http', auth="user", website=True) + def home(self, **kw): + """Replaces already existing work flow of portal view to redirect to + new template with record values and count""" + + user = request.env.user.id + partners = request.env.user + group_id = request.env.ref('base.group_user') + + sale_order = request.env['sale.order'].sudo() + purchase_order = request.env['purchase.order'].sudo() + account_move = request.env['account.move'] + project = request.env['project.project'].sudo() + task = request.env['project.task'].sudo() + config_parameters = request.env['ir.config_parameter'].sudo() + + number_project = "" + projects_limited = "" + tasks_limited = "" + number_account = "" + invoices_limited = "" + + show_project = request.env[ + 'ir.config_parameter' + ].sudo().get_param('portal_dashboard.is_show_project') + show_account = request.env['ir.config_parameter'].sudo().get_param( + 'portal_dashboard.is_show_recent_invoice_bill') + show_so_q = request.env[ + 'ir.config_parameter' + ].sudo().get_param('portal_dashboard.is_show_recent_so_q') + show_po_rfq = request.env[ + 'ir.config_parameter' + ].sudo().get_param('portal_dashboard.is_show_recent_po_rfq') + + number_so = "" + sale_orders_limited = "" + quotations_limited = "" + + number_po = "" + purchase_orders_limited = "" + rfq_limited = "" + + if group_id in partners.groups_id: + if show_so_q: + number_so = request.env[ + 'ir.config_parameter' + ].sudo().get_param('portal_dashboard.sale_count', 0) + + sale_orders_limited = sale_order.search([ + ('user_id', '=', user), + ('state', 'not in', ['draft', 'sent']) + ], limit=int(number_so)) + + quotations_limited = sale_order.search([ + ('user_id', '=', user), + ('state', 'in', ['sent']) + ], limit=int(number_so)) + + if show_po_rfq: + number_po = config_parameters.get_param( + 'portal_dashboard.purchase_count', 0) + purchase_orders_limited = purchase_order.search([ + ('user_id', '=', user), + ('state', 'not in', ['draft', 'sent', 'to approve']) + ], limit=int(number_po)) + rfq_limited = purchase_order.search([ + ('user_id', '=', user), + ('state', 'in', ['draft', 'sent', 'to approve']) + ], limit=int(number_po)) + + if show_project: + number_project = config_parameters.get_param( + 'portal_dashboard.project_count', 0) + projects_limited = project.search([], + limit=int(number_project)) + tasks_limited = task.search([], limit=int(number_project)) + + if show_account: + number_account = config_parameters.get_param( + 'portal_dashboard.account_count', 0) + invoices_limited = account_move.search([ + ('invoice_user_id', '=', user), + ('state', 'not in', ['draft', 'cancel']) + ], limit=int(number_account)) + + sale_orders = sale_order.search([ + ('user_id', '=', user), + ('state', 'not in', ['draft', 'sent']) + ]) + + quotations = sale_order.search([ + ('user_id', '=', user), + ('state', 'in', ['sent']) + ]) + purchase_orders = purchase_order.search([ + ('user_id', '=', user), + ('state', 'not in', ['draft', 'sent', 'to approve']) + ]) + rfq = purchase_order.search([ + ('user_id', '=', user), + ('state', 'in', ['sent', 'to approve']) + ]) + + projects = project.search([]) + tasks = task.search([]) + invoices = account_move.search([ + ('invoice_user_id', '=', user), + ('state', 'not in', ['draft', 'cancel']) + ]) + else: + if show_so_q: + number_so = config_parameters.get_param( + 'portal_dashboard.sale_count', 0) + + sale_orders_limited = sale_order.search([ + ('partner_id', '=', partners.partner_id.id), + ('state', 'not in', ['draft', 'sent']) + ], limit=int(number_so)) + + quotations_limited = sale_order.search([ + ('partner_id', '=', partners.partner_id.id), + ('state', 'in', ['sent']) + ], limit=int(number_so)) + + if show_po_rfq: + number_po = config_parameters.get_param( + 'portal_dashboard.purchase_count', 0) + purchase_orders_limited = purchase_order.search([ + ('partner_id', '=', partners.partner_id.id), + ('state', 'not in', ['draft', 'sent', 'to approve']) + ], limit=int(number_po)) + rfq_limited = purchase_order.search([ + ('partner_id', '=', partners.partner_id.id), + ('state', 'in', ['draft', 'sent', 'to approve']) + ], limit=int(number_po)) + + if show_project: + number_project = config_parameters.get_param( + 'portal_dashboard.project_count', 0) + projects_limited = project.search([('user_id', '=', user)], + limit=int(number_project)) + tasks_limited = task.search([('user_id', '=', user)], + limit=int(number_project)) + + if show_account: + number_account = config_parameters.get_param( + 'portal_dashboard.account_count', 0) + invoices_limited = account_move.search([ + ('partner_id', '=', partners.partner_id.id), + ('state', 'not in', ['draft', 'cancel']) + ], limit=int(number_account)) + + sale_orders = sale_order.search([ + ('partner_id', '=', partners.partner_id.id), + ('state', 'not in', ['draft', 'sent']) + ]) + + quotations = sale_order.search([ + ('partner_id', '=', partners.partner_id.id), + ('state', 'in', ['sent']) + ]) + purchase_orders = purchase_order.search([ + ('partner_id', '=', partners.partner_id.id), + ('state', 'not in', ['draft', 'sent', 'to approve']) + ]) + rfq = purchase_order.search([ + ('partner_id', '=', partners.partner_id.id), + ('state', 'in', ['sent', 'to approve']) + ]) + + projects = project.search([ + ('user_id', '=', user) + ]) + tasks = task.search([('user_id', '=', user)]) + invoices = account_move.search([ + ('partner_id', '=', partners.partner_id.id), + ('state', 'not in', ['draft', 'cancel']) + ]) + + values = self._prepare_portal_layout_values() + values['sale_order_portal'] = sale_orders + values['quotation_portal'] = quotations + values['purchase_orders_portal'] = purchase_orders + values['rfq_portal'] = rfq + values['projects_portal'] = projects + values['tasks_portal'] = tasks + values['invoices_portal'] = invoices + values['number_so_portal'] = number_so + values['number_po_portal'] = number_po + values['number_account_portal'] = number_account + values['number_project_portal'] = number_project + values['sale_orders_limited'] = sale_orders_limited + values['quotations_limited'] = quotations_limited + values['purchase_orders_limited'] = purchase_orders_limited + values['rfq_limited'] = rfq_limited + values['invoices_limited'] = invoices_limited + values['projects_limited'] = projects_limited + values['tasks_limited'] = tasks_limited + values['show_so_q'] = show_so_q + values['show_po_rfq'] = show_po_rfq + values['show_project'] = show_project + values['show_account'] = show_account + + return request.render("portal_dashboard.replace_dashboard_portal_view", + values) diff --git a/portal_dashboard/doc/RELEASE_NOTES.md b/portal_dashboard/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..b837d3c58 --- /dev/null +++ b/portal_dashboard/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 22.02.2023 +#### Version 16.0.1.0.0 +#### ADD +- Initial commit for Portal Dashboard diff --git a/portal_dashboard/models/__init__.py b/portal_dashboard/models/__init__.py new file mode 100644 index 000000000..3995503e2 --- /dev/null +++ b/portal_dashboard/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Megha A P (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import res_config_settings +from . import chart_data diff --git a/portal_dashboard/models/chart_data.py b/portal_dashboard/models/chart_data.py new file mode 100644 index 000000000..793480ed7 --- /dev/null +++ b/portal_dashboard/models/chart_data.py @@ -0,0 +1,89 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Megha A P (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import api, models + + +class ChartData(models.Model): + """Used to set graphs in portal dashboard template""" + _name = 'portal.dashboard.data' + _description = 'To get portal dashboard data' + + @api.model + def datafetch(self): + """To fetch datas of backend documents to show in the portal + dashboard template depending on count of record""" + + partner = self.env.user.id + partners = self.env.user + group_id = self.env.ref('base.group_user') + all_accounting = [] + if group_id in partners.groups_id: + + all_invoice = self.env['account.move'].search([ + ('state', 'not in', ['draft', 'cancel']) + ]) + + invoice_count = len(all_invoice) + all_accounting.append(invoice_count) + else: + all_invoice = self.env['account.move'].search([ + ('partner_id','=', partners.partner_id.id), + ('state', 'not in', ['draft', 'cancel']) + ]) + + invoice_count = len(all_invoice) + all_accounting.append(invoice_count) + + all_so = [] + sale_order = self.env['sale.order'].search([ + ('user_id', '=', partner), + ('state', 'not in', ['draft', 'sent'])]) + + quotations = self.env['sale.order'].search([('user_id', '=', partner), + ('state', 'in', ['sent']) + ]) + + so_count = len(sale_order) + all_so.append(so_count) + q_count = len(quotations) + all_so.append(q_count) + + all_purchase_order = [] + purchase_order = self.env['purchase.order'].search([ + ('user_id', '=', partner), + ('state', 'not in', ['draft', 'sent', 'to approve']) + ]) + rfqs = self.env['purchase.order'].search([ + ('user_id', '=', partner), + ('state', 'in', ['sent', 'to approve']) + ]) + + po_count = len(purchase_order) + all_purchase_order.append(po_count) + rfq_count = len(rfqs) + all_purchase_order.append(rfq_count) + + return { + 'target': all_so, + 'target_po': all_purchase_order, + 'target_accounting': all_accounting + } diff --git a/portal_dashboard/models/res_config_settings.py b/portal_dashboard/models/res_config_settings.py new file mode 100644 index 000000000..cc2cb17f7 --- /dev/null +++ b/portal_dashboard/models/res_config_settings.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Megha A P (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + """This class is used to inherit settings and add some fields to get + number of count of data that needs to + show in the dashboard""" + _inherit = 'res.config.settings' + + is_show_recent_so_q = fields.Boolean( + string='Is show recent quotation and sale order table', + config_parameter='portal_dashboard.is_show_recent_so_q') + sale_count = fields.Integer( + string='How many recent records do you want to show?', + config_parameter='portal_dashboard.sale_count') + is_show_recent_po_rfq = fields.Boolean( + string='Is show recent RFQ table?', + config_parameter='portal_dashboard.is_show_recent_po_rfq') + purchase_count = fields.Integer( + string='How many recent records do you want to show?', + config_parameter='portal_dashboard.purchase_count') + is_show_project = fields.Boolean( + string='Is show project task table?', + config_parameter='portal_dashboard.is_show_project') + project_count = fields.Integer( + string='How many recent records do you want to show?', + config_parameter='portal_dashboard.project_count') + is_show_recent_invoice_bill = fields.Boolean( + string='Is show recent invoice/bill table?', + config_parameter='portal_dashboard.is_show_recent_invoice_bill') + account_count = fields.Integer( + string='How many recent records do you want to show?', + config_parameter='portal_dashboard.account_count') diff --git a/portal_dashboard/static/description/assets/icons/check.png b/portal_dashboard/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/check.png differ diff --git a/portal_dashboard/static/description/assets/icons/chevron.png b/portal_dashboard/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/chevron.png differ diff --git a/portal_dashboard/static/description/assets/icons/cogs.png b/portal_dashboard/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/cogs.png differ diff --git a/portal_dashboard/static/description/assets/icons/consultation.png b/portal_dashboard/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/consultation.png differ diff --git a/portal_dashboard/static/description/assets/icons/ecom-black.png b/portal_dashboard/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/ecom-black.png differ diff --git a/portal_dashboard/static/description/assets/icons/education-black.png b/portal_dashboard/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/education-black.png differ diff --git a/portal_dashboard/static/description/assets/icons/hotel-black.png b/portal_dashboard/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/hotel-black.png differ diff --git a/portal_dashboard/static/description/assets/icons/license.png b/portal_dashboard/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/license.png differ diff --git a/portal_dashboard/static/description/assets/icons/lifebuoy.png b/portal_dashboard/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/lifebuoy.png differ diff --git a/portal_dashboard/static/description/assets/icons/manufacturing-black.png b/portal_dashboard/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/manufacturing-black.png differ diff --git a/portal_dashboard/static/description/assets/icons/pos-black.png b/portal_dashboard/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/pos-black.png differ diff --git a/portal_dashboard/static/description/assets/icons/puzzle.png b/portal_dashboard/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/puzzle.png differ diff --git a/portal_dashboard/static/description/assets/icons/restaurant-black.png b/portal_dashboard/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/restaurant-black.png differ diff --git a/portal_dashboard/static/description/assets/icons/service-black.png b/portal_dashboard/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/service-black.png differ diff --git a/portal_dashboard/static/description/assets/icons/trading-black.png b/portal_dashboard/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/trading-black.png differ diff --git a/portal_dashboard/static/description/assets/icons/training.png b/portal_dashboard/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/training.png differ diff --git a/portal_dashboard/static/description/assets/icons/update.png b/portal_dashboard/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/update.png differ diff --git a/portal_dashboard/static/description/assets/icons/user.png b/portal_dashboard/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/user.png differ diff --git a/portal_dashboard/static/description/assets/icons/wrench.png b/portal_dashboard/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/wrench.png differ diff --git a/portal_dashboard/static/description/assets/misc/categories.png b/portal_dashboard/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/portal_dashboard/static/description/assets/misc/categories.png differ diff --git a/portal_dashboard/static/description/assets/misc/check-box.png b/portal_dashboard/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/portal_dashboard/static/description/assets/misc/check-box.png differ diff --git a/portal_dashboard/static/description/assets/misc/compass.png b/portal_dashboard/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/portal_dashboard/static/description/assets/misc/compass.png differ diff --git a/portal_dashboard/static/description/assets/misc/corporate.png b/portal_dashboard/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/portal_dashboard/static/description/assets/misc/corporate.png differ diff --git a/portal_dashboard/static/description/assets/misc/customer-support.png b/portal_dashboard/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/portal_dashboard/static/description/assets/misc/customer-support.png differ diff --git a/portal_dashboard/static/description/assets/misc/cybrosys-logo.png b/portal_dashboard/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/portal_dashboard/static/description/assets/misc/cybrosys-logo.png differ diff --git a/portal_dashboard/static/description/assets/misc/features.png b/portal_dashboard/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/portal_dashboard/static/description/assets/misc/features.png differ diff --git a/portal_dashboard/static/description/assets/misc/logo.png b/portal_dashboard/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/portal_dashboard/static/description/assets/misc/logo.png differ diff --git a/portal_dashboard/static/description/assets/misc/pictures.png b/portal_dashboard/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/portal_dashboard/static/description/assets/misc/pictures.png differ diff --git a/portal_dashboard/static/description/assets/misc/pie-chart.png b/portal_dashboard/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/portal_dashboard/static/description/assets/misc/pie-chart.png differ diff --git a/portal_dashboard/static/description/assets/misc/right-arrow.png b/portal_dashboard/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/portal_dashboard/static/description/assets/misc/right-arrow.png differ diff --git a/portal_dashboard/static/description/assets/misc/star.png b/portal_dashboard/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/portal_dashboard/static/description/assets/misc/star.png differ diff --git a/portal_dashboard/static/description/assets/misc/support.png b/portal_dashboard/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/portal_dashboard/static/description/assets/misc/support.png differ diff --git a/portal_dashboard/static/description/assets/misc/whatsapp.png b/portal_dashboard/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/portal_dashboard/static/description/assets/misc/whatsapp.png differ diff --git a/portal_dashboard/static/description/assets/modules/1.png b/portal_dashboard/static/description/assets/modules/1.png new file mode 100644 index 000000000..5238bdeab Binary files /dev/null and b/portal_dashboard/static/description/assets/modules/1.png differ diff --git a/portal_dashboard/static/description/assets/modules/2.png b/portal_dashboard/static/description/assets/modules/2.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/portal_dashboard/static/description/assets/modules/2.png differ diff --git a/portal_dashboard/static/description/assets/modules/3.png b/portal_dashboard/static/description/assets/modules/3.png new file mode 100644 index 000000000..3c3ff1afb Binary files /dev/null and b/portal_dashboard/static/description/assets/modules/3.png differ diff --git a/portal_dashboard/static/description/assets/modules/4.png b/portal_dashboard/static/description/assets/modules/4.png new file mode 100644 index 000000000..3fae4631e Binary files /dev/null and b/portal_dashboard/static/description/assets/modules/4.png differ diff --git a/portal_dashboard/static/description/assets/modules/5.gif b/portal_dashboard/static/description/assets/modules/5.gif new file mode 100644 index 000000000..2a5f8e659 Binary files /dev/null and b/portal_dashboard/static/description/assets/modules/5.gif differ diff --git a/portal_dashboard/static/description/assets/modules/6.png b/portal_dashboard/static/description/assets/modules/6.png new file mode 100644 index 000000000..7f2815273 Binary files /dev/null and b/portal_dashboard/static/description/assets/modules/6.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/01.png b/portal_dashboard/static/description/assets/screenshots/01.png new file mode 100644 index 000000000..0fcd798ea Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/01.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/02.png b/portal_dashboard/static/description/assets/screenshots/02.png new file mode 100644 index 000000000..51839f7bc Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/02.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/03.png b/portal_dashboard/static/description/assets/screenshots/03.png new file mode 100644 index 000000000..e8608d7dd Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/03.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/04.png b/portal_dashboard/static/description/assets/screenshots/04.png new file mode 100644 index 000000000..a7ac520f2 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/04.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/05.png b/portal_dashboard/static/description/assets/screenshots/05.png new file mode 100644 index 000000000..049c9e087 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/05.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/06.png b/portal_dashboard/static/description/assets/screenshots/06.png new file mode 100644 index 000000000..f87195e1e Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/06.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/07.png b/portal_dashboard/static/description/assets/screenshots/07.png new file mode 100644 index 000000000..9d3edd1f3 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/07.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/08.png b/portal_dashboard/static/description/assets/screenshots/08.png new file mode 100644 index 000000000..2d010f031 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/08.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/v16-hero.gif b/portal_dashboard/static/description/assets/screenshots/v16-hero.gif new file mode 100644 index 000000000..51c494472 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/v16-hero.gif differ diff --git a/portal_dashboard/static/description/banner.png b/portal_dashboard/static/description/banner.png new file mode 100644 index 000000000..8eb34c3c5 Binary files /dev/null and b/portal_dashboard/static/description/banner.png differ diff --git a/portal_dashboard/static/description/icon.png b/portal_dashboard/static/description/icon.png new file mode 100644 index 000000000..1a7a21ff8 Binary files /dev/null and b/portal_dashboard/static/description/icon.png differ diff --git a/portal_dashboard/static/description/index.html b/portal_dashboard/static/description/index.html new file mode 100644 index 000000000..a1be9f8f9 --- /dev/null +++ b/portal_dashboard/static/description/index.html @@ -0,0 +1,565 @@ +
+ +
+ +
+
+ Community +
+
+
+ +
+
+
+ +

+ Portal Dashboard

+

+ Change the design of my portal view in website

+ + +
+
+
+ + +
+ + +
+
+ +
+

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ This application allows to Change the theme of my portal view in website +
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + Community Support. +
+
+ + + Allows to view table view of sale order, quotations, purchase orders, RFQ s, invoices, bills, projects and tasks +
+
+ + + Can set the number of document wants to show in the table + +
+
+ + + Able to view documents directly from the dashboard +
+
+ + + Graphical presentation of analysis of sales, purchase and accounts are available +
+
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

+ You can see these fields in the settings to set the table view +

+ +
+ +
+

+ These are the different documents and their counts shown in card format

+ +
+ +
+

+ Here you can click on the view option to view each documents, for example quotations as like this

+ +
+ +
+

+ you can see table representation of documents according to the number of document needed set in settings +

+

+ +
+ +
+

+ Also there are analysis pie chart for sales, purchase and accounting +

+

+

+ +
+ +
+
+ + + +
+
+ +
+

Related + 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

+
+
+
+
+ + + + +
+
+ +
+

Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/portal_dashboard/static/src/images/bill.png b/portal_dashboard/static/src/images/bill.png new file mode 100644 index 000000000..c6db989e0 Binary files /dev/null and b/portal_dashboard/static/src/images/bill.png differ diff --git a/portal_dashboard/static/src/images/inv.png b/portal_dashboard/static/src/images/inv.png new file mode 100644 index 000000000..835491d19 Binary files /dev/null and b/portal_dashboard/static/src/images/inv.png differ diff --git a/portal_dashboard/static/src/images/po.png b/portal_dashboard/static/src/images/po.png new file mode 100644 index 000000000..f7134854c Binary files /dev/null and b/portal_dashboard/static/src/images/po.png differ diff --git a/portal_dashboard/static/src/images/project.png b/portal_dashboard/static/src/images/project.png new file mode 100644 index 000000000..5fa2995ce Binary files /dev/null and b/portal_dashboard/static/src/images/project.png differ diff --git a/portal_dashboard/static/src/images/q1.png b/portal_dashboard/static/src/images/q1.png new file mode 100644 index 000000000..9f1680dc5 Binary files /dev/null and b/portal_dashboard/static/src/images/q1.png differ diff --git a/portal_dashboard/static/src/images/rfq.png b/portal_dashboard/static/src/images/rfq.png new file mode 100644 index 000000000..72b124603 Binary files /dev/null and b/portal_dashboard/static/src/images/rfq.png differ diff --git a/portal_dashboard/static/src/images/so.png b/portal_dashboard/static/src/images/so.png new file mode 100644 index 000000000..786c8eeb5 Binary files /dev/null and b/portal_dashboard/static/src/images/so.png differ diff --git a/portal_dashboard/static/src/images/task.png b/portal_dashboard/static/src/images/task.png new file mode 100644 index 000000000..cddebeb28 Binary files /dev/null and b/portal_dashboard/static/src/images/task.png differ diff --git a/portal_dashboard/static/src/js/portal_dashboard_graph.js b/portal_dashboard/static/src/js/portal_dashboard_graph.js new file mode 100644 index 000000000..a7384fd65 --- /dev/null +++ b/portal_dashboard/static/src/js/portal_dashboard_graph.js @@ -0,0 +1,123 @@ +odoo.define('portal_dashboard.PortalDashBoardGraph', function (require){ +"use strict"; +var rpc = require('web.rpc'); +var publicWidget = require('web.public.widget'); +const Dialog = require('web.Dialog'); +const {_t, qweb} = require('web.core'); +const session = require('web.session'); + +publicWidget.registry.PortalDashBoardGraph = publicWidget.Widget.extend({ + selector: '.portal_dashboard', + init: function(parent, context) { + this._super(parent, context); + }, + start: function() { + this.set("title", 'Portal Dashboard'); + this.fetch_data() + }, + + fetch_data: function(){ +// To fetch data for showing in dashboard as graph + var def = this._rpc({ + model: 'portal.dashboard.data', + method: 'datafetch' + }).then(function(result){ +// To set graph for sales + const DATA_COUNT_so = ['Sale order', 'Quotations']; + const NUMBER_CFG_so = {count: DATA_COUNT_so, min: 0, max: 100}; + const labels_1 = ['Sale order', 'Quotations']; + const data_1 = { + labels: labels_1, + datasets: [ + { + label: 'New', + data: result['target'], + backgroundColor: ['rgb(47, 79, 79)', 'rgb(15, 127, 127)'], + } + ] + }; + const config_1 = { + type: 'pie', + data: data_1, + options: { + responsive: true, + plugins: { + legend: { + position: 'top', + }, + title: { + display: true, + text: 'Sales Analysis' + } + } + }, + }; +// To set graph for purchase + const DATA_COUNT_po = ['Purchase order', 'RFQ']; + const NUMBER_CFG_po = {count: DATA_COUNT_po, min: 0, max: 100}; + const labels_2 = ['Purchase order', 'RFQ']; + const data_2 = { + labels: labels_2, + datasets: [ + { + label: 'New', + data: result['target_po'], + backgroundColor: ['rgb(107, 99, 99)', 'rgb(135, 147, 147)'], + } + ] + }; + const config_2 = { + type: 'pie', + data: data_2, + options: { + responsive: true, + plugins: { + legend: { + position: 'top', + }, + title: { + display: true, + text: 'Purchase Analysis' + } + } + }, + }; +// To set graph for account moves + const DATA_COUNT_invoice = ['Invoices', 'Bill']; + const NUMBER_CFG_invoice = {count: DATA_COUNT_invoice, min: 0, max: 100}; + const labels_3 = ['Invoices', 'Bill']; + const data_3 = { + labels: labels_3, + datasets: [ + { + label: 'New', + data: result['target_accounting'], + backgroundColor: ['rgb(207, 99, 99)', 'rgb(235, 187, 147)'], + } + ] + }; + const config_3 = { + type: 'pie', + data: data_3, + options: { + responsive: true, + plugins: { + legend: { + position: 'top', + }, + title: { + display: true, + text: 'Accounting Analysis' + } + } + }, + }; + + const sales_pie = new Chart(document.getElementById('sales_pie'),config_1); + const purchase_pie = new Chart(document.getElementById('purchase_pie'),config_2); + const account_pie = new Chart(document.getElementById('account_pie'),config_3); + }); + return $.when(def); + }, + }); +}) diff --git a/portal_dashboard/static/src/scss/style.scss b/portal_dashboard/static/src/scss/style.scss new file mode 100644 index 000000000..6baa82821 --- /dev/null +++ b/portal_dashboard/static/src/scss/style.scss @@ -0,0 +1,40 @@ +.number_project{ + background: blue; + color:yellow; + display:grid; + justify-content:center; + height: 48px; + align-items: center; + font-size: 22px; +} +.main_box{ + width:300px; + height:200px; + margin-left:20px; + display:inline-block; +} +.button_style{ + cursor: pointer; + border:none; + background:none; +} +card_footer{ + display: flex; + justify-content: center; +} +container_style{ + width:100%; + margin-top:2%; + margin-left:16%; + border:1px solid gray; +} +card_text{ + width:50%; + height:50%; + margin-left:auto; + margin-right:auto; +} +second_div{ + width:76%; + padding-bottom:1%; +} \ No newline at end of file diff --git a/portal_dashboard/views/dashboard.xml b/portal_dashboard/views/dashboard.xml new file mode 100644 index 000000000..622c9b6a8 --- /dev/null +++ b/portal_dashboard/views/dashboard.xml @@ -0,0 +1,559 @@ + + + + diff --git a/portal_dashboard/views/res_config_settings_views.xml b/portal_dashboard/views/res_config_settings_views.xml new file mode 100644 index 000000000..6c2156015 --- /dev/null +++ b/portal_dashboard/views/res_config_settings_views.xml @@ -0,0 +1,177 @@ + + + + res.config.settings.view.form.inherit.delivery + res.config.settings + + + + +
+
+

Portal Dashboard

+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+