diff --git a/portal_dashboard/README.rst b/portal_dashboard/README.rst new file mode 100644 index 000000000..edf2f5daa --- /dev/null +++ b/portal_dashboard/README.rst @@ -0,0 +1,48 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Portal Dashboard +================ +Portal Dashboard for Odoo 17 used to get a dashboard view for my portal in website + +Configuration +============= +* No additional configuration is needed. + +License +------- +Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: (V17) Nivedhya T, + (V16) Megha AP, + Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://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 +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/portal_dashboard/__init__.py b/portal_dashboard/__init__.py new file mode 100644 index 000000000..7340cc09e --- /dev/null +++ b/portal_dashboard/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# 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..8a2bfef9e --- /dev/null +++ b/portal_dashboard/__manifest__.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# 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': '17.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'], + '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' + ] + }, + 'images': ['static/description/banner.jpg'], + '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..3ac3abb60 --- /dev/null +++ b/portal_dashboard/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# 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..88b28905b --- /dev/null +++ b/portal_dashboard/controllers/portal_dashboard.py @@ -0,0 +1,233 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# 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..de2688792 --- /dev/null +++ b/portal_dashboard/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 30.06.2025 +#### Version 17.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..23eb71816 --- /dev/null +++ b/portal_dashboard/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# 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..f71e831eb --- /dev/null +++ b/portal_dashboard/models/chart_data.py @@ -0,0 +1,94 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# 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 PortalDashboardData(models.AbstractModel): + _name = 'portal.dashboard.data' + + @api.model + def datafetch(self): + """To fetch data for portal dashboard""" + partner_id = self.env.user.id + user = self.env.user + group_user = self.env.ref('base.group_user') + + if group_user in user.groups_id: + all_invoices = self.env['account.move'].search([ + ('move_type', '=', 'out_invoice'), + ('state', 'not in', ['draft', 'cancel']), + ]) + invoice_count = len(all_invoices) + + all_bills = self.env['account.move'].search([ + ('move_type', '=', 'in_invoice'), + ('state', 'not in', ['draft', 'cancel']), + ]) + bill_count = len(all_bills) + + else: + all_invoices = self.env['account.move'].search([ + ('move_type', '=', 'out_invoice'), + ('partner_id', '=', user.partner_id.id), + ('state', 'not in', ['draft', 'cancel']), + ]) + invoice_count = len(all_invoices) + + all_bills = self.env['account.move'].search([ + ('move_type', '=', 'in_invoice'), + ('partner_id', '=', user.partner_id.id), + ('state', 'not in', ['draft', 'cancel']), + ]) + bill_count = len(all_bills) + + all_accounting = [invoice_count, bill_count] # ✅ both values added + + # Sales data + quotations = self.env['sale.order'].search([ + ('user_id', '=', partner_id), ('state', 'in', ['sent']) + ]) + q_count = len(quotations) + + sale_orders = self.env['sale.order'].search([ + ('user_id', '=', partner_id), ('state', 'not in', ['draft', 'sent']) + ]) + so_count = len(sale_orders) + + all_so = [so_count, q_count] + + # Purchase data + rfqs = self.env['purchase.order'].search([ + ('user_id', '=', partner_id), ('state', 'in', ['sent', 'to approve']) + ]) + rfq_count = len(rfqs) + + purchase_orders = self.env['purchase.order'].search([ + ('user_id', '=', partner_id), ('state', 'not in', ['draft', 'sent', 'to approve']) + ]) + po_count = len(purchase_orders) + + all_purchase_order = [po_count, 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..5ea428770 --- /dev/null +++ b/portal_dashboard/models/res_config_settings.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# 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/capture (1).png b/portal_dashboard/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/capture (1).png differ 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/img.png b/portal_dashboard/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/img.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/photo-capture.png b/portal_dashboard/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/portal_dashboard/static/description/assets/icons/photo-capture.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/Cybrosys R.png b/portal_dashboard/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/portal_dashboard/static/description/assets/misc/Cybrosys R.png differ diff --git a/portal_dashboard/static/description/assets/misc/email.svg b/portal_dashboard/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/portal_dashboard/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/portal_dashboard/static/description/assets/misc/phone.svg b/portal_dashboard/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/portal_dashboard/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/portal_dashboard/static/description/assets/misc/star (1) 2.svg b/portal_dashboard/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/portal_dashboard/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/portal_dashboard/static/description/assets/misc/support (1) 1.svg b/portal_dashboard/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/portal_dashboard/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/portal_dashboard/static/description/assets/misc/support-email.svg b/portal_dashboard/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/portal_dashboard/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/portal_dashboard/static/description/assets/misc/tick-mark.svg b/portal_dashboard/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/portal_dashboard/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/portal_dashboard/static/description/assets/misc/whatsapp 1.svg b/portal_dashboard/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/portal_dashboard/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/portal_dashboard/static/description/assets/misc/whatsapp.svg b/portal_dashboard/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/portal_dashboard/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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..7cb0c1396 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..0f1da7644 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..865e712a6 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..4c0c29566 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.png b/portal_dashboard/static/description/assets/modules/5.png new file mode 100644 index 000000000..0cbac311c Binary files /dev/null and b/portal_dashboard/static/description/assets/modules/5.png 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..0dea4f332 Binary files /dev/null and b/portal_dashboard/static/description/assets/modules/6.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/hero.gif b/portal_dashboard/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..7763b79a4 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/hero.gif differ diff --git a/portal_dashboard/static/description/assets/screenshots/screenshot1.png b/portal_dashboard/static/description/assets/screenshots/screenshot1.png new file mode 100644 index 000000000..f57214957 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/screenshot1.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/screenshot2.png b/portal_dashboard/static/description/assets/screenshots/screenshot2.png new file mode 100644 index 000000000..4f7ffe138 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/screenshot2.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/screenshot3.png b/portal_dashboard/static/description/assets/screenshots/screenshot3.png new file mode 100644 index 000000000..6fb4b01a9 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/screenshot3.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/screenshot4.png b/portal_dashboard/static/description/assets/screenshots/screenshot4.png new file mode 100644 index 000000000..565c87104 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/screenshot4.png differ diff --git a/portal_dashboard/static/description/banner.jpg b/portal_dashboard/static/description/banner.jpg new file mode 100644 index 000000000..413dfc003 Binary files /dev/null and b/portal_dashboard/static/description/banner.jpg differ diff --git a/portal_dashboard/static/description/icon.png b/portal_dashboard/static/description/icon.png new file mode 100644 index 000000000..6c51a2413 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..aa41d49a3 --- /dev/null +++ b/portal_dashboard/static/description/index.html @@ -0,0 +1,720 @@ + + + + + + + Portal Dashboard + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Portal Dashboard

+

+ Change the design of my portal view in website. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Graphical presentation of analysis of sales, purchase and accounts are available

+
+
+
+
+
+
+ +
+
+

+ Allows to view table view of sale order, quotations, purchase orders, RFQ s, invoices, bills, projects and tasks

+
+
+
+
+
+
+ +
+
+

It + Can set the number of document wants to show in the table

+
+
+
+
+
+
+ +
+
+

+ Able to view documents directly from the dashboard

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

+ 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

+
+
+
+
+
+
+ +
+
+

+ 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

+
+
+
+
+
+
+
    +
  • + + Graphical presentation of analysis of sales, purchase and accounts are available +
  • +
  • + + 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 +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:30th June 2025 +
+

+ Initial Commit for Portal Dashboard.

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + 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..189d350f7 --- /dev/null +++ b/portal_dashboard/static/src/js/portal_dashboard_graph.js @@ -0,0 +1,106 @@ +/** @odoo-module */ + +import { useService } from "@web/core/utils/hooks"; +import { Component, useState } from "@odoo/owl"; +import { registry } from "@web/core/registry"; +import { session } from "@web/session"; +import { _t } from "@web/core/l10n/translation"; +import publicWidget from '@web/legacy/js/public/public_widget'; +import { jsonrpc } from "@web/core/network/rpc_service"; + +publicWidget.registry.PortalDashBoardGraph = publicWidget.Widget.extend({ + selector: '.portal_dashboard', + + init: function (parent, context) { + this._super(parent, context); + }, + + start: function () { + this.fetch_data(); + }, + + fetch_data: async function () { + var result = await jsonrpc('/web/dataset/call_kw', { + model: 'portal.dashboard.data', + method: 'datafetch', + args: [], + kwargs: {} + }); + + // For Sales Analysis + 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' } + } + } + }; + + // For Purchase Analysis + 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' } + } + } + }; + + // For Accounting Analysis + 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(result); + } +}); diff --git a/portal_dashboard/static/src/scss/style.scss b/portal_dashboard/static/src/scss/style.scss new file mode 100644 index 000000000..622b7a636 --- /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%; +} diff --git a/portal_dashboard/views/dashboard.xml b/portal_dashboard/views/dashboard.xml new file mode 100644 index 000000000..786e88b9b --- /dev/null +++ b/portal_dashboard/views/dashboard.xml @@ -0,0 +1,536 @@ + + + + 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..4ee87a95c --- /dev/null +++ b/portal_dashboard/views/res_config_settings_views.xml @@ -0,0 +1,110 @@ + + + + res.config.settings.view.form.inherit.delivery + res.config.settings + + + + +

Portal Dashboard

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