diff --git a/inventory_forecast_analysis_report/README.rst b/inventory_forecast_analysis_report/README.rst new file mode 100644 index 000000000..64395f331 --- /dev/null +++ b/inventory_forecast_analysis_report/README.rst @@ -0,0 +1,48 @@ +.. image:: https://img.shields.io/badge/licence-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/16.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: +(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..fb7fb4699 --- /dev/null +++ b/inventory_forecast_analysis_report/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Raveena V (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..90c4352ee --- /dev/null +++ b/inventory_forecast_analysis_report/__manifest__.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Raveena V (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": "16.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", + "maintainer": "Cybrosys Techno Solutions", + "company": "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..5112e1c41 --- /dev/null +++ b/inventory_forecast_analysis_report/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 28.02.2024 +#### Version 16.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..e544bd792 --- /dev/null +++ b/inventory_forecast_analysis_report/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Raveena V (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..2effcfc3a --- /dev/null +++ b/inventory_forecast_analysis_report/models/forecast_analysis_report.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Raveena V (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( + "product.supplierinfo", string="Supplier", help="Supplier of the product" + ) + partner_id = fields.Many2one( + "res.partner", + string="Partner", + related="supplier_id.partner_id", + store=True, + help="Primary 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..b82e702c5 --- /dev/null +++ b/inventory_forecast_analysis_report/models/product_brand.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Raveena V (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..5577c6a90 --- /dev/null +++ b/inventory_forecast_analysis_report/models/product_template.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Raveena V (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 + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + product_brand_id = fields.Many2one('product.brand', string="Product Brand", + help="Brand of the Product.") + supplier_id = fields.Many2one( + 'product.supplierinfo', string="Supplier", + compute="_compute_suppliers", + store=True, help="Supplier of the Product.") + + @api.depends('seller_ids.partner_id') + def _compute_suppliers(self): + """This function is used to compute the main supplier + of the product.""" + for rec in self: + rec.supplier_id = False + if rec.seller_ids: + rec.supplier_id = rec.seller_ids[0] 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..c8e85f51d 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..2089293d6 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/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/1.png b/inventory_forecast_analysis_report/static/description/assets/modules/1.png new file mode 100644 index 000000000..51555e88c Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/modules/1.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/modules/2.png b/inventory_forecast_analysis_report/static/description/assets/modules/2.png new file mode 100644 index 000000000..7cc3625c7 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/modules/2.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/modules/3.png b/inventory_forecast_analysis_report/static/description/assets/modules/3.png new file mode 100644 index 000000000..f3c986fc1 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/modules/3.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/modules/4.png b/inventory_forecast_analysis_report/static/description/assets/modules/4.png new file mode 100644 index 000000000..2c8fbb83f Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/modules/4.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/modules/5.png b/inventory_forecast_analysis_report/static/description/assets/modules/5.png new file mode 100644 index 000000000..868337819 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/modules/5.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/modules/6.png b/inventory_forecast_analysis_report/static/description/assets/modules/6.png new file mode 100644 index 000000000..29a17f2be Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/modules/6.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..57716576a 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/sn.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn.png new file mode 100644 index 000000000..ca2c1c26c Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/sn1.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn1.png new file mode 100644 index 000000000..c428acfa1 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn1.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/sn10.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn10.png new file mode 100644 index 000000000..f5ad7bb8b Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn10.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/sn11.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn11.png new file mode 100644 index 000000000..469c51a38 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn11.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/sn2.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn2.png new file mode 100644 index 000000000..1ee3e439e Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn2.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/sn3.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn3.png new file mode 100644 index 000000000..b77fafb35 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn3.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/sn4.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn4.png new file mode 100644 index 000000000..efa3ca447 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn4.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/sn5.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn5.png new file mode 100644 index 000000000..a205e1e22 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn5.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/sn6.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn6.png new file mode 100644 index 000000000..8eb4832c0 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn6.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/sn7.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn7.png new file mode 100644 index 000000000..a8eedd5e6 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn7.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/sn8.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn8.png new file mode 100644 index 000000000..5a044a247 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn8.png differ diff --git a/inventory_forecast_analysis_report/static/description/assets/screenshots/sn9.png b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn9.png new file mode 100644 index 000000000..b9ae6ef74 Binary files /dev/null and b/inventory_forecast_analysis_report/static/description/assets/screenshots/sn9.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..4d7f20f88 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..e2448db24 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..aaf0c0147 --- /dev/null +++ b/inventory_forecast_analysis_report/static/description/index.html @@ -0,0 +1,768 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Inventory Forecast Analysis Report

+

+ To Find All The Stock Quantities +

+ +
+
+ + + + +
+
+

+ 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

+ +
+
+

+ Report based on category

+

+ You can view the report based on selected category.

+ +
+
+

+ Report based on supplier

+

+ You can select a particular product category.

+ +
+
+

+ Report based on supplier

+

+ You can view the report based on selected supplier.

+ +
+
+ + +
+
+ +
+

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

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

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..2d4e1f387 --- /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..7d7a7b92b --- /dev/null +++ b/inventory_forecast_analysis_report/wizards/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Raveena V (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..cf8074737 --- /dev/null +++ b/inventory_forecast_analysis_report/wizards/forecast_analysis_report.py @@ -0,0 +1,211 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Raveena V (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 datetime import datetime +from dateutil.relativedelta import relativedelta +from odoo import api, fields, models + + +class ForecastAnalysisReportWizard(models.TransientModel): + _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") + supplier_id = fields.Many2one( + 'product.supplierinfo', string="Supplier", + help="Supplier/Vendor of the 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 _compute_date(self): + """This function will calculate the start_date with respect to the + period and returns the result""" + res = datetime.today() + relativedelta(months=-3) + if self.period == '1week': + res = datetime.today() + relativedelta(weeks=-1) + elif self.period == '2week': + res = datetime.today() + relativedelta(weeks=-2) + elif self.period == '3week': + res = datetime.today() + relativedelta(weeks=-3) + elif self.period == '1month': + res = datetime.today() + relativedelta(months=-1) + elif self.period == '6months': + res = datetime.today() + relativedelta(months=-6) + elif self.period == '12months': + res = datetime.today() + relativedelta(months=-12) + elif self.period == '24months': + res = datetime.today() + relativedelta(months=-24) + elif self.period == '36months': + res = datetime.today() + relativedelta(months=-36) + elif self.period == '2months': + res = datetime.today() + relativedelta(months=-2) + elif self.period == '5months': + res = datetime.today() + relativedelta(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 + suppliers = self.env['product.supplierinfo'].search( + [('partner_id', '=', self.partner_id.id)]) + category_ids = [] + if self.parent_category_id: + # if there is a parent category, the report will be generated based + # on the product category as the sub-sub categories + category_ids = self.env['product.category'].search( + [('parent_id', '=', self.parent_category_id.id)]) + categ_list = category_ids.ids if category_ids else [] + if categ_list: + for rec in categ_list: + sub_category = self.env['product.category'].search( + [('parent_id', '=', rec)]) + for category in sub_category.ids: + if category not in categ_list: + categ_list.append(category) + category_ids = self.env['product.category'].browse(categ_list) + domain = [] + # if both categories are present, it will generate the + # report based on the product category only + if self.parent_category_id and self.product_category_id: + domain += [('categ_id', '=', self.product_category_id.id)] + elif self.product_category_id and not self.parent_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: + domain += [('supplier_id', '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]) + start_date = self._compute_date() + current_date = datetime.today() + 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.date(), current_date.date(), \ + product_ids if product_ids else (0, 0, 0, 0) + self._cr.execute(query, params) + result = self._cr.dictfetchall() + locations = self.location_ids + if not locations: + locations = self.env['stock.location'].search([ + ('name', '=', 'Stock')]) + for product in products: + for location in locations: + warehouse = location.warehouse_id.id + sold = 0 + for sol_product in result: + if sol_product['product_id'] == product.id: + sold = sol_product['qty_invoiced'] + available_qty = product.with_context( + {'from_date': start_date, 'to_date': current_date, + 'warehouse': warehouse}).qty_available + forecasted_qty = product.with_context( + {'warehouse': warehouse}).virtual_available + reorder_qty = self.env['stock.warehouse.orderpoint'].search( + [('product_id', '=', product.id), + ('location_id', '=', product.id)]) + reorder_min = sum( + [q.product_min_qty for q in reorder_qty]) + minimum_qty = 0 + if available_qty < reorder_min: + minimum_qty = reorder_min + pending = product.with_context( + {'from_date': start_date, 'to_date': current_date, + 'location': location.id}).incoming_qty + suggested = sold - (forecasted_qty + pending + minimum_qty) + vals = { + 'sold': sold, + 'product_id': product.id, + 'product_category_id': product.categ_id.id, + 'supplier_id': product.seller_ids.ids[ + 0] if product.seller_ids else False, + '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..74aa9639b --- /dev/null +++ b/inventory_forecast_analysis_report/wizards/forecast_analysis_report_views.xml @@ -0,0 +1,66 @@ + + + + + Forecast Analysis Report + forecast.analysis.report + form + new + + + + + + Inventory Forecast Analysis Report Wizard + + forecast.analysis.report + +
+ + + + + + + + + + + + + + + + + + + + + + +
+
+
+