@ -0,0 +1,52 @@ |
|||
.. 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 Turnover Analysis Report |
|||
================================== |
|||
This will helps you to generate inventory turnover analysis report in pdf, xlsx, tree view and graph view. |
|||
|
|||
Features |
|||
======== |
|||
* Retrieve the current stock report in XLS format for the corresponding warehouse. |
|||
|
|||
Configuration |
|||
============= |
|||
Nothing to configure. |
|||
|
|||
License |
|||
------- |
|||
Affero General Public License, v3.0 (AGPL v3). |
|||
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
Credits |
|||
------- |
|||
* Developer: (V16) Syamili K, |
|||
(V17) Afra K, |
|||
Contact: odoo@cybrosys.com |
|||
|
|||
Contacts |
|||
-------- |
|||
* Mail Contact : odoo@cybrosys.com |
|||
* Website : https://cybrosys.com |
|||
|
|||
Bug Tracker |
|||
----------- |
|||
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
|||
|
|||
Maintainer |
|||
========== |
|||
.. image:: https://cybrosys.com/images/logo.png |
|||
:target: https://cybrosys.com |
|||
|
|||
This module is maintained by Cybrosys Technologies. |
|||
|
|||
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,24 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from . import conrollers |
|||
from . import models |
|||
from . import wizard |
@ -0,0 +1,51 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
{ |
|||
'name': 'Inventory Turnover Analysis Report', |
|||
'version': '18.0.1.0.0', |
|||
'summary': """A module for generate inventory turnover analysis report.""", |
|||
'description': """This will helps you to generate inventory turnover |
|||
analysis report in pdf, xlsx, list view and graph view.""", |
|||
'category': "Warehouse", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': "https://www.cybrosys.com", |
|||
'depends': ['base', 'stock', 'sale', 'purchase'], |
|||
'data': [ |
|||
'security/ir.model.access.csv', |
|||
'views/fetch_data_views.xml', |
|||
'views/turnover_graph_analysis_views.xml', |
|||
'report/turnover_report_templates.xml', |
|||
'wizard/turnover_report_views.xml', |
|||
], |
|||
'assets': { |
|||
'web.assets_backend': [ |
|||
'inventory_turnover_report_analysis/static/src/js/action_manager.js', |
|||
], |
|||
}, |
|||
'images': ['static/description/banner.gif'], |
|||
'license': 'AGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': False, |
|||
} |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from . import inventory_turnover_report_analysis |
@ -0,0 +1,57 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
import json |
|||
from odoo import http |
|||
from odoo.http import content_disposition, request |
|||
from odoo.tools import html_escape |
|||
|
|||
|
|||
class XLSXReportController(http.Controller): |
|||
"""From js file it call the url '/xlsx_reports'. """ |
|||
@http.route('/xlsx_reports', type='http', auth='user', methods=['POST'], |
|||
csrf=False) |
|||
def get_report_xlsx(self, model, options, output_format, report_name, **kw): |
|||
"""Controller function for generate the xlsx report.""" |
|||
uid = request.session.uid |
|||
report_obj = request.env[model].with_user(uid) |
|||
options = json.loads(options) |
|||
token = 'dummy-because-api-expects-one' |
|||
try: |
|||
if output_format == 'xlsx': |
|||
response = request.make_response( |
|||
None, |
|||
headers=[ |
|||
('Content-Type', 'application/vnd.ms-excel'), |
|||
('Content-Disposition', |
|||
content_disposition(report_name + '.xlsx')) |
|||
] |
|||
) |
|||
report_obj.get_xlsx_report(options, response) |
|||
response.set_cookie('fileToken', token) |
|||
return response |
|||
except Exception as e: |
|||
error = { |
|||
'code': 200, |
|||
'message': 'Odoo Server Error', |
|||
'data': http.serialize_exception(e) |
|||
} |
|||
return request.make_response(html_escape(json.dumps(error))) |
@ -0,0 +1,6 @@ |
|||
## Module <inventory_turnover_report_analysis> |
|||
|
|||
#### 08.01.2024 |
|||
#### Version 18.0.1.0.0 |
|||
##### ADD |
|||
- Initial commit for Inventory Turnover Analysis Report |
@ -0,0 +1,23 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from . import fetch_data |
|||
from . import turnover_graph_analysis |
@ -0,0 +1,56 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class FetchData(models.Model): |
|||
"""Create new model for to see the records in list view""" |
|||
_name = "fetch.data" |
|||
_description = "Fetch Data" |
|||
|
|||
company_id = fields.Many2one('res.company', string="Company", |
|||
help="These are the selected companies from " |
|||
"the wizard.") |
|||
warehouse_id = fields.Many2one('stock.warehouse', string="Warehouse", |
|||
help="These are the selected warehouses " |
|||
"from the wizard") |
|||
product_id = fields.Many2one('product.product', string="Product", |
|||
help="Selected all products are listed below.") |
|||
category_id = fields.Many2one('product.category', string="Product category", |
|||
help="Product category of current product") |
|||
opening_stock = fields.Float(string="Opening Stock", |
|||
help="Opening stock: Value of stock at " |
|||
"the beginning of an accounting period") |
|||
closing_stock = fields.Float(string="Closing Stock", |
|||
help="Closing Stock: Value of stock at the " |
|||
"end of an accounting period.") |
|||
average_stock = fields.Float(string="Average Stock", |
|||
help="Average stock: Average of opening stock " |
|||
"and closing stock") |
|||
sale_count = fields.Float(string="Sales Count", |
|||
help="Sales count: Total number of product sale") |
|||
purchase_count = fields.Float(string="Purchase Count", |
|||
help="Purchase count: Total number of " |
|||
"product purchased") |
|||
turnover_ratio = fields.Float(string="Turnover Ratio", |
|||
help="Turnover ratio: It is calculated as " |
|||
"'cost of goods sold/average stock'") |
@ -0,0 +1,56 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class TurnoverGraphAnalysis(models.Model): |
|||
"""Create new model for to see the records in graph view""" |
|||
_name = "turnover.graph.analysis" |
|||
_description = "Turnover Graph Analysis" |
|||
|
|||
company_id = fields.Many2one('res.company', string="Company", |
|||
help="These are the selected companies from " |
|||
"the wizard.") |
|||
warehouse_id = fields.Many2one('stock.warehouse', string="Warehouse", |
|||
help="These are the selected warehouses " |
|||
"from the wizard") |
|||
product_id = fields.Many2one('product.product', string="Product", |
|||
help="Selected all products are listed below.") |
|||
category_id = fields.Many2one('product.category', string="Product category", |
|||
help="Product category of current product") |
|||
opening_stock = fields.Float(string="Opening Stock", |
|||
help="Opening stock: Value of stock at " |
|||
"the beginning of an accounting period") |
|||
closing_stock = fields.Float(string="Closing Stock", |
|||
help="Closing Stock: Value of stock at the " |
|||
"end of an accounting period.") |
|||
average_stock = fields.Float(string="Average Stock", |
|||
help="Average stock: Average of opening stock " |
|||
"and closing stock") |
|||
sale_count = fields.Float(string="Sales Count", |
|||
help="Sales count: Total number of product sale") |
|||
purchase_count = fields.Float(string="Purchase Count", |
|||
help="Purchase count: Total number of " |
|||
"product purchased") |
|||
turnover_ratio = fields.Float(string="Turnover Ratio", |
|||
help="Turnover ratio: It is calculated as " |
|||
"'cost of goods sold/average stock'") |
@ -0,0 +1,66 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- It's the pdf template for showing the turnover report--> |
|||
<record id="inventory_turnover_report" model="ir.actions.report"> |
|||
<field name="name">Inventory Turnover Analysis Report</field> |
|||
<field name="model">turnover.report</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">inventory_turnover_report_analysis.inventory_pdf_turnover_report</field> |
|||
<field name="report_file">inventory_turnover_report_analysis.inventory_pdf_turnover_report</field> |
|||
<field name="binding_model_id" ref="model_turnover_report"/> |
|||
<field name="binding_type">report</field> |
|||
</record> |
|||
<template id="inventory_pdf_turnover_report"> |
|||
<t t-call="web.html_container"> |
|||
<t t-call="web.external_layout"> |
|||
<div class="page"> |
|||
<center> |
|||
<h2>Inventory Turnover Analysis Report</h2> |
|||
</center> |
|||
</div><br/> |
|||
<table class="table"> |
|||
<tr> |
|||
<td> |
|||
<t t-if="start_date"> |
|||
<b>Start date:</b> |
|||
<t t-esc="start_date"/> |
|||
</t> |
|||
</td> |
|||
<td> |
|||
<t t-if="end_date"> |
|||
<b>End date:</b> |
|||
<t t-esc="end_date"/> |
|||
</t> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<table class="table"> |
|||
<thead> |
|||
<tr style="text-align: center;"> |
|||
<th style="text-align: left;width:10%">Product</th> |
|||
<th style="width:5%">Opening Stock</th> |
|||
<th style="width:5%">Closing Stock</th> |
|||
<th style="width:5%">Average Stock</th> |
|||
<th style="width:5%">Sales Count</th> |
|||
<th style="width:5%">Purchase Count</th> |
|||
<th style="width:5%">Turnover Ratio</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<t t-foreach="stock_report" t-as="i"> |
|||
<tr style="text-align: center;"> |
|||
<td style="text-align: left;" t-esc="i['product']"/> |
|||
<td t-esc="i['opening_stock']"/> |
|||
<td t-esc="i['closing_stock']"/> |
|||
<td t-esc="i['average_stock']"/> |
|||
<td t-esc="i['sale_count']"/> |
|||
<td t-esc="i['purchase_count']"/> |
|||
<td t-esc="i['turnover_ratio']"/> |
|||
</tr> |
|||
</t> |
|||
</tbody> |
|||
</table> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
</odoo> |
|
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 628 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 233 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 912 KiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 117 KiB |
After Width: | Height: | Size: 105 KiB |
After Width: | Height: | Size: 99 KiB |
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 880 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 11 KiB |