diff --git a/product_management_app/README.rst b/product_management_app/README.rst new file mode 100644 index 000000000..ac7eb3b05 --- /dev/null +++ b/product_management_app/README.rst @@ -0,0 +1,47 @@ +.. 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 + +Product Management +================== +This module allows to Post and Register payment of multiple expenses together. + +Configuration +============= +* No Additional configuration is needed. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Gnu Affero General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developer: (V15) Nikhil M, + 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/product_management_app/__init__.py b/product_management_app/__init__.py new file mode 100644 index 000000000..c980662d6 --- /dev/null +++ b/product_management_app/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Nikhil M(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. + +############################################################################### +from . import models diff --git a/product_management_app/__manifest__.py b/product_management_app/__manifest__.py new file mode 100644 index 000000000..d92eca439 --- /dev/null +++ b/product_management_app/__manifest__.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Nikhil M(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. + +############################################################################### +{ + 'name': 'Product Management', + 'version': '15.0.1.0.0', + 'category': 'Sales', + 'summary': 'Product Management Dashboard', + 'description': """This module allows you Effortlessly manage your products, + gain insights into top sales, purchases, + and stock movements with our intuitive dashboard.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['stock', 'sale_management', 'purchase'], + 'data': [ + 'views/product_template_views.xml', + 'views/product_dashboard.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'product_management_app/static/src/js/product_dashboard.js', + 'product_management_app/static/src/xml/dashboard.xml', + 'product_management_app/static/src/css/dashboard_views.css', + 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.bundle.js', + ], + 'web.assets_qweb': [ + 'product_management_app/static/src/xml/dashboard.xml', + ], + }, + 'images': [ + 'static/description/banner.png', + ], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/product_management_app/doc/RELEASE_NOTES.md b/product_management_app/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..2170d3541 --- /dev/null +++ b/product_management_app/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 27.12.2023 +#### Version 15.0.1.0.0 +##### ADD +- Initial Commit for product Management diff --git a/product_management_app/models/__init__.py b/product_management_app/models/__init__.py new file mode 100644 index 000000000..6fee181a1 --- /dev/null +++ b/product_management_app/models/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Nikhil M(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. + +############################################################################### +from . import product_template diff --git a/product_management_app/models/product_template.py b/product_management_app/models/product_template.py new file mode 100644 index 000000000..3d7828199 --- /dev/null +++ b/product_management_app/models/product_template.py @@ -0,0 +1,145 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Nikhil M(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. + +############################################################################### +import calendar +from odoo import api, models + + +class ProductTemplate(models.Model): + """Custom Dashboard for Viewing Product Details. + This class extends the base model 'product.template' to create a custom dashboard + for viewing specific product details in a more user-friendly manner.""" + _inherit = 'product.template' + + @api.model + def get_data(self): + """Returns data to the tiles of dashboard""" + obj = self.env['product.template'] + return { + 'product_templates': obj.search_count([]), + 'product_variants': self.env['product.product'].search_count([]), + 'storable': obj.search_count([('detailed_type', '=', 'product')]), + 'consumable': obj.search_count([('detailed_type', '=', 'consu')]), + 'service': obj.search_count([('detailed_type', '=', 'service')]), + 'category': self.env['product.category'].search_count([]), + 'price_list': self.env['product.pricelist'].search_count([]), + 'product_attribute': self.env['product.attribute'].search_count([]) + } + + @api.model + def get_top_sale_data(self): + """return the top sale""" + query = ('''select DISTINCT(product_template.name) as product_name, + sum(product_uom_qty) as total_quantity from sale_order_line + inner join product_product on + product_product.id=sale_order_line.product_id + inner join product_template on + product_product.product_tmpl_id = product_template.id + where sale_order_line.company_id = ''' + + str(self.env.company.id) + ''' group by product_template.id ORDER BY + total_quantity DESC Limit 10 ''') + self._cr.execute(query) + top_product = self._cr.dictfetchall() + product_names = [item['product_name'] for item in top_product] + quantities = [item['total_quantity'] for item in top_product] + final = [quantities, product_names] + return final + + @api.model + def get_top_purchase_data(self): + """Returns top purchase data""" + query = ('''select DISTINCT(product_template.name) as product_name,sum(product_qty) as total_quantity from + purchase_order_line inner join product_product on product_product.id=purchase_order_line.product_id inner join + product_template on product_product.product_tmpl_id = product_template.id where purchase_order_line.company_id = ''' + + str(self.env.company.id) + ''' group by product_template.id ORDER BY total_quantity DESC Limit 10 ''') + self._cr.execute(query) + top_product = self._cr.dictfetchall() + product_names = [item['product_name'] for item in top_product] + quantities = [item['total_quantity'] for item in top_product] + final = [quantities, product_names] + return final + + @api.model + def get_product_location_analysis(self): + """Returns the location, location id to the selection""" + categ_qry = """select id, complete_name from stock_location""" + self._cr.execute(categ_qry) + location = self._cr.dictfetchall() + location_name = [item['complete_name'] for item in location] + location_id = [item['id'] for item in location] + return {'location_id': location_id, 'location_name': location_name} + + @api.model + def get_products(self): + """Returns the product, product name to the selection""" + new_data = self.env['product.template'].search_read(fields=['id', 'name']) + product_names = [item['name'] for item in new_data] + product_ids = [item['id'] for item in new_data] + return {'product_id': product_ids, 'product_name': product_names} + + @api.model + def get_prod_details(self, data): + """Returns the monthly analysis of product movement""" + query = ("""select product_template.name as name, + sum(stock_move_line.qty_done),EXTRACT(month from + stock_move_line.date) from stock_move_line inner join + product_product on stock_move_line.product_id = + product_product.id inner join product_template on + product_product.product_tmpl_id = product_template.id + where stock_move_line.company_id = %s and + stock_move_line.product_id = %s group by + product_template.name,stock_move_line.date""" + % (self.env.company.id, data)) + self._cr.execute(query) + product_move = self._cr.dictfetchall() + month = [] + for rec in product_move: + month.append(int(rec['date_part'])) + rec.update({ + 'count': rec['sum'], + 'dates': calendar.month_name[int(rec['date_part'])], + 'month': int(rec['date_part']) + }) + for rec in range(1, 13): + if rec not in month: + product_move.append({'count': 0,'dates': calendar.month_name[rec],'month': rec}) + cr = sorted(product_move, key=lambda i: i['month']) + count = [item['count'] for item in cr] + months = [item['dates'] for item in cr] + return {'count': count,'dates': months} + + @api.model + def get_product_qty_by_loc(self, args): + """Returns product qty based on the location selected""" + query = ('''select sl.complete_name, pt.name as name, sq.quantity from + stock_quant sq inner join stock_location sl on sq.location_id = + sl.id inner join product_product pp on sq.product_id = pp.id + inner join product_template pt on pp.product_tmpl_id = pt.id + where sq.company_id = '%s' and sl.id = '%s' group by + sl.complete_name,pt.name, sq.quantity ''' + % (self.env.company.id, int(args))) + self._cr.execute(query) + product_qty = self._cr.dictfetchall() + product_names = [item['name'] for item in product_qty] + quantities = [item['quantity'] for item in product_qty] + return { + 'products': product_names, + 'quantity': quantities, + } diff --git a/product_management_app/static/description/assets/icons/check.png b/product_management_app/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/product_management_app/static/description/assets/icons/check.png differ diff --git a/product_management_app/static/description/assets/icons/chevron.png b/product_management_app/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/product_management_app/static/description/assets/icons/chevron.png differ diff --git a/product_management_app/static/description/assets/icons/cogs.png b/product_management_app/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/product_management_app/static/description/assets/icons/cogs.png differ diff --git a/product_management_app/static/description/assets/icons/consultation.png b/product_management_app/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/product_management_app/static/description/assets/icons/consultation.png differ diff --git a/product_management_app/static/description/assets/icons/ecom-black.png b/product_management_app/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/product_management_app/static/description/assets/icons/ecom-black.png differ diff --git a/product_management_app/static/description/assets/icons/education-black.png b/product_management_app/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/product_management_app/static/description/assets/icons/education-black.png differ diff --git a/product_management_app/static/description/assets/icons/hotel-black.png b/product_management_app/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/product_management_app/static/description/assets/icons/hotel-black.png differ diff --git a/product_management_app/static/description/assets/icons/license.png b/product_management_app/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/product_management_app/static/description/assets/icons/license.png differ diff --git a/product_management_app/static/description/assets/icons/lifebuoy.png b/product_management_app/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/product_management_app/static/description/assets/icons/lifebuoy.png differ diff --git a/product_management_app/static/description/assets/icons/manufacturing-black.png b/product_management_app/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/product_management_app/static/description/assets/icons/manufacturing-black.png differ diff --git a/product_management_app/static/description/assets/icons/pos-black.png b/product_management_app/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/product_management_app/static/description/assets/icons/pos-black.png differ diff --git a/product_management_app/static/description/assets/icons/puzzle.png b/product_management_app/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/product_management_app/static/description/assets/icons/puzzle.png differ diff --git a/product_management_app/static/description/assets/icons/restaurant-black.png b/product_management_app/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/product_management_app/static/description/assets/icons/restaurant-black.png differ diff --git a/product_management_app/static/description/assets/icons/service-black.png b/product_management_app/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/product_management_app/static/description/assets/icons/service-black.png differ diff --git a/product_management_app/static/description/assets/icons/trading-black.png b/product_management_app/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/product_management_app/static/description/assets/icons/trading-black.png differ diff --git a/product_management_app/static/description/assets/icons/training.png b/product_management_app/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/product_management_app/static/description/assets/icons/training.png differ diff --git a/product_management_app/static/description/assets/icons/update.png b/product_management_app/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/product_management_app/static/description/assets/icons/update.png differ diff --git a/product_management_app/static/description/assets/icons/user.png b/product_management_app/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/product_management_app/static/description/assets/icons/user.png differ diff --git a/product_management_app/static/description/assets/icons/wrench.png b/product_management_app/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/product_management_app/static/description/assets/icons/wrench.png differ diff --git a/product_management_app/static/description/assets/misc/categories.png b/product_management_app/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/product_management_app/static/description/assets/misc/categories.png differ diff --git a/product_management_app/static/description/assets/misc/check-box.png b/product_management_app/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/product_management_app/static/description/assets/misc/check-box.png differ diff --git a/product_management_app/static/description/assets/misc/compass.png b/product_management_app/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/product_management_app/static/description/assets/misc/compass.png differ diff --git a/product_management_app/static/description/assets/misc/corporate.png b/product_management_app/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/product_management_app/static/description/assets/misc/corporate.png differ diff --git a/product_management_app/static/description/assets/misc/customer-support.png b/product_management_app/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/product_management_app/static/description/assets/misc/customer-support.png differ diff --git a/product_management_app/static/description/assets/misc/cybrosys-logo.png b/product_management_app/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/product_management_app/static/description/assets/misc/cybrosys-logo.png differ diff --git a/product_management_app/static/description/assets/misc/features.png b/product_management_app/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/product_management_app/static/description/assets/misc/features.png differ diff --git a/product_management_app/static/description/assets/misc/logo.png b/product_management_app/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/product_management_app/static/description/assets/misc/logo.png differ diff --git a/product_management_app/static/description/assets/misc/pictures.png b/product_management_app/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/product_management_app/static/description/assets/misc/pictures.png differ diff --git a/product_management_app/static/description/assets/misc/pie-chart.png b/product_management_app/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/product_management_app/static/description/assets/misc/pie-chart.png differ diff --git a/product_management_app/static/description/assets/misc/right-arrow.png b/product_management_app/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/product_management_app/static/description/assets/misc/right-arrow.png differ diff --git a/product_management_app/static/description/assets/misc/star.png b/product_management_app/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/product_management_app/static/description/assets/misc/star.png differ diff --git a/product_management_app/static/description/assets/misc/support.png b/product_management_app/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/product_management_app/static/description/assets/misc/support.png differ diff --git a/product_management_app/static/description/assets/misc/whatsapp.png b/product_management_app/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/product_management_app/static/description/assets/misc/whatsapp.png differ diff --git a/product_management_app/static/description/assets/modules/1.png b/product_management_app/static/description/assets/modules/1.png new file mode 100644 index 000000000..5238bdeab Binary files /dev/null and b/product_management_app/static/description/assets/modules/1.png differ diff --git a/product_management_app/static/description/assets/modules/2.png b/product_management_app/static/description/assets/modules/2.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/product_management_app/static/description/assets/modules/2.png differ diff --git a/product_management_app/static/description/assets/modules/3.png b/product_management_app/static/description/assets/modules/3.png new file mode 100644 index 000000000..3c3ff1afb Binary files /dev/null and b/product_management_app/static/description/assets/modules/3.png differ diff --git a/product_management_app/static/description/assets/modules/4.png b/product_management_app/static/description/assets/modules/4.png new file mode 100644 index 000000000..3fae4631e Binary files /dev/null and b/product_management_app/static/description/assets/modules/4.png differ diff --git a/product_management_app/static/description/assets/modules/5.gif b/product_management_app/static/description/assets/modules/5.gif new file mode 100644 index 000000000..2a5f8e659 Binary files /dev/null and b/product_management_app/static/description/assets/modules/5.gif differ diff --git a/product_management_app/static/description/assets/modules/6.png b/product_management_app/static/description/assets/modules/6.png new file mode 100644 index 000000000..7f2815273 Binary files /dev/null and b/product_management_app/static/description/assets/modules/6.png differ diff --git a/product_management_app/static/description/assets/screenshots/dashboard.png b/product_management_app/static/description/assets/screenshots/dashboard.png new file mode 100644 index 000000000..54cf7511f Binary files /dev/null and b/product_management_app/static/description/assets/screenshots/dashboard.png differ diff --git a/product_management_app/static/description/assets/screenshots/hero.gif b/product_management_app/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..1840d9312 Binary files /dev/null and b/product_management_app/static/description/assets/screenshots/hero.gif differ diff --git a/product_management_app/static/description/assets/screenshots/monthly_analysis.png b/product_management_app/static/description/assets/screenshots/monthly_analysis.png new file mode 100644 index 000000000..f5a44fa76 Binary files /dev/null and b/product_management_app/static/description/assets/screenshots/monthly_analysis.png differ diff --git a/product_management_app/static/description/assets/screenshots/product_menu.png b/product_management_app/static/description/assets/screenshots/product_menu.png new file mode 100644 index 000000000..6b7f66891 Binary files /dev/null and b/product_management_app/static/description/assets/screenshots/product_menu.png differ diff --git a/product_management_app/static/description/assets/screenshots/products_by_loc.png b/product_management_app/static/description/assets/screenshots/products_by_loc.png new file mode 100644 index 000000000..828387a6d Binary files /dev/null and b/product_management_app/static/description/assets/screenshots/products_by_loc.png differ diff --git a/product_management_app/static/description/banner.png b/product_management_app/static/description/banner.png new file mode 100644 index 000000000..fad949741 Binary files /dev/null and b/product_management_app/static/description/banner.png differ diff --git a/product_management_app/static/description/icon.png b/product_management_app/static/description/icon.png new file mode 100644 index 000000000..ed39cbc49 Binary files /dev/null and b/product_management_app/static/description/icon.png differ diff --git a/product_management_app/static/description/index.html b/product_management_app/static/description/index.html new file mode 100644 index 000000000..d264d184c --- /dev/null +++ b/product_management_app/static/description/index.html @@ -0,0 +1,660 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+ +
+
+ +
+
+
+ +

+ Product Management

+

+ This module allows you Effortlessly manage your products, gain insights into top sales, purchases, + and stock movements with our intuitive dashboard.

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This Module Allows You Effortlessly Manage Your Products, Gain Insights + Into Top Sales, Purchases, + And Stock Movements With Our Intuitive Dashboard. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + Product As Separate Module +
+
+ + Manage Product, Product Variants, Price List, Product Stock, its Movements +
+
+ + Dashboard To Show The Product's Contents In General +
+
+ + Graphs To Show Top Sold/Purchased Products +
+
+ + Graphs To Show Product Movements In Each Month +
+
+ + Graphs To Show Product Based On The Location +
+
+ +
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+
+

+ Product Module Overview +

+ +
+
+

+ Product's Dashboard +

+

+ Dashboard for quick overview of the products

+ + +
+ +
+

+ Product's monthly analysis +

+

+ Product moved are plot against each month

+ +
+
+

+ Products by location +

+

+ Based on the selected location the product, it's quantity can be + viewed in the bar graph

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

+ 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/product_management_app/static/src/css/dashboard_views.css b/product_management_app/static/src/css/dashboard_views.css new file mode 100644 index 000000000..e4d63ea39 --- /dev/null +++ b/product_management_app/static/src/css/dashboard_views.css @@ -0,0 +1,321 @@ +.oh_dashboards{ + padding-top :15px; + background-color: #f8faff !important; +} + +.oh-card h4 { + font-size: 1.1rem; +} + +/* Widget One +---------------------------*/ +.stat-content { + display: inline-block; + width: 66%; +} +.stat-icon{ + display: inline-block; +} + +.stat-widget-one .stat-icon { + vertical-align: top; + margin: auto; + width: 100%; + color: #01c490; +} + +.stat-widget-one .stat-icon i { + font-size: 30px; + font-weight: 900; + display: inline-block; + color: #01c490;} + +.stat-widget-one .stat-text { + font-size: 14px; + color: #868e96; + font-weight: bold; +} + +.stat-widget-one .stat-digit { + font-size: 24px; + color: #02448b; } + +.stat-count { + font-size: 20px; + text-align: center; + color: #00438b;} + +.stat-title { + font-size: 17px; + text-align: center; + color: #00438b; } + +.mb-0{ + position: relative; +} +.mb-0 .dash-title { + font-size: 20px; + color: rgba(255, 255, 255, 0.81); +} + +.oh-card { + + padding-top: 0px; + padding: 0px; + margin-bottom: 1.5rem; + border-radius: 0px; + box-shadow: none; + background: none; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + +} +.oh-card:hover { + + transform: translateY(-2px) translateZ(0) !important; + box-shadow: 0 10px 10px 0 rgba(62, 57, 107, 0.12), 0 0 0 transparent !important; + +} +.oh-data { + + margin-top: 4.5%; + +} +.oh-data .stat-icon { + + width: 30%; + height: 85px; + text-align: center; + background: #ff8762; + color: #fff; + width: 32%; + padding-top: 2%; + font-size: xxx-large; + +} +.oh-data .oh-card { + + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); + +} +.stat-widget-one .stat-text { + font-size: 14px; + color: #ff8762; + margin-top: 2.3rem; + margin-left: 1rem; +} +.stat-widget-one .stat-digit { + font-size: 26px; + color:#993232; + margin-left: 1rem; + margin-top: -1px; + font-family: initial +} + +.stat-widget-one .stat-icon i { + + font-size: 25px; + font-weight: 900; + display: inline-block; + color: #fff; + +} +.stat-widget-one { + + background-color: white; + text-align: left; + +} +.stat-widget-one { + width: 100%; +} +.oh-data .stat-icon { + + width: 30%; + height: 85px; + text-align: center; + padding-top: 2%; + +} + +h4 .stat-count { + font-size: 17px; + text-align: center; + color: #000 !important; + margin-top: 0px; + width: 100%; + float: left; + margin: 0; +} + +.stat-head { + text-align: left !important; + font-weight: 300; + font-size: 15px; + margin-bottom: 25px; + margin-left: 24px; + width: 100%; +} +.oh-card-body { + display: flex; + justify-content: space-between; + align-items: center; +} + +.o_action_manager{ + overflow-y: scroll !important; + max-width:100%; + } + +.stat_count{ + margin-top: -89px; + margin-left: 35px; + font-size: 33px; +} + + +.stat-head { + text-align: left !important; + font-weight: 300; + font-size: 18px; + margin-bottom: 25px; + margin-left: 24px; + width: 100%; + margin-top: 57px; + color: black; +} + +.top_chart{ + height: fit-content; +} +.row.main-section { + margin-right: 0px; !important; +} + +.chart-container { + border-radius: 0.3rem; + padding: 1rem; + margin: 1rem auto; +} + +.chart-container.card-shadow { + height: 100%; +} + +.half_chart.chart-container.card-shadow { + height: 49%; +} +#container { + height: 400px; +} + + +/*table*/ +.graph_details_table{ +position: absolute; + top: 45px; + right: 15px; + + background-color: white; + border-collapse: collapse; + border: 1px solid #ddd; + +} + +.graph_details_table th{ +background-color:#67b7dc; +color: white; + width: 250px; + height: 30px; +} + +.graph_details_table td{ +border: 1px solid #ddd; +height: 20px; +} + +.graph_details_table tr:nth-child(even){background-color: #f2f2f2;} + +.graph_details_table tr:hover {background-color: #ddd;} + +.chart-container h2 { + font-weight: 700; + font-size: 1.690rem; +} + +.hr_notification { + background: #f6f7fa; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); + height: 316px; + overflow-y: auto; + margin-bottom: 15px; +} +.hr_notification .media { + border-bottom: 1px solid #e6e6e6; + padding-bottom: 6px; + margin-bottom: 10px; +} +hr_notification .text-color.display-6 { + margin: 0px 0 3px; + color: #2d2d2d; +} +.hr_notification p { + margin: 0 0 1px; + color: #666; + font-size: 10px; +} +.chart_head { + font-size: 17px; + text-align: center; + padding: 12px 0; + color: #fff; + font-weight: 300; + background: #5ebade; + margin-bottom: 25px; +} +.hr_notification_head { + font-size: 17px; + text-align: center; + padding: 12px 0; + color: #fff; + font-weight: 300; + background: #5ebade; + margin-bottom: 9px; +} +@media (max-width: 767.98px) { + .oh-card{ + width: 100% !important; + } + .dashboard_main_section .form-control{ + width: 85% !important; + margin: 15px auto; + } + .sale_details{ + position: relative; + top: 0px !important; + right: 0px !important; + } + .selling_product_graph_view{ + margin-top: 5rem; + } + .hr_notification{ + min-width: 90% !important; + } +} +.hr_notification{ + min-width: 425.683px; + min-height: 316px; + max-width: 100%; +} +.media-body{ + + background: #466b8d; + float: left; + margin: 0; + width: 100% + +} diff --git a/product_management_app/static/src/js/product_dashboard.js b/product_management_app/static/src/js/product_dashboard.js new file mode 100644 index 000000000..1ca219d39 --- /dev/null +++ b/product_management_app/static/src/js/product_dashboard.js @@ -0,0 +1,472 @@ +odoo.define("product_management_app.ProductDashboard", function (require) { + "use strict"; + var AbstractAction = require('web.AbstractAction'); + var core = require('web.core'); + var QWeb = core.qweb; + var web_client = require('web.web_client'); + var _t = core._t; + var rpc = require('web.rpc'); + var self = this; + var DashBoard = AbstractAction.extend({ + contentTemplate: 'ProductDashboard', + events: { + 'change #prod_selection': 'onchange_prod_selection', + 'change #product_location_selection': 'onchange_location_selection', + }, + + init: function(parent, context) { + this._super(parent, context); + this.dashboard_templates = ['ProductMainSection', 'ProductGraphs']; + }, + start: function() { + var self = this; + this.set("title", 'Dashboard'); + return this._super().then(function() { + self.render_dashboards(); + self.render_graphs(); + }); + }, + willStart: function() { + var self = this; + return this._super() + }, + render_dashboards: function() { + //function to render main dashboard templates + var self = this; + this.fetch_data() + var templates = ['ProductMainSection', 'ProductGraphs']; + _.each(templates, function(template) { + self.$('.o_hr_dashboard').append(QWeb.render(template, {widget: self})) + }); + }, + + fetch_data: function() { + //function to fetch data to the tiles + var self = this + var def1 = this._rpc({ + model: 'product.template', + method: "get_data", + }) + .then(function (result) { + self.$("#product_templates").append('' + result.product_templates + ''); + self.$('#variants_count').append('' + result.product_variants + ''); + self.$('#products_storable').append('' + result.storable + ''); + self.$('#product_consumable').append('' + result.consumable + ''); + self.$('#product_service').append('' + result.service + ''); + self.$('#product_categ').append('' + result.category + ''); + self.$('#product_pricelist').append('' + result.price_list + ''); + self.$('#product_attribute').append('' + result.product_attribute + ''); + }); + }, + on_reverse_breadcrumb: function() { + // This function is called when the breadcrumb navigation is reversed. + var self = this; + web_client.do_push_state({}); + this.update_cp(); + this.fetch_data().then(function() { + self.$('.o_hr_dashboard').reload(); + self.render_dashboards(); + }); + }, + render_graphs: function(){ + //function to render graphs to the dashboard + var self = this; + self.render_top_sold_product(); + self.render_top_purchase_product(); + self.render_monthly_chart(); + self.render_product_categ_analysis(); + }, + render_top_sold_product: function() { + //function to render data for top sold canvas + var self = this + var ctx = self.$(".top_sale_chart"); + rpc.query({ + model: "product.template", + method: 'get_top_sale_data', + }).then(function (arrays) { + var data = { + labels : arrays[1], + datasets: [{ + label: "", + data: arrays[0], + backgroundColor: [ + "#1E90FF", + "#95B9C7", + "#66CDAA", + "#FF7F50", + "#F67280", + "#810541", + "#7D0552", + "#D58A94", + "#B041FF" + ], + borderColor: [ + "#1E90FF", + "#95B9C7", + "#66CDAA", + "#FF7F50", + "#F67280", + "#810541", + "#7D0552", + "#D58A94", + "#B041FF" + ], + borderWidth: 1 + },] + }; + + //options + var options = { + responsive: true, + title: false, + legend: { + display: true, + position: "right", + labels: { + fontColor: "#333", + fontSize: 16 + } + }, + scales: { + yAxes: [{ + gridLines: { + color: "rgba(0, 0, 0, 0)", + display: false, + }, + ticks: { + min: 0, + display: false, + } + }] + } + }; + //create Chart class object + var chart = new Chart(ctx, { + type: "pie", + data: data, + options: options + }); + }); + }, + render_top_purchase_product: function() { + //function to render data for top purchase canvas + var self = this + var ctx = self.$(".top_purchase_chart"); + rpc.query({ + model: "product.template", + method: 'get_top_purchase_data', + }).then(function (arrays) { + var data = { + labels : arrays[1], + datasets: [{ + label: "", + data: arrays[0], + backgroundColor: [ + "#003f5c", + "#2f4b7c", + "#f95d6a", + "#665191", + "#d45087", + "#ff7c43", + "#ffa600", + "#a05195", + "#6d5c16" + ], + borderColor: [ + "#003f5c", + "#2f4b7c", + "#f95d6a", + "#665191", + "#d45087", + "#ff7c43", + "#ffa600", + "#a05195", + "#6d5c16" + ], + borderWidth: 1 + },] + }; + + //options + var options = { + responsive: true, + title: false, + legend: { + display: true, + position: "right", + labels: { + fontColor: "#333", + fontSize: 16 + } + }, + scales: { + yAxes: [{ + gridLines: { + color: "rgba(0, 0, 0, 0)", + display: false, + }, + ticks: { + min: 0, + display: false, + } + }] + } + }; + //create Chart class object + var chart = new Chart(ctx, { + type: "doughnut", + data: data, + options: options + }); + }); + }, + render_product_categ_analysis: function() { + //function to render data for product category analysis + var self = this; + rpc.query({ + model: "product.template", + method: 'get_product_location_analysis', + }).then(function (result) { + var ctx = self.$("#product_categ_purchases"); + var location_name = result.location_name + var location_id = result.location_id + var j = 0; + var k = 0; + Object.entries(result.location_name).forEach(([key, value]) => { + if(k == 0){ + self.$('#product_location_selection').append('') + k++; + }else{ + self.$('#product_location_selection').append('') + k++; + } + + }); + self.$('#product_categ_table').hide(); + var option =self.$("#product_location_selection" ).val(); + rpc.query({ + model: "product.template", + method: "get_product_qty_by_loc", + args: [option] + }).then(function(result) { + var product = result.products + var product = result.quantity + var ctx = self.$("#product_qty"); + var myChart = new Chart(ctx, { + type: 'bar', + data: { + labels: product,//x axis + datasets: [{ + label: 'Count', // Name the series + data: product, // Specify the data values array + backgroundColor: '#ac3973', + borderColor: '#ac3973', + barPercentage: 0.5, + barThickness: 6, + maxBarThickness: 8, + minBarLength: 0, + borderWidth: 1, // Specify bar border width + type: 'bar', // Set this data to a line chart + fill: false + }] + }, + options: { + scales: { + y: { + beginAtZero: true + }, + }, + responsive: true, // Instruct chart js to respond nicely. + maintainAspectRatio: false, // Add to prevent default behaviour of full-width/height + } + }); + }); + }); + + }, + render_monthly_chart: function(e) { + //function to render data monthly wise. + var self = this; + rpc.query({ + model: "product.template", + method: 'get_products', + }).then(function (result) { + var ctx = self.$("#purchase_product"); + + var product_id = result.product_id + var product_name = result.product_name + var j = 0; + var k = 0; + Object.entries(result.product_name).forEach(([key, value]) => { + if(k == 0){ + self.$('#prod_selection').append('') + k++; + }else{ + self.$('#prod_selection').append('') + k++; + } + + }); + var option = self.$("#prod_selection" ).val(); + rpc.query({ + model: "product.template", + method: 'get_prod_details', + args: [option] + }).then(function (result) { + self.$("#purchase_product").empty(); + var ctx = self.$("#purchase_product"); + var name = result.name + var count = result.count; + var sum = result.sum; + var j = 0; + if (result) { + self.$('#purchase_product').append(' +
+ +
') + var ctx = self.$("#partner_graph"); + var name = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] + + var j = 0; + + if (window.myChart_year != undefined) + window.myChart_year.destroy(); + window.myChart_year = new Chart(ctx, { + type: 'line', + data: { + labels: name,//x axis + datasets: [ + { + label: 'Product Moves', // Name the series + data: count, // Specify the data values array + backgroundColor: '#0000ff', + borderColor: '#0000ff', + barPercentage: 0.5, + barThickness: 6, + maxBarThickness: 8, + minBarLength: 0, + borderWidth: 1, // Specify bar border width + type: 'line', // Set this data to a line chart + fill: false + },] + }, + options: { + scales: { + y: { + beginAtZero: true + }, + }, + responsive: true, // Instruct chart js to respond nicely. + maintainAspectRatio: false, // Add to prevent default behaviour of full-width/height + } + }); + } + }); + }); + }, + onchange_prod_selection: function() { + //function to render data while changing products + var self = this; + var option = self.$("#prod_selection" ).val(); + rpc.query({ + model: "product.template", + method: 'get_prod_details', + args: [option] + }).then(function (result) { + self.$("#purchase_product").empty(); + var ctx = self.$("#purchase_product"); + var name = result.name + var count = result.count; + var sum = result.sum; + var j = 0; + if (result) { + self.$('#purchase_product').append(' +
+ +
') + var ctx = self.$("#partner_graph"); + var name = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] + + var j = 0; + + if (window.myChart_year != undefined) + window.myChart_year.destroy(); + window.myChart_year = new Chart(ctx, { + type: 'line', + data: { + labels: name,//x axis + datasets: [ + { + label: 'Purchase Order Total', // Name the series + data: count, // Specify the data values array + backgroundColor: '#0000ff', + borderColor: '#0000ff', + barPercentage: 0.5, + barThickness: 6, + maxBarThickness: 8, + minBarLength: 0, + borderWidth: 1, // Specify bar border width + type: 'line', // Set this data to a line chart + fill: false + },] + }, + options: { + scales: { + y: { + beginAtZero: true + }, + }, + responsive: true, // Instruct chart js to respond nicely. + maintainAspectRatio: false, // Add to prevent default behaviour of full-width/height + } + }); + } + }); + + }, + onchange_location_selection: function() { + //function to render stock data of product while changing location + var self = this; + var option = self.$( "#product_location_selection" ).val(); + rpc.query({ + model: "product.template", + method: "get_product_qty_by_loc", + args: [option] + }).then(function(result) { + var product = result.products + var quantity = result.quantity + var ctx = self.$("#product_qty"); + var myChart = new Chart(ctx, { + type: 'bar', + data: { + labels: product,//x axis + datasets: [{ + label: 'Count', // Name the series + data: quantity, // Specify the data values array + backgroundColor: '#ac3973', + borderColor: '#ac3973', + barPercentage: 0.5, + barThickness: 6, + maxBarThickness: 8, + minBarLength: 0, + borderWidth: 1, // Specify bar border width + type: 'bar', // Set this data to a line chart + fill: false + }] + }, + options: { + scales: { + y: { + beginAtZero: true + }, + }, + responsive: true, // Instruct chart js to respond nicely. + maintainAspectRatio: false, // Add to prevent default behaviour of full-width/height + } + }); + }); + }, + }); + core.action_registry.add('product_dashboard_tag', DashBoard); + return DashBoard; +}); diff --git a/product_management_app/static/src/xml/dashboard.xml b/product_management_app/static/src/xml/dashboard.xml new file mode 100644 index 000000000..5c0221228 --- /dev/null +++ b/product_management_app/static/src/xml/dashboard.xml @@ -0,0 +1,252 @@ + + diff --git a/product_management_app/views/product_dashboard.xml b/product_management_app/views/product_dashboard.xml new file mode 100644 index 000000000..0e3498696 --- /dev/null +++ b/product_management_app/views/product_dashboard.xml @@ -0,0 +1,14 @@ + + + + + Dashboard + product_dashboard_tag + + + + diff --git a/product_management_app/views/product_template_views.xml b/product_management_app/views/product_template_views.xml new file mode 100644 index 000000000..fda4f9d51 --- /dev/null +++ b/product_management_app/views/product_template_views.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + +