diff --git a/top_selling_product_report/README.rst b/top_selling_product_report/README.rst new file mode 100644 index 000000000..d9d1c0998 --- /dev/null +++ b/top_selling_product_report/README.rst @@ -0,0 +1,45 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Top/Least Selling Product Report +================================ +Top Selling and Least Selling Product Reports + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +Developer: (V17) Ayana KP, +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/top_selling_product_report/__init__.py b/top_selling_product_report/__init__.py new file mode 100644 index 000000000..315ff3487 --- /dev/null +++ b/top_selling_product_report/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ayana KP (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import report +from . import wizard diff --git a/top_selling_product_report/__manifest__.py b/top_selling_product_report/__manifest__.py new file mode 100644 index 000000000..52e064d0c --- /dev/null +++ b/top_selling_product_report/__manifest__.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ayana KP (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +{ + 'name': 'Top/Least Selling Product Report', + 'version': '17.0.1.0.0', + 'category': 'Sales', + 'summary': 'Top Selling and Least Selling Product Reports in Sale', + 'description': 'Top Selling Products,Fast Moving Products,Most Selling ' + 'Products,Top Growing Products,Least Selling Products', + 'author': 'Cybrosys Techno solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['sale_management', 'stock'], + 'data': ['security/ir.model.access.csv', + 'report/top_selling_reports.xml', + 'report/top_selling_report_templates.xml', + 'wizard/top_selling_views.xml', + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/top_selling_product_report/doc/RELEASE_NOTES.md b/top_selling_product_report/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..1caf9b52c --- /dev/null +++ b/top_selling_product_report/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 27.12.2023 +#### Version 17.0.1.0.0 +##### ADD + +- Initial commit for Top/Least Selling Product Report diff --git a/top_selling_product_report/report/__init__.py b/top_selling_product_report/report/__init__.py new file mode 100644 index 000000000..a353d6003 --- /dev/null +++ b/top_selling_product_report/report/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ayana KP (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import top_selling_report diff --git a/top_selling_product_report/report/top_selling_report.py b/top_selling_product_report/report/top_selling_report.py new file mode 100644 index 000000000..aa496c9c1 --- /dev/null +++ b/top_selling_product_report/report/top_selling_report.py @@ -0,0 +1,121 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ayana KP (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +import dateutil.relativedelta +from dateutil.relativedelta import relativedelta +from datetime import timedelta, date +from odoo import models + + +class TopSellingReport(models.AbstractModel): + """The CustomReport abstract Model is used to generate a top-selling + products report based on various date options.""" + _name = "report.top_selling_product_report.top_selling_reports" + _description = "Top selling products report" + + def _get_report_values(self, docids, data=None): + """Generate the data for the top-selling products report. + Args: + data (dict): A dictionary containing the parameters for the report. + Returns: + dict: A dictionary containing the data and other details of the + top-selling products report.""" + limit_value = int(data['period']) if data['period'] else None + date_option = data['date'] + date_selected_from = None + date_selected = None + date_selected_to = None + other_details = {} + company_id = data['company'] + warehouse_id = data['warehouse'] + from_date = date.today() - dateutil.relativedelta.relativedelta( + years=100) + to_date = date.today() + dateutil.relativedelta.relativedelta(days=1) + if date_option == 'days': + from_date = date.today() - dateutil.relativedelta.relativedelta( + days=11) + to_date = date.today() + dateutil.relativedelta.relativedelta( + days=1) + date_selected = "Last 10 Days" + elif date_option == 'last_month': + date_limit = date.today() - dateutil.relativedelta.relativedelta( + months=1) + from_date = date_limit.replace(day=1) + to_date = (date_limit + relativedelta(months=1, + day=1)) - timedelta(1) + date_selected = "Last Month" + elif date_option == 'curr_month': + from_date = date.today().replace(day=1) + to_date = date.today() + dateutil.relativedelta.relativedelta( + days=1) + date_selected = "Current Month" + elif date_option == 'last_year': + date_limit = date.today() - dateutil.relativedelta.relativedelta( + years=1) + from_date = date_limit.replace(day=1) + to_date = (date_limit + relativedelta(months=12, + day=1)) - timedelta(1) + date_selected = "Last Year" + elif date_option == 'curr_year': + from_date = date.today().replace(month=1, day=1) + to_date = date.today() + dateutil.relativedelta.relativedelta( + days=1) + date_selected = "Current Year" + elif date_option == 'select_period': + from_date = data['from_date'] + to_date = data['to_date'] + date_selected_from = from_date + date_selected_to = to_date + other_details.update({ + 'limit': limit_value, + 'least': data['least'], + 'range': date_selected, + 'date_selected_from': date_selected_from, + 'date_selected_to': date_selected_to, + }) + sale_report_model = self.env['sale.report'] + states = sale_report_model._get_done_states() + data_domain = [('state', 'in', states), ('date', '>=', from_date), + ('date', '<=', to_date), + ('company_id', 'in', company_id)] + if warehouse_id: + data_domain.append(('warehouse_id', 'in', warehouse_id)) + sale_data = sale_report_model.search(data_domain) + product_dict = {} + for record in sale_data: + product_name = record.product_id.display_name + if product_name in product_dict: + product_dict[product_name][ + 'sold_quantity'] += record.product_uom_qty + else: + product_dict[product_name] = { + 'product_name': product_name, + 'sold_quantity': record.product_uom_qty, + 'uom': record.product_uom.name, + } + sorted_products = sorted(product_dict.values(), + key=lambda x: x['sold_quantity'], + reverse=not data['least']) + limit_products = sorted_products[:limit_value] + return { + 'data': limit_products, + 'other': other_details, + } diff --git a/top_selling_product_report/report/top_selling_report_templates.xml b/top_selling_product_report/report/top_selling_report_templates.xml new file mode 100644 index 000000000..c44d238b0 --- /dev/null +++ b/top_selling_product_report/report/top_selling_report_templates.xml @@ -0,0 +1,150 @@ + + + + + + + diff --git a/top_selling_product_report/report/top_selling_reports.xml b/top_selling_product_report/report/top_selling_reports.xml new file mode 100644 index 000000000..5efadc188 --- /dev/null +++ b/top_selling_product_report/report/top_selling_reports.xml @@ -0,0 +1,11 @@ + + + + + Top Selling Product Report + top.selling + qweb-pdf + top_selling_product_report.top_selling_reports + top_selling_product_report.top_selling_reports + + diff --git a/top_selling_product_report/security/ir.model.access.csv b/top_selling_product_report/security/ir.model.access.csv new file mode 100644 index 000000000..810c5d7fe --- /dev/null +++ b/top_selling_product_report/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_top_selling_manager,access.top.selling.manager,model_top_selling,sales_team.group_sale_manager,1,1,1,1 diff --git a/top_selling_product_report/static/description/assets/icons/capture (1).png b/top_selling_product_report/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/capture (1).png differ diff --git a/top_selling_product_report/static/description/assets/icons/check.png b/top_selling_product_report/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/check.png differ diff --git a/top_selling_product_report/static/description/assets/icons/chevron.png b/top_selling_product_report/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/chevron.png differ diff --git a/top_selling_product_report/static/description/assets/icons/cogs.png b/top_selling_product_report/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/cogs.png differ diff --git a/top_selling_product_report/static/description/assets/icons/consultation.png b/top_selling_product_report/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/consultation.png differ diff --git a/top_selling_product_report/static/description/assets/icons/ecom-black.png b/top_selling_product_report/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/ecom-black.png differ diff --git a/top_selling_product_report/static/description/assets/icons/education-black.png b/top_selling_product_report/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/education-black.png differ diff --git a/top_selling_product_report/static/description/assets/icons/hotel-black.png b/top_selling_product_report/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/hotel-black.png differ diff --git a/top_selling_product_report/static/description/assets/icons/img.png b/top_selling_product_report/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/img.png differ diff --git a/top_selling_product_report/static/description/assets/icons/license.png b/top_selling_product_report/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/license.png differ diff --git a/top_selling_product_report/static/description/assets/icons/lifebuoy.png b/top_selling_product_report/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/lifebuoy.png differ diff --git a/top_selling_product_report/static/description/assets/icons/manufacturing-black.png b/top_selling_product_report/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/manufacturing-black.png differ diff --git a/top_selling_product_report/static/description/assets/icons/photo-capture.png b/top_selling_product_report/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/photo-capture.png differ diff --git a/top_selling_product_report/static/description/assets/icons/pos-black.png b/top_selling_product_report/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/pos-black.png differ diff --git a/top_selling_product_report/static/description/assets/icons/puzzle.png b/top_selling_product_report/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/puzzle.png differ diff --git a/top_selling_product_report/static/description/assets/icons/restaurant-black.png b/top_selling_product_report/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/restaurant-black.png differ diff --git a/top_selling_product_report/static/description/assets/icons/service-black.png b/top_selling_product_report/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/service-black.png differ diff --git a/top_selling_product_report/static/description/assets/icons/trading-black.png b/top_selling_product_report/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/trading-black.png differ diff --git a/top_selling_product_report/static/description/assets/icons/training.png b/top_selling_product_report/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/training.png differ diff --git a/top_selling_product_report/static/description/assets/icons/update.png b/top_selling_product_report/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/update.png differ diff --git a/top_selling_product_report/static/description/assets/icons/user.png b/top_selling_product_report/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/user.png differ diff --git a/top_selling_product_report/static/description/assets/icons/wrench.png b/top_selling_product_report/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/top_selling_product_report/static/description/assets/icons/wrench.png differ diff --git a/top_selling_product_report/static/description/assets/misc/Cybrosys R.png b/top_selling_product_report/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/top_selling_product_report/static/description/assets/misc/Cybrosys R.png differ diff --git a/top_selling_product_report/static/description/assets/misc/email.svg b/top_selling_product_report/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/top_selling_product_report/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/top_selling_product_report/static/description/assets/misc/phone.svg b/top_selling_product_report/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/top_selling_product_report/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/top_selling_product_report/static/description/assets/misc/star (1) 2.svg b/top_selling_product_report/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/top_selling_product_report/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/top_selling_product_report/static/description/assets/misc/support (1) 1.svg b/top_selling_product_report/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/top_selling_product_report/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/top_selling_product_report/static/description/assets/misc/support-email.svg b/top_selling_product_report/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/top_selling_product_report/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/top_selling_product_report/static/description/assets/misc/tick-mark.svg b/top_selling_product_report/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/top_selling_product_report/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/top_selling_product_report/static/description/assets/misc/whatsapp 1.svg b/top_selling_product_report/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/top_selling_product_report/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/top_selling_product_report/static/description/assets/misc/whatsapp.svg b/top_selling_product_report/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/top_selling_product_report/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/top_selling_product_report/static/description/assets/modules/1.png b/top_selling_product_report/static/description/assets/modules/1.png new file mode 100644 index 000000000..8513873ea Binary files /dev/null and b/top_selling_product_report/static/description/assets/modules/1.png differ diff --git a/top_selling_product_report/static/description/assets/modules/2.jpg b/top_selling_product_report/static/description/assets/modules/2.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/top_selling_product_report/static/description/assets/modules/2.jpg differ diff --git a/top_selling_product_report/static/description/assets/modules/3.png b/top_selling_product_report/static/description/assets/modules/3.png new file mode 100644 index 000000000..cb17cf612 Binary files /dev/null and b/top_selling_product_report/static/description/assets/modules/3.png differ diff --git a/top_selling_product_report/static/description/assets/modules/4.png b/top_selling_product_report/static/description/assets/modules/4.png new file mode 100644 index 000000000..d6b1fe049 Binary files /dev/null and b/top_selling_product_report/static/description/assets/modules/4.png differ diff --git a/top_selling_product_report/static/description/assets/modules/5.jpg b/top_selling_product_report/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..87c2bb2ba Binary files /dev/null and b/top_selling_product_report/static/description/assets/modules/5.jpg differ diff --git a/top_selling_product_report/static/description/assets/modules/6.png b/top_selling_product_report/static/description/assets/modules/6.png new file mode 100644 index 000000000..a0ac2d840 Binary files /dev/null and b/top_selling_product_report/static/description/assets/modules/6.png differ diff --git a/top_selling_product_report/static/description/assets/screenshots/1.png b/top_selling_product_report/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..2daf5d343 Binary files /dev/null and b/top_selling_product_report/static/description/assets/screenshots/1.png differ diff --git a/top_selling_product_report/static/description/assets/screenshots/2.png b/top_selling_product_report/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..6fa43370e Binary files /dev/null and b/top_selling_product_report/static/description/assets/screenshots/2.png differ diff --git a/top_selling_product_report/static/description/assets/screenshots/3.png b/top_selling_product_report/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..62d8a1686 Binary files /dev/null and b/top_selling_product_report/static/description/assets/screenshots/3.png differ diff --git a/top_selling_product_report/static/description/assets/screenshots/4.png b/top_selling_product_report/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..bdb404d96 Binary files /dev/null and b/top_selling_product_report/static/description/assets/screenshots/4.png differ diff --git a/top_selling_product_report/static/description/assets/screenshots/hero.gif b/top_selling_product_report/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..aa681df14 Binary files /dev/null and b/top_selling_product_report/static/description/assets/screenshots/hero.gif differ diff --git a/top_selling_product_report/static/description/banner.png b/top_selling_product_report/static/description/banner.png new file mode 100644 index 000000000..0dea4f332 Binary files /dev/null and b/top_selling_product_report/static/description/banner.png differ diff --git a/top_selling_product_report/static/description/icon.png b/top_selling_product_report/static/description/icon.png new file mode 100644 index 000000000..17d668349 Binary files /dev/null and b/top_selling_product_report/static/description/icon.png differ diff --git a/top_selling_product_report/static/description/index.html b/top_selling_product_report/static/description/index.html new file mode 100644 index 000000000..b67c8a97e --- /dev/null +++ b/top_selling_product_report/static/description/index.html @@ -0,0 +1,739 @@ + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Top/Least Selling Product Report

+

+ Report of Top/Least Selling Products. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Generates Top/Least Selling Product Report.

+

Generating Top + Selling and Least Selling Product PDF Reports. +

+
+
+
+
+
+
+ +
+
+

+ Generates Reports for Certain Time Periods.

+

Option for + Select Time Period. +

+
+
+
+
+
+
+ +
+
+

+ Report for a Range of Products.

+
+
+
+
+
+
+ +
+
+

+ Community & Enterprise Support.

+

Available in + Odoo 17.0 Community and Enterprise. +

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

+ Select menu Top/Least Selling Product Report + from Sales module.
+ When you install this module, an extra menu + named Top/Least Selling Product will be + created.

+
+
+
+
+
+
+ +
+
+

+ From the wizard,we can select + Companies,Warehouse,Number of Products and + Select a time period from 'Top Selling + product of' selection field. If we check + 'Least Selling Product' then it will + generate the least selling product + report.

+
+
+
+
+
+
+ +
+
+

+ Report on Top Selling Products.

+
+
+
+
+
+
+ +
+
+

+ Report on Least Selling Products.

+
+
+
+
+
+
+
    +
  • + Generates + Top/Least Selling Product Report. +
  • +
  • + Generates + Reports for Certain Time Periods. +
  • +
  • + Report for a + Range of Products. +
  • + +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:27th December 2023 +
+

+ + Initial Commit for Top/Least Selling Product + Report.

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

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

Odoo + Customization

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

Odoo + Implementation

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

Odoo + Support

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

Hire + Odoo Developer

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

Odoo + Integration

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

Odoo + Migration

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

Odoo + Consultancy

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

Odoo + Implementation

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

Odoo + Licensing Consultancy

+
+
+
+
+
+
+

+ Our Industries

+ +
+
+
+
+
+
+ +

Trading

+

Easily procure and sell your products

+
+
+
+
+ +

POS

+

Easy configuration and convivial experience

+
+
+
+
+ +

+ Education

+

A platform for educational management

+
+
+
+
+ +

+ Manufacturing

+

Plan, track and schedule your operations

+
+
+
+
+ +

E-commerce & + Website

+

Mobile friendly, awe-inspiring product pages

+
+
+
+
+ +

Service + Management

+

Keep track of services and invoice

+
+
+
+
+ +

+ Restaurant

+

Run your bar or restaurant methodically

+
+
+
+
+ +

Hotel + Management

+

An all-inclusive hotel management application

+
+
+
+
+
+
+

+ Support

+
+
+
+
+
+
+
+ +
+ Need + Help? +

Got + questions or need help? Get in touch.

+
odoo@cybrosys.com +
+
+
+
+
+
+
+
+ +
+ WhatsApp +

Say hi to + us on WhatsApp!

+
+91 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/top_selling_product_report/wizard/__init__.py b/top_selling_product_report/wizard/__init__.py new file mode 100644 index 000000000..bb2e3b0ab --- /dev/null +++ b/top_selling_product_report/wizard/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ayana KP (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import top_selling diff --git a/top_selling_product_report/wizard/top_selling.py b/top_selling_product_report/wizard/top_selling.py new file mode 100644 index 000000000..24151878e --- /dev/null +++ b/top_selling_product_report/wizard/top_selling.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Ayana KP (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import fields, models + + +class TopSelling(models.TransientModel): + """This model serves as a wizard that collects various parameters from + the user to filter the report data.""" + _name = 'top.selling' + _description = 'Top selling Products' + + from_date = fields.Date(string='From', help="From date of report") + to_date = fields.Date(string='To', help="To date of report") + date = fields.Selection( + [('days', 'Last 10 Days'), ('curr_month', 'Current Month'), + ('last_month', 'Last Month'), + ('curr_year', 'Current Year'), ('last_year', 'Last Year'), + ('select_period', 'Select Period')], help="Choose date range", + string="Top Selling product of", default='days') + period = fields.Char(string="Products Range", + help="Enter number of products in report.") + least = fields.Boolean(string="Least Selling Product", + help="Enable to print least selling product report") + company_ids = fields.Many2many('res.company', + default=lambda + self: self.env.user.company_id, + string="Company", help="company") + warehouse_ids = fields.Many2many('stock.warehouse', string="Warehouse", + help="Choose warehouse") + + def action_print_report(self): + """Generate and print the "Top Selling Products" report based on the + selected parameters.""" + warehouse_id = [] + if self.company_ids: + company_id = self.company_ids.ids + else: + company_id = self.env['res.company'].search([]).ids + if self.warehouse_ids: + warehouse_id = self.warehouse_ids.ids + data = {'date': self.date, 'period': self.period, 'least': self.least, + 'from_date': self.from_date, + 'to_date': self.to_date, 'company': company_id, + 'warehouse': warehouse_id} + return self.env.ref( + 'top_selling_product_report.top_selling_pdf').report_action(self, + data=data) diff --git a/top_selling_product_report/wizard/top_selling_views.xml b/top_selling_product_report/wizard/top_selling_views.xml new file mode 100644 index 000000000..c171370ba --- /dev/null +++ b/top_selling_product_report/wizard/top_selling_views.xml @@ -0,0 +1,52 @@ + + + + + top.selling.view.form + top.selling + +
+ + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + Top/Least Selling Products + top.selling + form + new + + +