diff --git a/inventory_forecast_analysis_report/README.rst b/inventory_forecast_analysis_report/README.rst new file mode 100644 index 000000000..2c60f8677 --- /dev/null +++ b/inventory_forecast_analysis_report/README.rst @@ -0,0 +1,49 @@ +.. 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 + +Inventory Forecast Analysis Report +================================== +* This module helps you to find all the stock quantities like on-hand, + sold, forecasted, pending, minimum and suggested for all the + storable products. + +Installation +============ + - www.odoo.com/documentation/15.0/setup/install.html + - Install our custom addon +License +------- +General Public License, Version 3 (AGPL v3). +(http://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: +(V15) Sabeel @ Cybrosys +(V16) Raveena @ Cybrosys + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ \ No newline at end of file diff --git a/inventory_forecast_analysis_report/__init__.py b/inventory_forecast_analysis_report/__init__.py new file mode 100644 index 000000000..2c352b6a7 --- /dev/null +++ b/inventory_forecast_analysis_report/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Sabeel B (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 models +from . import wizards diff --git a/inventory_forecast_analysis_report/__manifest__.py b/inventory_forecast_analysis_report/__manifest__.py new file mode 100644 index 000000000..adc0264c4 --- /dev/null +++ b/inventory_forecast_analysis_report/__manifest__.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Sabeel B (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": "Inventory Forecast Analysis Report", + "version": "15.0.1.0.0", + "category": "Warehouse", + "summary": "Helps to find all the stock quantities", + "description": "This module allows the user to find all the " + "stock quantities like onhand, sold, forecasted," + " pending, minimum and suggested for all the products.", + "author": "Cybrosys Techno Solutions", + "company": "Cybrosys Techno Solutions", + "maintainer": "Cybrosys Techno Solutions", + "website": "https://www.cybrosys.com", + "depends": ["stock", "sale"], + "data": [ + "security/ir.model.access.csv", + "views/forecast_report_views.xml", + "views/product_template_views.xml", + "wizards/forecast_analysis_report_views.xml", + ], + "images": ["static/description/banner.png"], + "license": "AGPL-3", + "installable": True, + "auto_install": False, + "application": False, +} diff --git a/inventory_forecast_analysis_report/doc/RELEASE_NOTES.md b/inventory_forecast_analysis_report/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..2a2f9ba06 --- /dev/null +++ b/inventory_forecast_analysis_report/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 26.06.2024 +#### Version 15.0.1.0.0 +#### ADD +- Initial Commit for Inventory Forecast Analysis Report diff --git a/inventory_forecast_analysis_report/models/__init__.py b/inventory_forecast_analysis_report/models/__init__.py new file mode 100644 index 000000000..7b0fdb130 --- /dev/null +++ b/inventory_forecast_analysis_report/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Sabeel B (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 forecast_analysis_report +from . import product_template +from . import product_brand diff --git a/inventory_forecast_analysis_report/models/forecast_analysis_report.py b/inventory_forecast_analysis_report/models/forecast_analysis_report.py new file mode 100644 index 000000000..4471cd151 --- /dev/null +++ b/inventory_forecast_analysis_report/models/forecast_analysis_report.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Sabeel B (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 ForecastReport(models.TransientModel): + """A Transient model for the inventory forecast analysis report""" + + _name = "forecast.report" + _description = "Stock Forecast Analysis Report" + _rec_name = "product_id" + + product_id = fields.Many2one("product.product", + string="Product", help="Product") + product_category_id = fields.Many2one( + "product.category", string="Category", + help="Category of the product" + ) + product_brand_id = fields.Many2one( + "product.brand", string="Brand", + help="Brand of the product" + ) + supplier_id = fields.Many2one( + "res.partner", string="Supplier", + help="Supplier of the product" + ) + location_id = fields.Many2one( + "stock.location", string="Location", + help="Product Location" + ) + sold = fields.Float(string="Sold Qty", help="The qty that is already sold") + on_hand = fields.Float(string="On Hand Qty", + help="On-hand qty of the product") + forecast = fields.Float( + string="Forecasted Qty", help="Forecasted qty of the product" + ) + pending = fields.Float(string="Pending Qty", help="Pending quantity") + minimum = fields.Float(string="Minimum Qty", help="Minimum quantity") + suggested = fields.Float(string="Suggested Qty", help="Suggested quantity") diff --git a/inventory_forecast_analysis_report/models/product_brand.py b/inventory_forecast_analysis_report/models/product_brand.py new file mode 100644 index 000000000..aecf9fc72 --- /dev/null +++ b/inventory_forecast_analysis_report/models/product_brand.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Sabeel B (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 ProductBrand(models.Model): + _name = "product.brand" + _description = "Product Brand" + _rec_name = 'brand' + + brand = fields.Char( + string='Brand', required=True, + help="Name of the Brand that the product belongs to.") + description = fields.Text(string='Description', + help="Description of the brand") diff --git a/inventory_forecast_analysis_report/models/product_template.py b/inventory_forecast_analysis_report/models/product_template.py new file mode 100644 index 000000000..d52a10a0d --- /dev/null +++ b/inventory_forecast_analysis_report/models/product_template.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Sabeel B (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 ProductTemplate(models.Model): + """Inherited product_template to add new fields""" + _inherit = "product.template" + + product_brand_id = fields.Many2one('product.brand', + string="Product Brand", + help="Brand of the Product.") diff --git a/inventory_forecast_analysis_report/security/ir.model.access.csv b/inventory_forecast_analysis_report/security/ir.model.access.csv new file mode 100644 index 000000000..23ef15062 --- /dev/null +++ b/inventory_forecast_analysis_report/security/ir.model.access.csv @@ -0,0 +1,4 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_product_brand,access.product.brand,model_product_brand,base.group_user,1,1,1,1 +access_forecast_analysis_report,access.forecast.analysis.report,model_forecast_analysis_report,base.group_user,1,1,1,1 +access_forecast_report,access.forecast.report,model_forecast_report,base.group_user,1,1,1,1 diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/check.png b/inventory_forecast_analysis_report/static/description/assets/icons/check.png new file mode 100644 index 000000000..ea0da5029 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/check.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/chevron.png b/inventory_forecast_analysis_report/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..f49dd8541 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/chevron.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/cogs.png b/inventory_forecast_analysis_report/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/cogs.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/consultation.png b/inventory_forecast_analysis_report/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/consultation.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/ecom-black.png b/inventory_forecast_analysis_report/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/ecom-black.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/education-black.png b/inventory_forecast_analysis_report/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/education-black.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/hotel-black.png b/inventory_forecast_analysis_report/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/hotel-black.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/icon.png b/inventory_forecast_analysis_report/static/description/assets/icons/icon.png new file mode 100644 index 000000000..61b0eb171 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/icon.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/license.png b/inventory_forecast_analysis_report/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/license.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/lifebuoy.png b/inventory_forecast_analysis_report/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/lifebuoy.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/logo.png b/inventory_forecast_analysis_report/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/logo.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/manufacturing-black.png b/inventory_forecast_analysis_report/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/manufacturing-black.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/pos-black.png b/inventory_forecast_analysis_report/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/pos-black.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/puzzle.png b/inventory_forecast_analysis_report/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/puzzle.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/restaurant-black.png b/inventory_forecast_analysis_report/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/restaurant-black.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/service-black.png b/inventory_forecast_analysis_report/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/service-black.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/trading-black.png b/inventory_forecast_analysis_report/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/trading-black.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/training.png b/inventory_forecast_analysis_report/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/training.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/update.png b/inventory_forecast_analysis_report/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/update.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/user.png b/inventory_forecast_analysis_report/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/user.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/icons/wrench.png b/inventory_forecast_analysis_report/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/icons/wrench.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/misc/categories.png b/inventory_forecast_analysis_report/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/misc/categories.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/misc/check-box.png b/inventory_forecast_analysis_report/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/misc/check-box.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/misc/compass.png b/inventory_forecast_analysis_report/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/misc/compass.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/misc/corporate.png b/inventory_forecast_analysis_report/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/misc/corporate.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/misc/customer-support.png b/inventory_forecast_analysis_report/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/misc/customer-support.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/misc/cybrosys-logo.png b/inventory_forecast_analysis_report/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/misc/cybrosys-logo.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/misc/features.png b/inventory_forecast_analysis_report/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/misc/features.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/misc/logo.png b/inventory_forecast_analysis_report/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/misc/logo.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/misc/pictures.png b/inventory_forecast_analysis_report/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/misc/pictures.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/misc/pie-chart.png b/inventory_forecast_analysis_report/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/misc/pie-chart.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/misc/right-arrow.png b/inventory_forecast_analysis_report/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/misc/right-arrow.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/misc/star.png b/inventory_forecast_analysis_report/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/misc/star.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/misc/support.png b/inventory_forecast_analysis_report/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/misc/support.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/misc/whatsapp.png b/inventory_forecast_analysis_report/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/misc/whatsapp.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/modules/budget_image.png b/inventory_forecast_analysis_report/static/description/assets/modules/budget_image.png new file mode 100644 index 000000000..b50130c7d Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/modules/budget_image.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/modules/credit_image.png b/inventory_forecast_analysis_report/static/description/assets/modules/credit_image.png new file mode 100644 index 000000000..3ad04ecfd Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/modules/credit_image.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/modules/employee_image.png b/inventory_forecast_analysis_report/static/description/assets/modules/employee_image.png new file mode 100644 index 000000000..30ad58232 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/modules/employee_image.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/modules/export_image.png b/inventory_forecast_analysis_report/static/description/assets/modules/export_image.png new file mode 100644 index 000000000..492980ad0 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/modules/export_image.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/modules/gantt_image.png b/inventory_forecast_analysis_report/static/description/assets/modules/gantt_image.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/modules/gantt_image.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/modules/quotation_image.png b/inventory_forecast_analysis_report/static/description/assets/modules/quotation_image.png new file mode 100644 index 000000000..499b1a72f Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/modules/quotation_image.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/ctegory.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/ctegory.png new file mode 100644 index 000000000..da876d634 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/ctegory.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/hero.gif b/inventory_forecast_analysis_report/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..71ea1b66a Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/hero.gif differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_001.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_001.png new file mode 100644 index 000000000..42e4578e9 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_001.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_002.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_002.png new file mode 100644 index 000000000..95bd5492e Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_002.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_003.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_003.png new file mode 100644 index 000000000..47a8a4943 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_003.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_004.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_004.png new file mode 100644 index 000000000..fe70eabef Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_004.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_005.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_005.png new file mode 100644 index 000000000..7b6e24dc0 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_005.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_006.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_006.png new file mode 100644 index 000000000..f6112ea54 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_006.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_007.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_007.png new file mode 100644 index 000000000..b7367ab53 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_007.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_008.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_008.png new file mode 100644 index 000000000..2a1ca46bd Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_008.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_009.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_009.png new file mode 100644 index 000000000..0b6e83659 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/scrn_009.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/supplier.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/supplier.png new file mode 100644 index 000000000..b2b758811 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/supplier.png differ diff --git a/inventory_forecast_analysis_report/static/description/banner.png b/inventory_forecast_analysis_report/static/description/banner.png new file mode 100644 index 000000000..57bee0c76 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/banner.png differ diff --git a/inventory_forecast_analysis_report/static/description/icon.png b/inventory_forecast_analysis_report/static/description/icon.png new file mode 100644 index 000000000..b5bf07543 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/icon.png differ diff --git a/inventory_forecast_analysis_report/static/description/images/checked.png b/inventory_forecast_analysis_report/static/description/images/checked.png new file mode 100644 index 000000000..578cedb80 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/images/checked.png differ diff --git a/inventory_forecast_analysis_report/static/description/images/cybrosys.png b/inventory_forecast_analysis_report/static/description/images/cybrosys.png new file mode 100644 index 000000000..d76b5bafb Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/images/cybrosys.png differ diff --git a/inventory_forecast_analysis_report/static/description/index.html b/inventory_forecast_analysis_report/static/description/index.html new file mode 100644 index 000000000..7f27da866 --- /dev/null +++ b/inventory_forecast_analysis_report/static/description/index.html @@ -0,0 +1,804 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ Odoo.sh +
+ +
+
+
+
+ +
+
+
+
+

+ Inventory Forecast Analysis Report

+
+

+ To Find All The Stock Quantities. +

+ +
+
+
+ +
+
+

+ Explore this module

+ +
+
+
+ +
+
+

+ Overview

+
+

+ This module helps you to find all the stock quantities like + onhand, sold, forecasted, pending, minimum and suggested + for all the products. +

+
+
+ +
+
+

+ Features

+
+
+
+
+ + Report for a specific duration +

+ You can generate the forecast analysis report for a + specific duration like 1week, 2weeks etc. upto 36 + months.

+ +
+
+ + Report by category +

+ You can generate the forecast analysis report for a + specific Product Category or Parent Category.

+ +
+ + Report by supplier +

+ You can generate the forecast analysis report for a + specific Supplier.

+ +
+ + Report by brand +

+ You can generate the forecast analysis report for a + specific Product Brand.

+ +
+ + Report by stock location +

+ You can generate the forecast analysis report for a + specific Stock location.

+
+
+
+
+
+ + +
+
+

+ Screenshots

+
+ +
+
+ +

+ Forecast analysis report.

+

+ You can find the Forecast Analysis Report menu under the + Reporting menu of inventory module +

+ +
+
+
+
+ +

+ Report duration. +

+

+ You can select the duration of the report from the report + wizard. You can select from the 10 different durations. +

+ +
+
+ +
+
+ +

+ Product category/ parent category. +

+

+ You can select the category of the product if the report + for a specific category, otherwise you can select the + parent category.If you selected the parent category, the + report will generate based on the prooducts that have a + particular parent category. Anyhow, if you left these + fields blank, you will get the report for all + categories.

+ +
+
+ +
+
+ +

+ Product brand. +

+

+ You can select the product brand, if you are generating the + report for a specific brand, otherwise left blank.

+ +
+
+
+
+ +

+ Location. +

+

+ You can select the location if you are generating a report + for a specific stock location, otherwise, left blank.

+ +
+
+
+
+ +

+ Supplier. +

+

+ + You can select the supplier if you are generating a report + for a specific supplier, otherwise, left blank.

+ +
+
+
+
+ +

+ The report. +

+

+ You can view the report with the fields like product, + category, supplier, brand, location,csold qty, onhand qty, + forecasted qty, pending qty, minimum qty and suggested + qty.

+ +
+
+
+
+ +

+ Report based on category. +

+

+ You can select a particular Product category

+ +
+
+
+

+ You can view the report based on selected category.

+ +
+
+
+ +

+ Report based on supplier. +

+

+ You can select a particular product category.

+ +
+
+
+
+

+ You can view the report based on selected supplier.

+ +
+
+
+
+
+
+ +
+
+

+ Suggested Products

+
+ + +
+ + + +
+
+
+

+ Our Services

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

+ Our Industries

+
+
+ +
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

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

+ Mobile + friendly, + awe-inspiring product pages

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

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

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

+ An + all-inclusive + hotel management application

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

+ Need Help?

+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ +
diff --git a/inventory_forecast_analysis_report/views/forecast_report_views.xml b/inventory_forecast_analysis_report/views/forecast_report_views.xml new file mode 100644 index 000000000..5afa51f7b --- /dev/null +++ b/inventory_forecast_analysis_report/views/forecast_report_views.xml @@ -0,0 +1,68 @@ + + + + + forecast.report.view.tree + forecast.report + + + + + + + + + + + + + + + + + + + forecast.report.view.pivot + forecast.report + + + + + + + + + + + + + + + + + forecast.report.view.search + forecast.report + + + + + + + + + + + + + + + + + diff --git a/inventory_forecast_analysis_report/views/product_template_views.xml b/inventory_forecast_analysis_report/views/product_template_views.xml new file mode 100644 index 000000000..b662525f5 --- /dev/null +++ b/inventory_forecast_analysis_report/views/product_template_views.xml @@ -0,0 +1,15 @@ + + + + + product.template.view.form.inherit.inventory.forecast.analysis.report + product.template + + + + + + + + diff --git a/inventory_forecast_analysis_report/wizards/__init__.py b/inventory_forecast_analysis_report/wizards/__init__.py new file mode 100644 index 000000000..a56b286ac --- /dev/null +++ b/inventory_forecast_analysis_report/wizards/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Sabeel B (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 forecast_analysis_report diff --git a/inventory_forecast_analysis_report/wizards/forecast_analysis_report.py b/inventory_forecast_analysis_report/wizards/forecast_analysis_report.py new file mode 100644 index 000000000..cb9510417 --- /dev/null +++ b/inventory_forecast_analysis_report/wizards/forecast_analysis_report.py @@ -0,0 +1,222 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Sabeel B (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError + + +class ForecastAnalysisReportWizard(models.TransientModel): + """Transient model to choose and return forcasting report""" + _name = 'forecast.analysis.report' + _description = 'Forecast Analysis Report' + + product_category_id = fields.Many2one( + 'product.category', string="Product Category", + help="Category of the product") + parent_category_id = fields.Many2one( + 'product.category', string="Parent Category", + help="Parent category of product") + product_brand_id = fields.Many2one('product.brand', + string="Product Brand", + help="Brand of the Product.") + period = fields.Selection([('1week', 'Last 1 week'), + ('2week', 'Last 2 weeks'), + ('3week', 'Last 3 weeks'), + ('1month', 'Last 1 month'), + ('2months', 'Last 2 months'), + ('3months', 'Last 3 months'), + ('6months', 'Last 6 months'), + ('12months', 'Last 12 months'), + ('24months', 'Last 24 months'), + ('36months', 'Last 36 months'), + ], string='Duration', required=True, + default='3months', + help="The duration of the report. 3 months is " + "the default duration") + location_ids = fields.Many2many('stock.location', + string="Locations", + help="Product locations.") + company_id = fields.Many2one('res.company', + default=lambda self: self.env.company, + string="Company", + help="Company of the Product belongs to.") + partner_id = fields.Many2one('res.partner', string="Partner", + help="Related Partner") + + @api.onchange('parent_category_id') + def _onchange_parent_category_id(self): + """This function will return the domain for the field + product_category_id with respect to the parent_category_id""" + if self.parent_category_id: + return {'domain': { + 'product_category_id': [ + ('parent_id', '=', self.parent_category_id.id)]}} + return {'domain': { + 'product_category_id': ()}} + + def get_start_date(self, today): + """This function will calculate the start_date with respect to the + period and returns the result""" + res = fields.Date.subtract(today, months=3) + if self.period == '1week': + res = fields.Date.subtract(today, weeks=1) + elif self.period == '2week': + res = fields.Date.subtract(today, weeks=2) + elif self.period == '3week': + res = fields.Date.subtract(today, weeks=3) + elif self.period == '1month': + res = fields.Date.subtract(today, months=1) + elif self.period == '6months': + res = fields.Date.subtract(today, months=6) + elif self.period == '12months': + res = fields.Date.subtract(today, months=12) + elif self.period == '24months': + res = fields.Date.subtract(today, months=24) + elif self.period == '36months': + res = fields.Date.subtract(today, months=36) + elif self.period == '2months': + res = fields.Date.subtract(today, months=2) + elif self.period == '5months': + res = fields.Date.subtract(today, months=5) + return res + + def action_print_report(self): + """This function will generate the report based on the values + on the report wizard and returns the report.""" + previous_report = self.env['forecast.report'].search([]) + previous_report.unlink() if previous_report else False + if (not self.product_category_id and not self.parent_category_id and + not self.partner_id and not self.product_brand_id and + not self.location_ids): + raise ValidationError(_("Data missing")) + + domain = [] + if self.product_category_id: + domain += [('categ_id', '=', self.product_category_id.id)] + elif not self.product_category_id and self.parent_category_id: + domain += [('categ_id', '=', self.parent_category_id.id)] + if self.partner_id: + suppliers = self.env['res.partner'].search( + [('id', '=', self.partner_id.id)]) + domain += [('seller_ids', 'in', suppliers.ids)] + if self.product_brand_id: + domain += [('product_brand_id', '=', self.product_brand_id.id)] + + products = self.env['product.product'].search(domain) + product_ids = tuple([product.id for product in products]) + current_date = fields.Date.today() + start_date = self.get_start_date(current_date) + + query = """ + SELECT sum(sl.product_uom_qty) AS product_uom_qty, + sl.product_id, sum(sl.qty_invoiced) AS qty_invoiced + FROM sale_order_line AS sl + JOIN sale_order AS so ON sl.order_id = so.id + WHERE so.state IN ('sale','done') + AND so.date_order::date >= %s + AND so.date_order::date <= %s + AND sl.product_id in %s + GROUP BY sl.product_id""" + + params = start_date, current_date, product_ids if product_ids else ( + 0, 0, 0, 0) + self._cr.execute(query, params) + result = self._cr.dictfetchall() + + for product in products: + internal_locations = self.env['stock.location'].search( + [('usage', '=', 'internal')]) + locations = self.env['stock.quant'].search([ + ('product_id', '=', product.id), + ('location_id', 'in', internal_locations.ids) + ]).location_id + + for location in self.location_ids if self.location_ids \ + else locations: + stock_quant = self.env['stock.quant'].search([ + ('location_id', '=', location.id), + ('product_id', '=', product.id), + ('write_date', '>=', start_date), + ('write_date', '<=', current_date) + ]) + available_qty = sum([quant.quantity for quant in stock_quant]) + sold = 0 + for sol_product in result: + if sol_product['product_id'] == product.id: + sold = sol_product['qty_invoiced'] + + forecasted_qty = product.with_context( + {'warehouse': location.warehouse_id.id}).virtual_available + reorder_qty = self.env['stock.warehouse.orderpoint'].search([ + ('product_id', '=', product.id), + ('location_id', '=', location.id) + ]) + reorder_min = sum([qty.product_min_qty for qty in reorder_qty]) + minimum_qty = reorder_min if available_qty < reorder_min else 0 + pending = product.with_context({ + 'from_date': start_date, + 'to_date': current_date, + 'location_id': location.id + }).incoming_qty + suggested = sold - (forecasted_qty + pending + minimum_qty) + + supplier = '' + if self.partner_id: + supplier_record = product.seller_ids.filtered( + lambda seller: seller.id == self.partner_id.id) + supplier = supplier_record.id if supplier_record else '' + elif product.seller_ids: + supplier = product.seller_ids.ids[0] + + vals = { + 'sold': sold, + 'product_id': product.id, + 'product_category_id': product.categ_id.id, + 'supplier_id': supplier, + 'product_brand_id': product.product_brand_id.id, + 'on_hand': available_qty, + 'pending': pending, + 'minimum': minimum_qty, + 'suggested': suggested, + 'forecast': forecasted_qty, + 'location_id': location.id + } + self.env['forecast.report'].create(vals) + + return { + 'name': 'Forecast Analysis Report', + 'res_model': 'forecast.report', + 'type': 'ir.actions.act_window', + 'view_type': 'form', + 'view_mode': 'tree,form', + 'views': [ + (self.env.ref + ('inventory_forecast_analysis_report.' + 'forecast_report_view_tree').id, + 'tree'), + (False, 'form'), + (self.env.ref + ('inventory_forecast_analysis_report.' + 'forecast_report_view_pivot').id, + 'pivot') + ], + 'target': 'current', + } + diff --git a/inventory_forecast_analysis_report/wizards/forecast_analysis_report_views.xml b/inventory_forecast_analysis_report/wizards/forecast_analysis_report_views.xml new file mode 100644 index 000000000..5200dd0fb --- /dev/null +++ b/inventory_forecast_analysis_report/wizards/forecast_analysis_report_views.xml @@ -0,0 +1,65 @@ + + + + + Forecast Analysis Report + forecast.analysis.report + form + new + + + + + + Inventory Forecast Analysis Report Wizard + + forecast.analysis.report + +
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+