diff --git a/portal_dashboard/README.rst b/portal_dashboard/README.rst new file mode 100644 index 000000000..155672621 --- /dev/null +++ b/portal_dashboard/README.rst @@ -0,0 +1,44 @@ +.. 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 14 used to get a dashboard view for my portal in website + +Configuration +============ + - www.odoo.com/documentation/14.0/setup/install.html + - Install our custom addon + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +AFFERO General Public License, Version 3 (AGPL v3). +(http://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- + Developer: (V14) Mohammed Dilshad Tk, Contact: odoo@cybrosys.com + +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 +========== +.. 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: ``__ diff --git a/portal_dashboard/__init__.py b/portal_dashboard/__init__.py new file mode 100644 index 000000000..6340529bf --- /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: 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..4bc5f9dda --- /dev/null +++ b/portal_dashboard/__manifest__.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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': '14.0.1.0.0', + 'category': 'Extra Tools', + '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', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['sale', 'project', 'crm', 'purchase', 'website'], + 'data': [ + 'views/assets.xml', + 'views/res_config_settings_views.xml', + 'views/portal_dashboard_templates.xml', + ], + '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..edf72f79f --- /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: 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..9202c5bd6 --- /dev/null +++ b/portal_dashboard/controllers/portal.py @@ -0,0 +1,202 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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 change_portal(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 + project_no = 0 + sale_order = request.env['sale.order'].sudo() + purchase_order = request.env['purchase.order'].sudo() + account_move = request.env['account.move'].sudo() + 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 = "", "" + 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, invoices_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([ + ('create_uid', '=', user.id), + ('state', 'not in', ['draft', 'sent']) + ], limit=int(number_so)) + quotations_limited = sale_order.search([ + ('create_uid', '=', user.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([ + ('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_id', '=', 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', '=', 'sent')]) + purchase_orders = purchase_order.search([('user_id', '=', user.id), + ('state', 'in', ['purchase'])]) + rfq = purchase_order.search([ + ('user_id', '=', user.id), + ('state', 'in', ['sent', 'to approve'])]) + project_no = project.search([]) + tasks = task.search([]) + invoices = 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', '=', partner_id), + ('state', 'not in', ['draft', 'sent']) + ], limit=int(number_so)) + quotations_limited = sale_order.search([ + ('partner_id', '=', partner_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', '=', partner_id), + ('state', 'not in', ['draft', 'sent', 'to approve']) + ], limit=int(number_po)) + rfq_limited = purchase_order.search([ + ('partner_id', '=', partner_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_id', '=', 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([ + ('partner_id', '=', partner_id), + ('state', 'not in', ['draft', 'cancel']) + ], limit=int(number_account)) + sale_orders = sale_order.search([ + ('partner_id', '=', partner_id), + ('state', 'not in', ['draft', 'sent'])]) + quotations = sale_order.search([ + ('user_id', '=', user.id), + ('state', '=', 'sent')]) + purchase_orders = purchase_order.search([ + ('partner_id', '=', partner_id), + ('state', '=', 'purchase')]) + rfq = purchase_order.search([ + ('partner_id', '=', partner_id), + ('state', 'in', ['sent', 'to approve'])]) + projects = project.search([ + ('partner_id', '=', partner_id)]) + for project in projects: + if (project.privacy_visibility == 'portal' and user.id + in project.allowed_portal_user_ids.mapped('id')): + project_no += 1 + tasks = task.search([('partner_id', '=', user.partner_id.id)]) + invoices = account_move.search([ + ('partner_id', '=', partner_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': project_no, + '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.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..ac0d6068f --- /dev/null +++ b/portal_dashboard/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 08.01.2024 +#### Version 14.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..c219554c0 --- /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: 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_data +from . import res_config_settings diff --git a/portal_dashboard/models/portal_dashboard_data.py b/portal_dashboard/models/portal_dashboard_data.py new file mode 100644 index 000000000..a281d82f8 --- /dev/null +++ b/portal_dashboard/models/portal_dashboard_data.py @@ -0,0 +1,85 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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 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""" + user = self.env.user + all_accounting = [] + if self.env.ref('base.group_user') in user.groups_id: + all_invoice = self.env['account.move'].search([ + ('state', 'not in', ['draft', 'cancel'])]) + invoice_count = len(all_invoice) + all_accounting.append(invoice_count) + sale_order = self.env['sale.order'].search([ + ('user_id', '=', user.id), + ('state', 'not in', ['draft', 'sent'])]) + quotations = self.env['sale.order'].search( + [('user_id', '=', user.id), + ('state', '=', 'sent')]) + else: + all_invoice = self.env['account.move'].search([ + ('partner_id','=', user.partner_id.id), + ('state', 'not in', ['draft', 'cancel'])]) + invoice_count = len(all_invoice) + all_accounting.append(invoice_count) + sale_order = self.env['sale.order'].search([ + ('partner_id', '=', user.partner_id.id), + ('state', 'not in', ['draft', 'sent'])]) + quotations = self.env['sale.order'].search( + [('partner_id', '=', user.partner_id.id), + ('state', '=', 'sent')]) + all_so = [] + 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([ + ('partner_id', '=', user.partner_id.id), + ('state', 'not in', ['draft', 'sent', 'to approve'])]) + rfqs = self.env['purchase.order'].search([ + ('partner_id', '=', user.partner_id.id), + ('state', 'in', ['sent', 'to approve'])]) + all_purchase_order.append(len(purchase_order)) + all_purchase_order.append(len(rfqs)) + lists = {"so": all_so, "po": all_purchase_order} + all_ac = 0 + if all_accounting[0] == 0: + all_ac = 1 + zero_list = [name for name, lst in lists.items() if all(item == 0 + for item in lst)] + return { + 'all_ac': all_ac, + 'zero_list': zero_list, + '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..47900b548 --- /dev/null +++ b/portal_dashboard/models/res_config_settings.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-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='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 sale orders 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='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 purchase orders 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='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 project's 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='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 invoices 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/1.gif b/portal_dashboard/static/description/assets/modules/1.gif new file mode 100644 index 000000000..07588ba92 Binary files /dev/null and b/portal_dashboard/static/description/assets/modules/1.gif 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..be440eb23 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..713d6dee5 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..0f0d5d3c2 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..6d11dfe59 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..0841c9749 Binary files /dev/null and b/portal_dashboard/static/description/assets/modules/6.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..a63cca85e Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/1.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/2.png b/portal_dashboard/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..9085b786e Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/2.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..2510a77cf Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/3.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/4.png b/portal_dashboard/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..143fceec6 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/4.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/5.png b/portal_dashboard/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..efa7d0130 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/5.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/6.png b/portal_dashboard/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..e5071fade Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/6.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/7.png b/portal_dashboard/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..51a9b324b Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/7.png differ diff --git a/portal_dashboard/static/description/assets/screenshots/8.png b/portal_dashboard/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..2d0c11e74 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/8.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..cce1b03c3 Binary files /dev/null and b/portal_dashboard/static/description/assets/screenshots/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..bde5963df 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..93466d24e 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..3363c5385 --- /dev/null +++ b/portal_dashboard/static/description/index.html @@ -0,0 +1,576 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+ + + + +
+
+ +
+
+
+ +

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 set the count of each portal dashboard records +

+ +
+ +
+

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

+

+

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

Suggested Products

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

Our Services +

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

Our + Industries +

+
+ +
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

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

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

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

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..4afc025fb --- /dev/null +++ b/portal_dashboard/static/src/js/portal_dashboard_graph.js @@ -0,0 +1,141 @@ +odoo.define('portal_dashboard.PortalDashBoardGraph', function(require) { + "use strict"; + var rpc = require('web.rpc'); + var publicWidget = require('web.public.widget'); + /** Extends Widget in publicWidget */ + publicWidget.registry.PortalDashBoardGraph = publicWidget.Widget.extend({ + selector: '.portal_dashboard', + /** Super the existing function **/ + init: function(parent, context) { + this._super(parent, context); + }, + /** Call fetch data function in start function */ + start: function() { + this.set("title", 'Portal Dashboard'); + var self = this + this.all_so = this.el.querySelectorAll('#all_so') + this.all_purchase_order = this.el.querySelectorAll('#all_purchase_order') + this.all_accounting = this.el.querySelectorAll('#all_accounting') + 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) { + for (var item of result['zero_list']){ + if (item == 'so'){ + self.all_so.classList.add("d-none") + } + if (item == 'po'){ + self.all_purchase_order.classList.add("d-none") + } + } + if(result['all_ac'] == 1 ) { + self.all_accounting.classList.add("d-none") + } + // 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/assets.xml b/portal_dashboard/views/assets.xml new file mode 100644 index 000000000..076fc53e9 --- /dev/null +++ b/portal_dashboard/views/assets.xml @@ -0,0 +1,14 @@ + + + + + diff --git a/portal_dashboard/views/portal_dashboard_templates.xml b/portal_dashboard/views/portal_dashboard_templates.xml new file mode 100644 index 000000000..937fba437 --- /dev/null +++ b/portal_dashboard/views/portal_dashboard_templates.xml @@ -0,0 +1,526 @@ + + + + + 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..1756f267e --- /dev/null +++ b/portal_dashboard/views/res_config_settings_views.xml @@ -0,0 +1,192 @@ + + + + + res.config.settings.view.form.inherit.portal.dashboard + res.config.settings + + + + +
+

Portal + Dashboard +

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