diff --git a/portal_dashboard/README.rst b/portal_dashboard/README.rst new file mode 100644 index 000000000..3f5617fa0 --- /dev/null +++ b/portal_dashboard/README.rst @@ -0,0 +1,45 @@ +.. 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 to view the My Account Details in Dashboard View. + +Configuration +============= + - www.odoo.com/documentation/15.0/setup/install.html + - Install our custom addon + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +AFFERO General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- + Developer: (V15) Mohammed Dilshad Tk, 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 https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ \ No newline at end of file diff --git a/portal_dashboard/__init__.py b/portal_dashboard/__init__.py new file mode 100644 index 000000000..bbe0f95d6 --- /dev/null +++ b/portal_dashboard/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Mohammed Dilshad Tk (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..93dbca312 --- /dev/null +++ b/portal_dashboard/__manifest__.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Mohammed Dilshad Tk (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': '15.0.1.0.0', + 'category': 'Website', + 'summary': "Portal Dashboard to view the My Account Details in Dashboard " + "view", + 'description': "Portal Dashboard enhances your website's user experience " + "by providing a feature-rich dashboard for My Account " + "details. With a sleek and intuitive design, users can " + "easily navigate and access key information at a glance.", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['sale_management', 'project', 'crm', 'purchase', 'website'], + 'data': [ + 'views/res_config_settings_views.xml', + 'views/portal_dashboard_templates.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/portal_dashboard_style.scss' + ] + }, + 'images': ['static/description/banner.png', ], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/portal_dashboard/controllers/__init__.py b/portal_dashboard/controllers/__init__.py new file mode 100644 index 000000000..9b718693b --- /dev/null +++ b/portal_dashboard/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Mohammed Dilshad Tk (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 diff --git a/portal_dashboard/controllers/portal.py b/portal_dashboard/controllers/portal.py new file mode 100644 index 000000000..19555f41a --- /dev/null +++ b/portal_dashboard/controllers/portal.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Mohammed Dilshad Tk (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""" + partner_id = request.env.user.partner_id.id + user = request.env.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 request.env.ref('base.group_user') in user.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.id), + ('state', 'not in', ['draft', 'sent']) + ], limit=int(number_so)) + quotations_limited = sale_order.search([ + ('user_id', '=', user.id), + ('state', 'in', ['draft','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.id), + ('state', 'not in', ['draft', 'sent', 'to approve']) + ], limit=int(number_po)) + rfq_limited = purchase_order.search([ + ('user_id', '=', user.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.id), + ('partner_id', '=', partner_id)], + limit=int(number_project)) + tasks_limited = task.search( + ['|', ('user_ids', '=', user.id), + ('partner_id', '=', partner_id)], + 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.id), + ('state', 'not in', ['draft', 'cancel']) + ], limit=int(number_account)) + sale_orders = sale_order.search([ + ('user_id', '=', user.id), + ('state', 'not in', ['draft', 'sent'])]) + quotations = sale_order.search([ + ('user_id', '=', user.id), + ('state', 'in', ['draft', 'sent'])]) + purchase_orders = purchase_order.search([ + ('user_id', '=', user.id), + ('state', 'not in', ['draft', 'sent', 'to approve'])]) + rfq = purchase_order.search([ + ('user_id', '=', user.id), + ('state', 'in', ['draft', 'sent', 'to approve'])]) + projects = project.search([]) + tasks = task.search([]) + invoices = request.env['account.move'].search_count( + self._get_invoices_domain()) + else: + if show_so_q: + number_so = config_parameters.get_param( + 'portal_dashboard.sale_count', 0) + sale_orders_limited = sale_order.search([ + ('partner_id', '=', user.partner_id.id), + ('state', 'not in', ['draft', 'sent']) + ], limit=int(number_so)) + quotations_limited = sale_order.search([ + ('partner_id', '=', user.partner_id.id), + ('state', 'in', ['draft','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', '=', user.partner_id.id), + ('state', 'not in', ['draft', 'sent', 'to approve']) + ], limit=int(number_po)) + rfq_limited = purchase_order.search([ + ('partner_id', '=', user.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.id), + ('partner_id', '=', user.id)], + limit=int(number_project)) + tasks_limited = task.search( + ['|', ('user_ids', '=', user.id), + ('partner_id', '=', user.id)], + 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', '=', user.partner_id.id), + ('state', 'not in', ['draft', 'cancel']) + ], limit=int(number_account)) + sale_orders = sale_order.search([ + ('partner_id', '=', user.partner_id.id), + ('state', 'not in', ['draft', 'sent'])]) + quotations = sale_order.search([ + ('partner_id', '=', user.partner_id.id), + ('state', 'in', ['draft','sent'])]) + purchase_orders = purchase_order.search([ + ('partner_id', '=', user.partner_id.id), + ('state', 'not in', ['draft', 'sent', 'to approve'])]) + rfq = purchase_order.search([ + ('partner_id', '=', user.partner_id.id), + ('state', 'in', ['draft', 'sent', 'to approve'])]) + projects = project.search([ + ('user_id', '=', user.id)]) + tasks = task.search([('user_ids', '=', user.id)]) + invoices = account_move.search([ + ('partner_id', '=', user.partner_id.id), + ('state', 'not in', ['draft', 'cancel']) + ]) + values = self._prepare_portal_layout_values() + values = {'sales_user': values['sales_user'], + 'page_name': values['page_name'], + 'sale_order_portal': sale_orders, + 'quotation_portal': quotations, + 'purchase_orders_portal': purchase_orders, + 'rfq_portal': rfq, + 'projects_portal': projects, + 'tasks_portal': tasks, + 'invoices_portal': invoices, + 'number_so_portal': number_so, + 'number_po_portal': number_po, + 'number_account_portal': number_account, + 'number_project_portal': number_project, + 'sale_orders_limited': sale_orders_limited, + 'quotations_limited': quotations_limited, + 'purchase_orders_limited': purchase_orders_limited, + 'rfq_limited': rfq_limited, + 'invoices_limited': invoices_limited, + 'projects_limited': projects_limited, + 'tasks_limited': tasks_limited, + 'show_so_q': show_so_q, + 'show_po_rfq': show_po_rfq, + 'show_project': show_project, + 'show_account': show_account} + return request.render( + "portal_dashboard.my_account_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..b2ec34bd0 --- /dev/null +++ b/portal_dashboard/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 29.01.2024 +#### Version 15.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..1a0eb3302 --- /dev/null +++ b/portal_dashboard/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Mohammed Dilshad Tk (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 +from . import res_config_settings diff --git a/portal_dashboard/models/portal_dashboard.py b/portal_dashboard/models/portal_dashboard.py new file mode 100644 index 000000000..c735c6c31 --- /dev/null +++ b/portal_dashboard/models/portal_dashboard.py @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Mohammed Dilshad Tk (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 PortalDashboardData(models.Model): + """Used to set graphs in portal dashboard template""" + _name = 'portal.dashboard' + _description = 'To get portal dashboard data' + + @api.model + def get_dashboard_data(self): + """To fetch datas of backend documents to show in the portal + dashboard template depending on count of record""" + partner, partners = self.env.user.id, self.env.user + group_id = self.env.ref('base.group_user') + if group_id in partners.groups_id: + all_invoice = self.env['account.move'].search_count([ + ('state', 'not in', ['draft', 'cancel']), + ('move_type', '=', 'out_invoice')]) + all_bills = self.env['account.move'].search_count([ + ('state', 'not in', ['draft', 'cancel']), + ('move_type', '=', 'in_invoice')]) + else: + all_invoice = self.env['account.move'].search([ + ('partner_id', '=', partners.partner_id.id), + ('state', 'not in', ['draft', 'cancel']), + ('move_type', '=', 'out_invoice')]) + all_bills = self.env['account.move'].search([ + ('partner_id', '=', partners.partner_id.id), + ('state', 'not in', ['draft', 'cancel']), + ('move_type', '=', 'out_invoice'), + ('move_type', '=', 'in_invoice')]) + all_acc = [all_invoice, all_bills] + sale_order = self.env['sale.order'].search_count([ + ('user_id', '=', partner), + ('state', 'not in', ['draft', 'sent'])]) + quotations = self.env['sale.order'].search_count([('user_id', '=', + partner), + ('state', 'in', + ['draft', 'sent'])]) + all_so = [sale_order, quotations] + purchase_order = self.env['purchase.order'].search_count([ + ('user_id', '=', partner), + ('state', 'not in', ['draft', 'sent', 'to approve'])]) + purchase = self.env['purchase.order'].search_count([ + ('user_id', '=', partner), + ('state', 'in', ['draft', 'sent', 'to approve'])]) + rfq_count = purchase + all_purchase_order = [rfq_count, purchase_order] + return { + 'target': all_so, + 'target_po': all_purchase_order, + 'target_accounting': all_acc + } diff --git a/portal_dashboard/models/res_config_settings.py b/portal_dashboard/models/res_config_settings.py new file mode 100644 index 000000000..fd5ce0df2 --- /dev/null +++ b/portal_dashboard/models/res_config_settings.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Mohammed Dilshad Tk (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 LICis_show_recent_invoice_billENSE (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', + help="Does need to show the recent quotation and sale order table in" + " dashboard") + sale_count = fields.Integer( + string='How many recent records do you want to show?', + config_parameter='portal_dashboard.sale_count', + help="Count of recent sales records need to show") + is_show_recent_po_rfq = fields.Boolean( + string='Is show recent RFQ table?', + config_parameter='portal_dashboard.is_show_recent_po_rfq', + help="Does need to show the recently created RFQ table") + purchase_count = fields.Integer( + string='How many recent records do you want to show?', + config_parameter='portal_dashboard.purchase_count', + help="Count of recent purchase records need to show") + is_show_project = fields.Boolean( + string='Is show project task table?', + config_parameter='portal_dashboard.is_show_project', + help="Does need to show the show project tasks") + project_count = fields.Integer( + string='How many recent records do you want to show?', + config_parameter='portal_dashboard.project_count', + help="Count of recent project records to show") + is_show_recent_invoice_bill = fields.Boolean( + string='Is show recent invoice/bill table?', + config_parameter='portal_dashboard.is_show_recent_invoice_bill', + help="Does the recent invoice/bill table need to be shown") + account_count = fields.Integer( + string='How many recent records do you want to show?', + config_parameter='portal_dashboard.account_count', + help="How much recent account's need to be shown") 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/auto_database_backup.gif b/portal_dashboard/static/description/assets/modules/auto_database_backup.gif new file mode 100644 index 000000000..591c8b18d Binary files /dev/null and b/portal_dashboard/static/description/assets/modules/auto_database_backup.gif differ diff --git a/portal_dashboard/static/description/assets/modules/hide_menu_user.png b/portal_dashboard/static/description/assets/modules/hide_menu_user.png new file mode 100644 index 000000000..6bc155887 Binary files /dev/null and b/portal_dashboard/static/description/assets/modules/hide_menu_user.png differ diff --git a/portal_dashboard/static/description/assets/modules/multi_branch_base.png b/portal_dashboard/static/description/assets/modules/multi_branch_base.png new file mode 100644 index 000000000..6f654cfdb Binary files /dev/null and b/portal_dashboard/static/description/assets/modules/multi_branch_base.png differ diff --git a/portal_dashboard/static/description/assets/modules/odoo_dynamic_dashboard.png b/portal_dashboard/static/description/assets/modules/odoo_dynamic_dashboard.png new file mode 100644 index 000000000..3599974eb Binary files /dev/null and b/portal_dashboard/static/description/assets/modules/odoo_dynamic_dashboard.png differ diff --git a/portal_dashboard/static/description/assets/modules/odoo_website_helpdesk.png b/portal_dashboard/static/description/assets/modules/odoo_website_helpdesk.png new file mode 100644 index 000000000..f19f3578e Binary files /dev/null and b/portal_dashboard/static/description/assets/modules/odoo_website_helpdesk.png differ diff --git a/portal_dashboard/static/description/assets/modules/web_login_styles.png b/portal_dashboard/static/description/assets/modules/web_login_styles.png new file mode 100644 index 000000000..e20126a45 Binary files /dev/null and b/portal_dashboard/static/description/assets/modules/web_login_styles.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/1.png b/portal_dashboard/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..7ee6e1ca0 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/1.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/10.png b/portal_dashboard/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..368fc4d31 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/10.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/11.png b/portal_dashboard/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..85e481e4c Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/11.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/3.png b/portal_dashboard/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..b65a42e51 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/3.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/9.png b/portal_dashboard/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..328ca9f85 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/9.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/img1.png b/portal_dashboard/static/description/assets/screenshots/img1.png new file mode 100644 index 000000000..fcebc39cb Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/img1.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/img3.png b/portal_dashboard/static/description/assets/screenshots/img3.png new file mode 100644 index 000000000..9f1496270 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/img3.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/v15-hero.gif b/portal_dashboard/static/description/assets/screenshots/v15-hero.gif new file mode 100644 index 000000000..846a1baf9 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/v15-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..357835df3 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..aaa43472c 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..490b35995 --- /dev/null +++ b/portal_dashboard/static/description/index.html @@ -0,0 +1,602 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Portal Dashboard

+

+ Change The Design Of My Account View In Website

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ This application allows to Change the theme of my Account 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 find these fields in the settings for configuring 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

+ +
+ +
+

+ Able to view the representation of Documents according to the Count set in the Portal + Dashboard 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

+
+
+
+
+
+
+
+ +
+
+
+ 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/financial-profit.png b/portal_dashboard/static/src/images/financial-profit.png new file mode 100644 index 000000000..7e63e36cf Binary files /dev/null and b/portal_dashboard/static/src/images/financial-profit.png differ diff --git a/portal_dashboard/static/src/images/invoice.png b/portal_dashboard/static/src/images/invoice.png new file mode 100644 index 000000000..48cdf253c Binary files /dev/null and b/portal_dashboard/static/src/images/invoice.png differ diff --git a/portal_dashboard/static/src/images/po2.png b/portal_dashboard/static/src/images/po2.png new file mode 100644 index 000000000..9bbc3d0f0 Binary files /dev/null and b/portal_dashboard/static/src/images/po2.png differ diff --git a/portal_dashboard/static/src/images/project2.png b/portal_dashboard/static/src/images/project2.png new file mode 100644 index 000000000..4dfc12da2 Binary files /dev/null and b/portal_dashboard/static/src/images/project2.png differ diff --git a/portal_dashboard/static/src/images/q2.png b/portal_dashboard/static/src/images/q2.png new file mode 100644 index 000000000..155e76d6b Binary files /dev/null and b/portal_dashboard/static/src/images/q2.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/images/task2.png b/portal_dashboard/static/src/images/task2.png new file mode 100644 index 000000000..3ba10d63d Binary files /dev/null and b/portal_dashboard/static/src/images/task2.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..1ef7e3ebc --- /dev/null +++ b/portal_dashboard/static/src/js/portal_dashboard_graph.js @@ -0,0 +1,126 @@ +odoo.define('portal_dashboard.PortalDashBoardGraph', function(require) { + "use strict"; + var publicWidget = require('web.public.widget'); + /** Extends Widget in publicWidget */ + publicWidget.registry.PortalDashBoardGraph = publicWidget.Widget.extend({ + selector: '.portal_dashboard', + init: function(parent, context) { + this._super(parent, context); + }, + /** Call fetch data function in start function */ + 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', + method: 'get_dashboard_data' + }).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, + maintainAspectRatio: 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 = ['RFQ','Purchase order']; + 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/portal_dashboard_style.scss b/portal_dashboard/static/src/scss/portal_dashboard_style.scss new file mode 100644 index 000000000..2b2d450c9 --- /dev/null +++ b/portal_dashboard/static/src/scss/portal_dashboard_style.scss @@ -0,0 +1,81 @@ +.btn-trans{ +background-color: #efefef, +} +.btn-trans:hover{ +background-color: #58B354A6; +color:white; +} +.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%; +} +.quotation +{ + box-shadow: 1px 0px 16px 0 rgba(63, 73, 115, 0.3); + background-color: #ffffff; + border-radius: 2px; + position: relative; + width: 100%; + border: 1px solid rgba(0, 0, 0, 0.07); + height: 200px; + +} +.heading2{ +width:100%; +text-align: center; +} +.word-text { + font-size: 1.2rem; + font-weight: bold; + color: black; + text-transform: uppercase; + margin-top:1rem; +} +.count-div{ +color:#7D7EAF; +font-size:3rem; + +} +.view-bar{ + position: absolute; + top: 0px; + right: 0px; + margin: 1rem; + color: #dc3545; +} diff --git a/portal_dashboard/views/portal_dashboard_templates.xml b/portal_dashboard/views/portal_dashboard_templates.xml new file mode 100644 index 000000000..ebc4094d9 --- /dev/null +++ b/portal_dashboard/views/portal_dashboard_templates.xml @@ -0,0 +1,489 @@ + + + + + \ No newline at end of file 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..c54512e22 --- /dev/null +++ b/portal_dashboard/views/res_config_settings_views.xml @@ -0,0 +1,190 @@ + + + + res.config.settings.view.form.inherit.portal.dashboard + res.config.settings + + + + +
+

Portal Dashboard +

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