diff --git a/product_management_app/README.rst b/product_management_app/README.rst new file mode 100644 index 000000000..f1db6d6d0 --- /dev/null +++ b/product_management_app/README.rst @@ -0,0 +1,41 @@ +Product Management +================== +* Product Management module for Odoo 16. + +Installation +============ + - www.odoo.com/documentation/16.0/setup/install.html + - Install our custom addon + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html) + +Company +------- +* 'Cybrosys Techno Solutions '__ + +Credits +------- +* 'Cybrosys Techno Solutions '__ + Developer : Neethu UM + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ + diff --git a/product_management_app/__init__.py b/product_management_app/__init__.py new file mode 100644 index 000000000..69f10b833 --- /dev/null +++ b/product_management_app/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models diff --git a/product_management_app/__manifest__.py b/product_management_app/__manifest__.py new file mode 100644 index 000000000..130b53ae5 --- /dev/null +++ b/product_management_app/__manifest__.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Product Management V16', + 'version': '16.0.1.0.0', + 'summary': 'Product Management Dashboard', + 'description': 'Product Management Dashboard', + 'category': 'Extra Tools', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'license': 'LGPL-3', + 'depends': ['product', 'sale', 'purchase', 'stock'], + 'data': [ + 'views/product_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', + ], + '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..a2a13776d --- /dev/null +++ b/product_management_app/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 17.01.2023 +#### Version 16.0.1.0.0 +#### ADD +- Initial commit for Product Management Module diff --git a/product_management_app/models/__init__.py b/product_management_app/models/__init__.py new file mode 100644 index 000000000..ed6c9441c --- /dev/null +++ b/product_management_app/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2022-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import product diff --git a/product_management_app/models/product.py b/product_management_app/models/product.py new file mode 100644 index 000000000..43ea65d88 --- /dev/null +++ b/product_management_app/models/product.py @@ -0,0 +1,202 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models, api +import calendar + + +class ProductTemplate(models.Model): + _inherit = 'product.template' + + @api.model + def get_data(self): + """Returns data to the tiles of dashboard""" + product_templates = self.env['product.template'].search([]) + product_variants = self.env['product.product'].search([]) + storable = self.env['product.template'].search([('detailed_type', '=', 'product')]) + consumable = self.env['product.template'].search([('detailed_type', '=', 'consu')]) + service = self.env['product.template'].search([('detailed_type', '=', 'service')]) + category = self.env['product.category'].search([]) + price_list = self.env['product.pricelist'].search([]) + attribute = self.env['product.attribute'].search([]) + return { + 'product_templates': len(product_templates), + 'product_variants': len(product_variants), + 'storable': len(storable), + 'consumable': len(consumable), + 'service': len(service), + 'category': len(category), + 'price_list': len(price_list), + 'product_attribute': len(attribute), + } + + @api.model + def get_top_sale_data(self): + """return the top sale""" + company_id = self.env.company.id + query = '''select DISTINCT(product_template.name ->> 'en_US') 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( + company_id) + ''' group by product_template.id ORDER + BY total_quantity DESC Limit 10 ''' + self._cr.execute(query) + top_product = self._cr.dictfetchall() + total_quantity = [] + for record in top_product: + total_quantity.append(record.get('total_quantity')) + product_name = [] + for record in top_product: + product_name.append(record.get('product_name')) + final = [total_quantity, product_name] + return final + + @api.model + def get_top_purchase_data(self): + """Returns top purchase data""" + company_id = self.env.company.id + query = '''select DISTINCT(product_template.name ->> 'en_US') 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( + company_id) + ''' group by product_template.id ORDER + BY total_quantity DESC Limit 10 ''' + + self._cr.execute(query) + top_product = self._cr.dictfetchall() + total_quantity = [] + for record in top_product: + total_quantity.append(record.get('total_quantity')) + product_name = [] + for record in top_product: + product_name.append(record.get('product_name')) + final = [total_quantity, product_name] + return final + + @api.model + def get_product_location_analysis(self): + """Returns the location, location id to the selection""" + company = self.env.user.company_id.id + categ_qry = """select id, complete_name from stock_location""" + self._cr.execute(categ_qry) + location = self._cr.dictfetchall() + location_id = [] + location_name = [] + for record in location: + location_id.append(record.get('id')) + location_name.append(record.get('complete_name')) + value1 = {'location_id': location_id, 'location_name': location_name} + return value1 + + @api.model + def get_products(self): + """Returns the product, product name to the selection""" + data = self.env['product.template'].search([]) + product_id = [] + product_name = [] + for record in data: + product_id.append(record.id) + product_name.append(self.env['product.template'].search([('id', '=', record.id)]).name) + value1 = {'product_id': product_id, 'product_name': product_name} + return value1 + + @api.model + def get_prod_details(self, data): + """Returns the monthly analysis of product movement""" + query = """select product_template.name ->> 'en_US' 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 + }) + count = [] + months = [] + cr = sorted(product_move, key=lambda i: i['month']) + for rec in cr: + count.append(rec['count']) + months.append(rec['dates']) + return { + 'count': count, + 'dates': months + } + + @api.model + def product_move_by_category(self, args): + """rpc method of product moves by category + Returns category name and quantity_done""" + category_id = int(args) + company_id = self.env.company.id + query = ('''select product_template.name,sum(stock_move_line.qty_done) 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 + inner join product_category on product_template.categ_id = product_category.id + where stock_move_line.company_id = %s and product_category.id = %s group by product_template.name''' % + (company_id, category_id)) + self._cr.execute(query) + product_move = self._cr.dictfetchall() + quantity_done = [] + name = [] + for record in product_move: + quantity_done.append(record.get('sum')) + name.append(record.get('name')) + value = { + 'name': name, + 'count': quantity_done, + } + return value + + @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 ->> 'en_US' 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))) + result = self._cr.execute(query) + product_qty = self._cr.dictfetchall() + product = [] + quantity = [] + for rec in product_qty: + product.append(rec['name']) + quantity.append(rec['quantity']) + return { + 'products': product, + 'quantity': quantity, + } 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..5ce97dbb4 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..3a846884c 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..8a1f7e0a6 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..6c800eff3 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..b145c7a29 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..3b4779a1d 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..932a86a94 --- /dev/null +++ b/product_management_app/static/description/index.html @@ -0,0 +1,542 @@ +
+ +
+ +
+
+ Community +
+
+
+ +
+
+
+ +

Product Management

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ This module helps to manage the products independently. +
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + Product as seperate Module +
+
+ + Manage product, product variants, price list, product stock, its movements +
+
+ + Dashboard to show the product's contents in general +
+
+ + Graphs to show tops sold/purchased products +
+
+ + Graphs to show product movements in each month +
+
+ + Graphs to show product based on the location +
+
+ +
+ + + + +
+
+ +
+

Screenshots +

+
+
+
+
+

Product Module over view +

+ +
+
+

Product's Dashboard +

+

Dashboard for quick overview of the products

+ + +
+ +
+

Products' monthly analysis +

+

Product moved are plot against each month

+ +
+
+

Products by location +

+

Based on the selected location the product, it's quantity can be view 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

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file 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..0fd17dd00 --- /dev/null +++ b/product_management_app/static/src/css/dashboard_views.css @@ -0,0 +1,322 @@ +.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: 9px; +} +.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..c80af9f4b --- /dev/null +++ b/product_management_app/static/src/js/product_dashboard.js @@ -0,0 +1,463 @@ +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 session = require('web.session'); + var ajax = require('web.ajax'); + 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() { + var self = this; + this.fetch_data() + var templates = [] + var templates = ['ProductMainSection', 'ProductGraphs']; + _.each(templates, function(template) { + self.$('.o_hr_dashboard').append(QWeb.render(template, {widget: self})) + }); + }, + fetch_data: function() { + var self = this +// fetch data to the tiles + var def1 = this._rpc({ + model: 'product.template', + method: "get_data", + }) + .then(function (result) { + $('#product_templates').append('' + result.product_templates + ''); + $('#variants_count').append('' + result.product_variants + ''); + $('#products_storable').append('' + result.storable + ''); + $('#product_consumable').append('' + result.consumable + ''); + $('#product_service').append('' + result.service + ''); + $('#product_categ').append('' + result.category + ''); + $('#product_pricelist').append('' + result.price_list + ''); + $('#product_attribute').append('' + result.product_attribute + ''); + }); + }, + on_reverse_breadcrumb: function() { + 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(){ + 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() { + 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() { + 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() { + rpc.query({ + model: "product.template", + method: 'get_product_location_analysis', + }).then(function (result) { + var ctx = $("#product_categ_purchases"); +// var name = result[0].name // Add data values to array +// var count = result[0].count + 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){ + $('#product_location_selection').append('') + k++; + }else{ + $('#product_location_selection').append('') + k++; + } + + }); + $('#product_categ_table').hide(); + var option = $( "#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 = $("#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) { + rpc.query({ + model: "product.template", + method: 'get_products', + }).then(function (result) { + var ctx = $("#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){ + $('#prod_selection').append('') + k++; + }else{ + $('#prod_selection').append('') + k++; + } + + }); + var option = $( "#prod_selection" ).val(); + rpc.query({ + model: "product.template", + method: 'get_prod_details', + args: [option] + }).then(function (result) { + $("#purchase_product").empty(); + var ctx = $("#purchase_product"); + var name = result.name + var count = result.count; + var sum = result.sum; + var j = 0; + if (result) { + $('#purchase_product').append(' +
+ +
') + var ctx = $("#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() { + var option = $( "#prod_selection" ).val(); + rpc.query({ + model: "product.template", + method: 'get_prod_details', + args: [option] + }).then(function (result) { + $("#purchase_product").empty(); + var ctx = $("#purchase_product"); + var name = result.name + var count = result.count; + var sum = result.sum; + var j = 0; + if (result) { + $('#purchase_product').append(' +
+ +
') + var ctx = $("#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() { + var option = $( "#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 = $("#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; +}); \ No newline at end of file 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..e95d8538e --- /dev/null +++ b/product_management_app/static/src/xml/dashboard.xml @@ -0,0 +1,256 @@ + + \ No newline at end of file diff --git a/product_management_app/views/product_dashboard.xml b/product_management_app/views/product_dashboard.xml new file mode 100644 index 000000000..5cfaabe87 --- /dev/null +++ b/product_management_app/views/product_dashboard.xml @@ -0,0 +1,12 @@ + + + + Dashboard + product_dashboard_tag + + + \ No newline at end of file diff --git a/product_management_app/views/product_views.xml b/product_management_app/views/product_views.xml new file mode 100644 index 000000000..1f7a4bf67 --- /dev/null +++ b/product_management_app/views/product_views.xml @@ -0,0 +1,16 @@ + + + + + + + + + + \ No newline at end of file