@ -0,0 +1,47 @@ |
|||||
|
.. 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 |
||||
|
|
||||
|
Low Sales Report |
||||
|
================ |
||||
|
* The tool to control poorly performing product |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
* No additional configurations needed |
||||
|
|
||||
|
Company |
||||
|
------- |
||||
|
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
||||
|
|
||||
|
License |
||||
|
------- |
||||
|
Affero General Public License v3.0 (AGPL v3) |
||||
|
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) |
||||
|
|
||||
|
Credits |
||||
|
------- |
||||
|
* Developer: (V16) Bhagyadev KP |
||||
|
* Contact: odoo@cybrosys.com |
||||
|
|
||||
|
Contacts |
||||
|
-------- |
||||
|
* Mail Contact : odoo@cybrosys.com |
||||
|
* Website : https://cybrosys.com |
||||
|
|
||||
|
Bug Tracker |
||||
|
----------- |
||||
|
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
||||
|
|
||||
|
Maintainer |
||||
|
========== |
||||
|
.. image:: https://cybrosys.com/images/logo.png |
||||
|
:target: https://cybrosys.com |
||||
|
|
||||
|
This module is maintained by Cybrosys Technologies. |
||||
|
|
||||
|
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ |
||||
|
|
||||
|
Further information |
||||
|
=================== |
||||
|
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,25 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Bhagyadev KP (odoo@cybrosys.com) |
||||
|
# |
||||
|
# This program is free software: you can modify |
||||
|
# it under the terms of the GNU Affero General Public License (AGPL) as |
||||
|
# published by the Free Software Foundation, either version 3 of the |
||||
|
# License, or (at your option) any later version. |
||||
|
# |
||||
|
# 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 for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU Affero General Public License |
||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
from . import controllers |
||||
|
from . import models |
||||
|
from . import report |
||||
|
from . import wizard |
@ -0,0 +1,56 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Bhagyadev KP (odoo@cybrosys.com) |
||||
|
# |
||||
|
# This program is free software: you can modify |
||||
|
# it under the terms of the GNU Affero General Public License (AGPL) as |
||||
|
# published by the Free Software Foundation, either version 3 of the |
||||
|
# License, or (at your option) any later version. |
||||
|
# |
||||
|
# 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 for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU Affero General Public License |
||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
{ |
||||
|
'name': "Low Sales Report", |
||||
|
'version': '16.0.1.0.0', |
||||
|
'category': 'Sale', |
||||
|
'summary': 'The tool to control poorly performing product', |
||||
|
'description': 'Efficiently manage and analyze low sales with this module,' |
||||
|
'offering customizable criteria, flexible reporting ' |
||||
|
'periods, and versatile presentation options in Odoo or ' |
||||
|
'Excel. Tailor your analysis by filtering specific product' |
||||
|
'categories or sales teams, and choose between ' |
||||
|
'template-wide insights or focus on individual product ' |
||||
|
'variants for a comprehensive understanding of ' |
||||
|
'under performing products.', |
||||
|
'author': 'Cybrosys Techno Solutions', |
||||
|
'company': 'Cybrosys Techno Solutions', |
||||
|
'maintainer': 'Cybrosys Techno Solutions', |
||||
|
'website': 'https://www.cybrosys.com', |
||||
|
'depends': ['sale_management', 'crm',], |
||||
|
'data': [ |
||||
|
'security/ir.model.access.csv', |
||||
|
'views/res_config_settings_view.xml', |
||||
|
'report/low_sale_pivot_view_report_view.xml', |
||||
|
'wizard/low_sale_report_views.xml' |
||||
|
], |
||||
|
'assets': { |
||||
|
'web.assets_backend': [ |
||||
|
'low_sale_report/static/src/js/low_sale_xlsx_report.js', |
||||
|
], |
||||
|
}, |
||||
|
'images': ['static/description/banner.png'], |
||||
|
'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: Bhagyadev KP (odoo@cybrosys.com) |
||||
|
# |
||||
|
# This program is free software: you can modify |
||||
|
# it under the terms of the GNU Affero General Public License (AGPL) as |
||||
|
# published by the Free Software Foundation, either version 3 of the |
||||
|
# License, or (at your option) any later version. |
||||
|
# |
||||
|
# 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 for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU Affero General Public License |
||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
from . import low_sale_report |
@ -0,0 +1,62 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Bhagyadev KP (odoo@cybrosys.com) |
||||
|
# |
||||
|
# This program is free software: you can modify |
||||
|
# it under the terms of the GNU Affero General Public License (AGPL) as |
||||
|
# published by the Free Software Foundation, either version 3 of the |
||||
|
# License, or (at your option) any later version. |
||||
|
# |
||||
|
# 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 for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU Affero General Public License |
||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
import json |
||||
|
from odoo import http |
||||
|
from odoo.http import content_disposition, request |
||||
|
from odoo.http import serialize_exception as _serialize_exception |
||||
|
from odoo.tools import html_escape |
||||
|
|
||||
|
|
||||
|
class XLSXReportController(http.Controller): |
||||
|
"""This controller defines a route for generating and serving XLSX reports. |
||||
|
The route '/sale_low_xlsx_reports' accepts POST requests and returns an |
||||
|
XLSX report based on the provided model, options, output format, and report |
||||
|
name.""" |
||||
|
@http.route('/sale_low_xlsx_reports', type='http', |
||||
|
auth='user', methods=['POST'], csrf=False) |
||||
|
def get_report_xlsx(self, model, options, output_format, report_name): |
||||
|
"""Generate and serve an 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_low_sale_xlsx_report(options, response) |
||||
|
response.set_cookie('fileToken', token) |
||||
|
return response |
||||
|
except Exception as e: |
||||
|
se = _serialize_exception(e) |
||||
|
error = { |
||||
|
'code': 200, |
||||
|
'message': 'Odoo Server Error', |
||||
|
'data': se |
||||
|
} |
||||
|
return request.make_response(html_escape(json.dumps(error))) |
@ -0,0 +1,6 @@ |
|||||
|
## Module <low_sale_report> |
||||
|
|
||||
|
#### 21.03.2024 |
||||
|
#### Version 16.0.1.0.0 |
||||
|
##### ADD |
||||
|
- Initial Commit for Low Sales Report |
@ -0,0 +1,22 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Bhagyadev KP (odoo@cybrosys.com) |
||||
|
# |
||||
|
# This program is free software: you can modify |
||||
|
# it under the terms of the GNU Affero General Public License (AGPL) as |
||||
|
# published by the Free Software Foundation, either version 3 of the |
||||
|
# License, or (at your option) any later version. |
||||
|
# |
||||
|
# 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 for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU Affero General Public License |
||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
from . import res_config_settings |
@ -0,0 +1,45 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Bhagyadev KP (odoo@cybrosys.com) |
||||
|
# |
||||
|
# This program is free software: you can modify |
||||
|
# it under the terms of the GNU Affero General Public License (AGPL) as |
||||
|
# published by the Free Software Foundation, either version 3 of the |
||||
|
# License, or (at your option) any later version. |
||||
|
# |
||||
|
# 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 for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU Affero General Public License |
||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class ResConfigSettings(models.TransientModel): |
||||
|
"""Adding a new fields to res_config_settings model for filtering the |
||||
|
low sales report""" |
||||
|
_inherit = "res.config.settings" |
||||
|
|
||||
|
product_type = fields.Selection( |
||||
|
[('variant', 'By product variant'), |
||||
|
('template', 'By product templates')], string="Report Type", |
||||
|
help='Which sale to take into account: Product templates in general' |
||||
|
' or variants?', |
||||
|
config_parameter='low_sale_report.product_type') |
||||
|
analysed_period = fields.Selection( |
||||
|
[('last_month', 'Last Month'), |
||||
|
('last_3', 'Last 3 Month'), ('last_6', 'Last 6 Month'), |
||||
|
('last_12', 'Last 12 Month')], string='Analysed Period', |
||||
|
help='Define the which period should be analysed by default.', |
||||
|
config_parameter='low_sale_report.analysed_period') |
||||
|
absolute_qty = fields.Float(string='Absolute Quantity', |
||||
|
help='Define a default critical level for ' |
||||
|
'sales.', |
||||
|
config_parameter='low_sale_report.absolute_qty') |
@ -0,0 +1,22 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Bhagyadev KP (odoo@cybrosys.com) |
||||
|
# |
||||
|
# This program is free software: you can modify |
||||
|
# it under the terms of the GNU Affero General Public License (AGPL) as |
||||
|
# published by the Free Software Foundation, either version 3 of the |
||||
|
# License, or (at your option) any later version. |
||||
|
# |
||||
|
# 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 for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU Affero General Public License |
||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
from . import low_sale_pivot_view_report |
@ -0,0 +1,130 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Bhagyadev KP (odoo@cybrosys.com) |
||||
|
# |
||||
|
# This program is free software: you can modify |
||||
|
# it under the terms of the GNU Affero General Public License (AGPL) as |
||||
|
# published by the Free Software Foundation, either version 3 of the |
||||
|
# License, or (at your option) any later version. |
||||
|
# |
||||
|
# 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 for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU Affero General Public License |
||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class LowSalePivotViewReport(models.Model): |
||||
|
"""Pivot view report""" |
||||
|
_name = 'low.sale.pivot.view.report' |
||||
|
_description = 'LowSale Pivot View Report' |
||||
|
|
||||
|
categ_id = fields.Many2one( |
||||
|
comodel_name='product.category', string="Product Category", |
||||
|
readonly=True, help='Category id of the product') |
||||
|
product_id = fields.Many2one( |
||||
|
comodel_name='product.product', string="Product Variant", readonly=True, |
||||
|
help='Product_product model id') |
||||
|
product_tmpl_id = fields.Many2one( |
||||
|
comodel_name='product.template', string="Product", readonly=True, |
||||
|
help='Product_template model id') |
||||
|
product_uom_qty = fields.Float(string="Sold quantity", readonly=True, |
||||
|
help='Total count of the quantity to sold') |
||||
|
company_id = fields.Many2one(comodel_name='res.company', store=True, |
||||
|
copy=False, string="Company", |
||||
|
default=lambda |
||||
|
self: self.env.user.company_id.id, |
||||
|
help='Company id for the reference of the' |
||||
|
' monetary field') |
||||
|
currency_id = fields.Many2one('res.currency', string="Currency", |
||||
|
related='company_id.currency_id', |
||||
|
default=lambda |
||||
|
self: self.env.user.company_id.currency_id.id, |
||||
|
help='Currency id for the reference of the ' |
||||
|
'monetary field') |
||||
|
price_total = fields.Monetary(string="Total", readonly=True, |
||||
|
help='Total price of the product sold') |
||||
|
|
||||
|
def get_data(self, low_sale_report): |
||||
|
"""Fetching the data for the pivot view and the Excel report using |
||||
|
the sql query""" |
||||
|
conditions = [] |
||||
|
filters = [] |
||||
|
if low_sale_report['analysed_period_start'] and low_sale_report[ |
||||
|
'analysed_period_end']: |
||||
|
filters.append(f"o.date_order BETWEEN '" |
||||
|
f"{low_sale_report['analysed_period_start']}" |
||||
|
f"' AND '" |
||||
|
f"{low_sale_report['analysed_period_end']}'") |
||||
|
if low_sale_report['absolute_qty'] > 0: |
||||
|
conditions.append( |
||||
|
f"COALESCE(SUM(CASE WHEN o.state = 'sale' THEN " |
||||
|
f"l.product_uom_qty ELSE 0 END), 0) <= " |
||||
|
f"{low_sale_report['absolute_qty']}") |
||||
|
if low_sale_report['category']: |
||||
|
filters.append( |
||||
|
"t.categ_id = %s" % int(low_sale_report['category'][0])) |
||||
|
if low_sale_report['sale_team']: |
||||
|
filters.append( |
||||
|
"o.team_id = %s" % int(low_sale_report['sale_team'][0])) |
||||
|
if low_sale_report['product_type'] == 'variant': |
||||
|
query = """ |
||||
|
SELECT |
||||
|
p.id AS product_id, |
||||
|
COALESCE(SUM(CASE WHEN o.state = 'sale' THEN |
||||
|
l.product_uom_qty ELSE 0 END), 0) AS |
||||
|
total_sold_quantity, |
||||
|
COALESCE(SUM(CASE WHEN o.state = 'sale' THEN |
||||
|
l.price_total ELSE 0 END), 0) AS price_total, |
||||
|
t.name->>'en_US' AS product_name |
||||
|
FROM |
||||
|
product_product p |
||||
|
LEFT JOIN |
||||
|
product_template t ON p.product_tmpl_id = t.id |
||||
|
LEFT JOIN |
||||
|
sale_order_line l ON p.id = l.product_id |
||||
|
LEFT JOIN |
||||
|
sale_order o ON l.order_id = o.id |
||||
|
""" + ('WHERE ' + ' AND '.join(filters) if |
||||
|
filters else '') + """ |
||||
|
GROUP BY |
||||
|
p.id, t.name |
||||
|
""" + ('HAVING ' + ' AND '.join(conditions) if |
||||
|
conditions else '') + """ |
||||
|
""" |
||||
|
else: |
||||
|
query = """ |
||||
|
SELECT |
||||
|
t.id AS product_tmpl_id, |
||||
|
COALESCE(SUM(CASE WHEN o.state = 'sale' THEN |
||||
|
l.product_uom_qty ELSE 0 END), 0) AS |
||||
|
total_sold_quantity, |
||||
|
COALESCE(SUM(CASE WHEN o.state = 'sale' THEN |
||||
|
l.price_total ELSE 0 END), 0) AS price_total, |
||||
|
t.name->>'en_US' AS product_name |
||||
|
FROM |
||||
|
product_template t |
||||
|
LEFT JOIN |
||||
|
product_product p ON t.id = p.product_tmpl_id |
||||
|
LEFT JOIN |
||||
|
sale_order_line l ON p.id = l.product_id |
||||
|
LEFT JOIN |
||||
|
sale_order o ON l.order_id = o.id |
||||
|
""" + ('WHERE ' + ' AND '.join(filters) if |
||||
|
filters else '') + """ |
||||
|
GROUP BY |
||||
|
t.id, t.name |
||||
|
""" + ('HAVING ' + ' AND '.join(conditions) if |
||||
|
conditions else '') + """ |
||||
|
""" |
||||
|
self.env.cr.execute(query) |
||||
|
test = self.env.cr.fetchall() |
||||
|
return test |
@ -0,0 +1,30 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<odoo> |
||||
|
<!-- View for variant --> |
||||
|
<record id="low_sale_pivot_view_report_view_pivot_variant" |
||||
|
model="ir.ui.view"> |
||||
|
<field name="name">low.sale.pivot.view.report.view.pivot.variant</field> |
||||
|
<field name="model">low.sale.pivot.view.report</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<pivot string="Low Sale Report"> |
||||
|
<field name="product_id" type="row"/> |
||||
|
<field name="price_total" type="measure"/> |
||||
|
<field name="product_uom_qty" type="measure"/> |
||||
|
</pivot> |
||||
|
</field> |
||||
|
</record> |
||||
|
<!-- View for template --> |
||||
|
<record id="low_sale_pivot_view_report_view_pivot_template" |
||||
|
model="ir.ui.view"> |
||||
|
<field name="name">low.sale.pivot.view.report.view.pivot.template |
||||
|
</field> |
||||
|
<field name="model">low.sale.pivot.view.report</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<pivot string="Low Sale Report"> |
||||
|
<field name="product_tmpl_id" type="row"/> |
||||
|
<field name="price_total" type="measure"/> |
||||
|
<field name="product_uom_qty" type="measure"/> |
||||
|
</pivot> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |
|
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 589 B |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 967 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 89 KiB |
After Width: | Height: | Size: 121 KiB |
After Width: | Height: | Size: 312 KiB |
After Width: | Height: | Size: 208 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 178 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 18 KiB |
@ -0,0 +1,653 @@ |
|||||
|
<div style="background-color: #714B67; min-height: 600px; width: 100%; padding: 15px; position: relative;"> |
||||
|
<!-- TITLE BAR --> |
||||
|
<div class="d-flex align-items-center justify-content-between" |
||||
|
style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;"> |
||||
|
<img src="assets/misc/cybrosys-logo.png" width="42" height="42" |
||||
|
style="width: 42px; height: 42px;"/> |
||||
|
<div> |
||||
|
<div style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" |
||||
|
class="mr-2"> |
||||
|
<i class="fa fa-check mr-1"></i>Community |
||||
|
</div> |
||||
|
<div style="color: #875A7B; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" |
||||
|
class="mr-2"> |
||||
|
<i class="fa fa-check mr-1"></i>Enterprise |
||||
|
</div> |
||||
|
<div style="color: #017E84; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" |
||||
|
class="mr-2"> |
||||
|
<i class="fa fa-check mr-1"></i>Odoo.sh |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END OF TITLE BAR --> |
||||
|
<div class="container"> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12 col-md-12 col-lg-12"> |
||||
|
<!-- APP HERO --> |
||||
|
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;"> |
||||
|
Low Sales Report |
||||
|
</h1> |
||||
|
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">The Tool to Control Poorly Performing Product.</p> |
||||
|
<!-- END OF APP HERO --> |
||||
|
<img src="assets/screenshots/hero.gif" |
||||
|
style="width: 75%; height: auto; position: absolute; margin-left: auto; margin-right: auto; top: 45%; left: 12%; right: auto;"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- NAVIGATION SECTION --> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;"> |
||||
|
<div class="d-flex justify-content-center align-items-center mr-2" |
||||
|
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
||||
|
<img src="assets/misc/compass.png"/> |
||||
|
</div> |
||||
|
<h2 class="mt-2" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
||||
|
Explore This |
||||
|
Module</h2> |
||||
|
</div> |
||||
|
<div class="row my-4" style="font-family: 'Montserrat', sans-serif;"> |
||||
|
<div class="col-sm-12 col-md-6 my-3"> |
||||
|
<a href="#overview"> |
||||
|
<div class="d-flex justify-content-between align-items-center" |
||||
|
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
||||
|
<div> |
||||
|
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Overview</span> |
||||
|
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;"> |
||||
|
Learn more about this module |
||||
|
</span> |
||||
|
</div> |
||||
|
<img src="assets/misc/right-arrow.png" width="36" height="36"/> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-sm-12 col-md-6 my-3"> |
||||
|
<a href="#screenshots"> |
||||
|
<div class="d-flex justify-content-between align-items-center" |
||||
|
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
||||
|
<div> |
||||
|
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Screenshots</span> |
||||
|
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;"> |
||||
|
See key screenshots of this module |
||||
|
</span> |
||||
|
</div> |
||||
|
<img src="assets/misc/right-arrow.png" width="36" height="36"/> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-sm-12 col-md-6 my-3"> |
||||
|
<a href="#features"> |
||||
|
<div class="d-flex justify-content-between align-items-center" |
||||
|
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
||||
|
<div> |
||||
|
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Features</span> |
||||
|
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View features of this module</span> |
||||
|
</div> |
||||
|
<img src="assets/misc/right-arrow.png" width="36" height="36"/> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END OF NAVIGATION SECTION --> |
||||
|
<!-- OVERVIEW SECTION --> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="overview"> |
||||
|
<div class="d-flex justify-content-center align-items-center mr-2" |
||||
|
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
||||
|
<img src="assets/misc/pie-chart.png"/> |
||||
|
</div> |
||||
|
<h2 class="mt-2" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
||||
|
Overview |
||||
|
</h2> |
||||
|
</div> |
||||
|
<div class="row" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> |
||||
|
<div class="col-sm-12 py-4"> |
||||
|
The tool to control poorly performing product. |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END OF OVERVIEW SECTION --> |
||||
|
<!-- FEATURES SECTION --> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" |
||||
|
id="features"> |
||||
|
<div class="d-flex justify-content-center align-items-center mr-2" |
||||
|
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
||||
|
<img src="assets/misc/features.png"/> |
||||
|
</div> |
||||
|
<h2 class="mt-2" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
||||
|
Features |
||||
|
</h2> |
||||
|
</div> |
||||
|
<div class="row" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> |
||||
|
<div class="col-sm-12 col-md-6"> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="margin-top: 40px; margin-bottom: 40px"> |
||||
|
<img src="assets/misc/check-box.png" class="mr-2"/> |
||||
|
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Own Criteria for Low Sales.</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> |
||||
|
<div class="col-sm-12 col-md-6"> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="margin-top: 40px; margin-bottom: 40px"> |
||||
|
<img src="assets/misc/check-box.png" class="mr-2"/> |
||||
|
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Any Period for Reports.</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> |
||||
|
<div class="col-sm-12 col-md-6"> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="margin-top: 40px; margin-bottom: 40px"> |
||||
|
<img src="assets/misc/check-box.png" class="mr-2"/> |
||||
|
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Odoo Pivot and Excel Table.</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> |
||||
|
<div class="col-sm-12 col-md-6"> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="margin-top: 40px; margin-bottom: 40px"> |
||||
|
<img src="assets/misc/check-box.png" class="mr-2"/> |
||||
|
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Filtered Analysis.</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> |
||||
|
<div class="col-sm-12 col-md-6"> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="margin-top: 40px; margin-bottom: 40px"> |
||||
|
<img src="assets/misc/check-box.png" class="mr-2"/> |
||||
|
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Template and Specific Variants.</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END OF FEATURES SECTION --> |
||||
|
<!-- SCREENSHOTS SECTION --> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" |
||||
|
id="screenshots"> |
||||
|
<div class="d-flex justify-content-center align-items-center mr-2" |
||||
|
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
||||
|
<img src="assets/misc/pictures.png"/> |
||||
|
</div> |
||||
|
<h2 class="mt-2" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
||||
|
Screenshots |
||||
|
</h2> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12"> |
||||
|
<div style="display: block; margin: 30px auto;"> |
||||
|
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
||||
|
Sale Report Configuration |
||||
|
</h3> |
||||
|
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
||||
|
Goto Sale -> Configuration -> Settings-> Under the settings we can see the new block to setting the default values. |
||||
|
</p> |
||||
|
<img src="assets/screenshots/1.png" class="img-thumbnail"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-sm-12"> |
||||
|
<div style="display: block; margin: 30px auto;"> |
||||
|
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
||||
|
Low Sale Report |
||||
|
</h3> |
||||
|
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
||||
|
When install the module you can see the menu under the Sale 'Low Sale Report' |
||||
|
</p> |
||||
|
<img src="assets/screenshots/2.png" class="img-thumbnail"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-sm-12"> |
||||
|
<div style="display: block; margin: 30px auto;"> |
||||
|
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
||||
|
Creating Pivot View in Odoo |
||||
|
</h3> |
||||
|
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
||||
|
Click the menu its open the wizard then choose filters if you want then click the 'Show in Odoo' button to print the pivot view. |
||||
|
</p> |
||||
|
<img src="assets/screenshots/3.png" class="img-thumbnail"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-sm-12"> |
||||
|
<div style="display: block; margin: 30px auto;"> |
||||
|
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
||||
|
Pivot View Report. |
||||
|
</h3> |
||||
|
<img src="assets/screenshots/4.png" class="img-thumbnail"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-sm-12"> |
||||
|
<div style="display: block; margin: 30px auto;"> |
||||
|
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
||||
|
Export Excel Report |
||||
|
</h3> |
||||
|
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
||||
|
Click the menu its open the wizard then choose filters if you want then click the 'Export as xlsx' button to print the Excel report. |
||||
|
</p> |
||||
|
<img src="assets/screenshots/5.png" class="img-thumbnail"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-sm-12"> |
||||
|
<div style="display: block; margin: 30px auto;"> |
||||
|
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> |
||||
|
Excel Report |
||||
|
</h3> |
||||
|
<img src="assets/screenshots/6.png" class="img-thumbnail"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END OF SCREENSHOTS SECTION --> |
||||
|
<!-- RELATED PRODUCTS --> |
||||
|
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
||||
|
<div class="d-flex justify-content-center align-items-center mr-2" |
||||
|
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
||||
|
<img src="assets/misc/categories.png"/> |
||||
|
</div> |
||||
|
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Related |
||||
|
Products |
||||
|
</h2> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12"> |
||||
|
<div id="demo1" class="row carousel slide" data-ride="carousel"> |
||||
|
<!-- The slideshow --> |
||||
|
<div class="carousel-inner" style="padding: 30px;"> |
||||
|
<div class="carousel-item" style="min-height: 198.656px;"> |
||||
|
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> |
||||
|
<a href="https://apps.odoo.com/apps/modules/16.0/inventory_barcode_scanning/" target="_blank"> |
||||
|
<div style="border-radius:10px"> |
||||
|
<img class="img img-responsive center-block" style="border-radius: 0px;" |
||||
|
src="assets/modules/1.png"> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> |
||||
|
<a href="https://apps.odoo.com/apps/modules/16.0/hr_zk_attendance/" target="_blank"> |
||||
|
<div style="border-radius:10px"> |
||||
|
<img class="img img-responsive center-block" style="border-radius: 0px;" |
||||
|
src="assets/modules/2.png"> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> |
||||
|
<a href="https://apps.odoo.com/apps/modules/16.0/sale_discount_total/" target="_blank"> |
||||
|
<div style="border-radius:10px"> |
||||
|
<img class="img img-responsive center-block" style="border-radius: 0px;" |
||||
|
src="assets/modules/3.png"> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="carousel-item active" style="min-height: 198.656px;"> |
||||
|
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> |
||||
|
<a href="https://apps.odoo.com/apps/modules/16.0/sale_product_image/" target="_blank"> |
||||
|
<div style="border-radius:10px"> |
||||
|
<img class="img img-responsive center-block" style="border-radius: 0px;" |
||||
|
src="assets/modules/4.png"> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> |
||||
|
<a href="https://apps.odoo.com/apps/modules/16.0/product_brand_sale/" target="_blank"> |
||||
|
<div style="border-radius:10px"> |
||||
|
<img class="img img-responsive center-block" style="border-radius: 0px;" |
||||
|
src="assets/modules/5.png"> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left"> |
||||
|
<a href="https://apps.odoo.com/apps/modules/16.0/sale_recurring/" target="_blank"> |
||||
|
<div style="border-radius:10px"> |
||||
|
<img class="img img-responsive center-block" style="border-radius: 0px;" |
||||
|
src="assets/modules/6.jpg"> |
||||
|
</div> |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- Left and right controls --> |
||||
|
<a class="carousel-control-prev" href="#demo1" data-slide="prev" style="width:35px; color:#000"> <span |
||||
|
class="carousel-control-prev-icon"><i class="fa fa-chevron-left" style="font-size:24px"></i></span> |
||||
|
</a> <a class="carousel-control-next" href="#demo1" data-slide="next" style="width:35px; color:#000"> |
||||
|
<span class="carousel-control-next-icon"> |
||||
|
<i class="fa fa-chevron-right" style="font-size:24px"></i> |
||||
|
</span> |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END OF RELATED PRODUCTS --> |
||||
|
<!-- OUR SERVICES --> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
||||
|
<div class="d-flex justify-content-center align-items-center mr-2" |
||||
|
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
||||
|
<img src="assets/misc/star.png"/> |
||||
|
</div> |
||||
|
<h2 class="mt-2" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
||||
|
Our Services |
||||
|
</h2> |
||||
|
</div> |
||||
|
<div class="container my-5"> |
||||
|
<div class="row"> |
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="assets/icons/cogs.png" class="img-responsive" |
||||
|
height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" |
||||
|
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Customization |
||||
|
</h6> |
||||
|
</div> |
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="assets/icons/wrench.png" class="img-responsive" |
||||
|
height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" |
||||
|
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Implementation |
||||
|
</h6> |
||||
|
</div> |
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="assets/icons/lifebuoy.png" class="img-responsive" |
||||
|
height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" |
||||
|
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Support |
||||
|
</h6> |
||||
|
</div> |
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="assets/icons/user.png" class="img-responsive" |
||||
|
height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" |
||||
|
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Hire |
||||
|
Odoo |
||||
|
Developer |
||||
|
</h6> |
||||
|
</div> |
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="assets/icons/puzzle.png" class="img-responsive" |
||||
|
height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" |
||||
|
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Integration |
||||
|
</h6> |
||||
|
</div> |
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="assets/icons/update.png" class="img-responsive" |
||||
|
height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" |
||||
|
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Migration |
||||
|
</h6> |
||||
|
</div> |
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="assets/icons/consultation.png" class="img-responsive" |
||||
|
height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" |
||||
|
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Consultancy |
||||
|
</h6> |
||||
|
</div> |
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="assets/icons/training.png" class="img-responsive" |
||||
|
height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" |
||||
|
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Implementation |
||||
|
</h6> |
||||
|
</div> |
||||
|
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
||||
|
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
||||
|
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
||||
|
<img src="assets/icons/license.png" class="img-responsive" |
||||
|
height="48px" width="48px"> |
||||
|
</div> |
||||
|
<h6 class="text-center" |
||||
|
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
||||
|
Odoo |
||||
|
Licensing Consultancy |
||||
|
</h6> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END OF OUR SERVICES --> |
||||
|
<!-- OUR INDUSTRIES --> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
||||
|
<div class="d-flex justify-content-center align-items-center mr-2" |
||||
|
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
||||
|
<img src="assets/misc/corporate.png"/> |
||||
|
</div> |
||||
|
<h2 class="mt-2" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
||||
|
Our |
||||
|
Industries |
||||
|
</h2> |
||||
|
</div> |
||||
|
<div class="container my-5"> |
||||
|
<div class="row"> |
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="assets/icons/trading-black.png" |
||||
|
class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
Trading |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
Easily procure |
||||
|
and |
||||
|
sell your products |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="assets/icons/pos-black.png" |
||||
|
class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
POS |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
Easy |
||||
|
configuration |
||||
|
and convivial experience |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="assets/icons/education-black.png" |
||||
|
class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
Education |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
A platform for |
||||
|
educational management |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="assets/icons/manufacturing-black.png" |
||||
|
class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
Manufacturing |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
Plan, track and |
||||
|
schedule your operations |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="assets/icons/ecom-black.png" |
||||
|
class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
E-commerce & Website |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
Mobile |
||||
|
friendly, |
||||
|
awe-inspiring product pages |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="assets/icons/service-black.png" |
||||
|
class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
Service Management |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
Keep track of |
||||
|
services and invoice |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="assets/icons/restaurant-black.png" |
||||
|
class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
Restaurant |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
Run your bar or |
||||
|
restaurant methodically |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-lg-3"> |
||||
|
<div class="my-4 d-flex flex-column justify-content-center" |
||||
|
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
||||
|
<img src="assets/icons/hotel-black.png" |
||||
|
class="img-responsive mb-3" height="48px" width="48px"> |
||||
|
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
||||
|
Hotel Management |
||||
|
</h5> |
||||
|
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
||||
|
An |
||||
|
all-inclusive |
||||
|
hotel management application |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END OF OUR INDUSTRIES --> |
||||
|
<!-- SUPPORT --> |
||||
|
<div class="d-flex align-items-center" |
||||
|
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
||||
|
<div class="d-flex justify-content-center align-items-center mr-2" |
||||
|
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
||||
|
<img src="assets/misc/customer-support.png"/> |
||||
|
</div> |
||||
|
<h2 class="mt-2" |
||||
|
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
||||
|
Support |
||||
|
</h2> |
||||
|
</div> |
||||
|
<div class="container mt-5"> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12 col-md-6"> |
||||
|
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> |
||||
|
<div class="mr-4" |
||||
|
style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> |
||||
|
<img src="assets/misc/support.png" height="48" width="48" |
||||
|
style="width: 42px; height: 42px;"/> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h4>Need Help?</h4> |
||||
|
<p style="line-height: 100%;">Got questions or need help? |
||||
|
Get in touch. |
||||
|
</p> |
||||
|
<a href="mailto:odoo@cybrosys.com"> |
||||
|
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> |
||||
|
odoo@cybrosys.com |
||||
|
</p> |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-sm-12 col-md-6"> |
||||
|
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> |
||||
|
<div class="mr-4" |
||||
|
style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> |
||||
|
<img src="assets/misc/whatsapp.png" height="52" width="52" |
||||
|
style="width: 52px; height: 52px;"/> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h4>WhatsApp</h4> |
||||
|
<p style="line-height: 100%;">Say hi to us on WhatsApp!</p> |
||||
|
<a href="https://api.whatsapp.com/send?phone=918606827707"> |
||||
|
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> |
||||
|
+91 86068 |
||||
|
27707 |
||||
|
</p> |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-sm-12 my-5 d-flex justify-content-center align-items-center"> |
||||
|
<img src="assets/misc/logo.png" width="144" height="31" |
||||
|
style="width:144px; height: 31px; margin-top: 40px;"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- END OF SUPPORT --> |
@ -0,0 +1,15 @@ |
|||||
|
/** @odoo-module **/ |
||||
|
/** Xlsx report action manager */ |
||||
|
import { registry } from "@web/core/registry"; |
||||
|
import { BlockUI } from "@web/core/ui/block_ui"; |
||||
|
import { download } from "@web/core/network/download"; |
||||
|
registry.category("ir.actions.report handlers").add("xlsx", async function (action) { |
||||
|
if (action.report_type === 'low_sale_xlsx_download') { |
||||
|
BlockUI; |
||||
|
await download({ |
||||
|
url: '/sale_low_xlsx_reports', |
||||
|
data: action.data, |
||||
|
complete: () => unblockUI, |
||||
|
error: (error) => self.call('crash_manager', 'rpc_error', error), |
||||
|
}); |
||||
|
}}); |
@ -0,0 +1,59 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<odoo> |
||||
|
<!-- Creating a session to the sale settings for creating the low sales report--> |
||||
|
<record id="res_config_settings_view_form" model="ir.ui.view"> |
||||
|
<field name="name"> |
||||
|
res.config.settings.view.form.inherit.low.sale.report |
||||
|
</field> |
||||
|
<field name="model">res.config.settings</field> |
||||
|
<field name="inherit_id" ref="sale.res_config_settings_view_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//div[@name='invoicing_setting_container']" |
||||
|
position="after"> |
||||
|
<h2 class="mt32">Low Sales Report</h2> |
||||
|
<div class="row mt16 o_settings_container" |
||||
|
name="low_sales_report_setting_container"> |
||||
|
<div class="col-12 col-lg-6 o_setting_box" |
||||
|
id="low_sale_report"> |
||||
|
<div class="o_setting_right_pane"> |
||||
|
<label for="product_type">Default Report Type |
||||
|
</label> |
||||
|
<div class="text-muted"> |
||||
|
Define the default type for the low sales |
||||
|
report. Should analysis be made for product |
||||
|
templates in general or for product variants? |
||||
|
</div> |
||||
|
<field name="product_type"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-12 col-lg-6 o_setting_box" |
||||
|
id="low_sale_report"> |
||||
|
<div class="o_setting_right_pane"> |
||||
|
<label for="absolute_qty">Default critical level |
||||
|
(absolute quantity) |
||||
|
</label> |
||||
|
<div class="text-muted"> |
||||
|
Define the default critical level for sales |
||||
|
(default unit of measure),under which products |
||||
|
are considered poorly performing |
||||
|
</div> |
||||
|
<field name="absolute_qty"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-12 col-lg-6 o_setting_box" |
||||
|
id="low_sale_report"> |
||||
|
<div class="o_setting_right_pane"> |
||||
|
<label for="analysed_period">Default analyzed period |
||||
|
</label> |
||||
|
<div class="text-muted"> |
||||
|
Define which period should be analyzed by |
||||
|
default |
||||
|
</div> |
||||
|
<field name="analysed_period"/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |
@ -0,0 +1,22 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Bhagyadev KP (odoo@cybrosys.com) |
||||
|
# |
||||
|
# This program is free software: you can modify |
||||
|
# it under the terms of the GNU Affero General Public License (AGPL) as |
||||
|
# published by the Free Software Foundation, either version 3 of the |
||||
|
# License, or (at your option) any later version. |
||||
|
# |
||||
|
# 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 for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU Affero General Public License |
||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
from . import low_sale_report |
@ -0,0 +1,212 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################ |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
||||
|
# Author: Bhagyadev KP (odoo@cybrosys.com) |
||||
|
# |
||||
|
# This program is free software: you can modify |
||||
|
# it under the terms of the GNU Affero General Public License (AGPL) as |
||||
|
# published by the Free Software Foundation, either version 3 of the |
||||
|
# License, or (at your option) any later version. |
||||
|
# |
||||
|
# 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 for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU Affero General Public License |
||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################ |
||||
|
import io |
||||
|
import json |
||||
|
from odoo import api, fields, models, _ |
||||
|
from odoo.exceptions import ValidationError |
||||
|
from odoo.tools import date_utils |
||||
|
from dateutil.relativedelta import relativedelta |
||||
|
try: |
||||
|
from odoo.tools.misc import xlsxwriter |
||||
|
except ImportError: |
||||
|
import xlsxwriter |
||||
|
|
||||
|
|
||||
|
class LowSaleReport(models.TransientModel): |
||||
|
"""Its define as the sale low performance product details in pivot view and |
||||
|
the Excel report.""" |
||||
|
_name = 'low.sale.report' |
||||
|
_description = 'Low Sale Report' |
||||
|
|
||||
|
product_type = fields.Selection( |
||||
|
[('variant', 'By product variant'), |
||||
|
('template', 'By product templates')], string="Report Type", |
||||
|
help='Which sale to take into account: Product templates in general' |
||||
|
' or variants?', required=True) |
||||
|
analysed_period_start = fields.Date(string='Period under analysis', |
||||
|
help='If not chosen, all product sale' |
||||
|
' will be analysed') |
||||
|
analysed_period_end = fields.Date(string='Period under analysis', |
||||
|
help='If not chosen, all product sale' |
||||
|
' will be analysed', |
||||
|
default=fields.Date.today()) |
||||
|
absolute_qty = fields.Float(string='Critical Level(Absolute Quantity)', |
||||
|
help='Which sale level are considered to be' |
||||
|
' low(in default unit of measurement) ', |
||||
|
required=True) |
||||
|
category = fields.Many2one('product.category', |
||||
|
string='Product Categories', |
||||
|
help='If not chosen, all product categories ' |
||||
|
'wil be analysed') |
||||
|
sale_team = fields.Many2one('crm.team', |
||||
|
help='If not chosen, all the sale team will' |
||||
|
' be analysed', string='Sales Teams') |
||||
|
|
||||
|
def action_pivot_low_sale_report(self): |
||||
|
"""Exporting the low sale report as the pivot view format in odoo""" |
||||
|
low_sale_report = { |
||||
|
'product_type': self.product_type, |
||||
|
'analysed_period_start': self.analysed_period_start, |
||||
|
'analysed_period_end': self.analysed_period_end, |
||||
|
'absolute_qty': self.absolute_qty, |
||||
|
'category': self.category, |
||||
|
'sale_team': self.sale_team |
||||
|
} |
||||
|
pivot_data = self.env['low.sale.pivot.view.report'].get_data( |
||||
|
low_sale_report) |
||||
|
if not pivot_data: |
||||
|
raise ValidationError( |
||||
|
_("No data was found for the specified criteria")) |
||||
|
pivot_records = [] |
||||
|
for data in pivot_data: |
||||
|
values = { |
||||
|
'price_total': data[2], |
||||
|
'product_uom_qty': data[1] |
||||
|
} |
||||
|
if self.product_type == 'variant': |
||||
|
values['product_id'] = data[0] |
||||
|
view_id = self.env.ref( |
||||
|
'low_sale_report.' |
||||
|
'low_sale_pivot_view_report_view_pivot_variant').id |
||||
|
else: |
||||
|
values['product_tmpl_id'] = data[0] |
||||
|
view_id = self.env.ref( |
||||
|
'low_sale_report.' |
||||
|
'low_sale_pivot_view_report_view_pivot_template').id |
||||
|
pivot_data_records = self.env['low.sale.pivot.view.report'].create( |
||||
|
values) |
||||
|
pivot_records.append(pivot_data_records.id) |
||||
|
return { |
||||
|
'name': 'Low Sale Pivot View Report', |
||||
|
'type': 'ir.actions.act_window', |
||||
|
'res_model': 'low.sale.pivot.view.report', |
||||
|
'view_mode': 'pivot', |
||||
|
'view_id': view_id, |
||||
|
'domain': [('id', 'in', pivot_records)], |
||||
|
} |
||||
|
|
||||
|
def action_excel_low_sale_report(self): |
||||
|
"""Exporting the low sale report as the Excel view format in odoo""" |
||||
|
self.ensure_one() |
||||
|
data = {'ids': self.env.context.get('active_ids', []), |
||||
|
'model': self.env.context.get('active_model', 'ir.ui.menu'), |
||||
|
'form': self.read( |
||||
|
['product_type', 'analysed_period_start', |
||||
|
'analysed_period_end', 'absolute_qty', |
||||
|
'category', 'sale_team'])[0]} |
||||
|
return { |
||||
|
'type': 'ir.actions.report', |
||||
|
'data': {'model': 'low.sale.report', |
||||
|
'options': json.dumps(data, |
||||
|
default=date_utils.json_default), |
||||
|
'output_format': 'xlsx', |
||||
|
'report_name': 'Low Sale Report', |
||||
|
}, |
||||
|
'report_type': 'low_sale_xlsx_download' |
||||
|
} |
||||
|
|
||||
|
def get_low_sale_xlsx_report(self, options, response): |
||||
|
"""Generate the Excel report based on the provided options and write it |
||||
|
to the response.""" |
||||
|
output = io.BytesIO() |
||||
|
workbook = xlsxwriter.Workbook(output, {'in_memory': True}) |
||||
|
data = {'form': options['form'], 'model': 'ir.ui.menu', 'ids': []} |
||||
|
data['form']['used_context'] = { |
||||
|
'product_type': options['form']['product_type'], |
||||
|
'analysed_period_start': options['form']['analysed_period_start'], |
||||
|
'analysed_period_end': options['form']['analysed_period_end'], |
||||
|
'absolute_qty': options['form']['absolute_qty'], |
||||
|
'active_model': None, |
||||
|
'active_ids': None, |
||||
|
'active_id': None, |
||||
|
'category': options['form']['category'], |
||||
|
'sale_team': options['form']['sale_team'], |
||||
|
} |
||||
|
form_data = data['form'] |
||||
|
fetch_datas = self.env['low.sale.pivot.view.report'].get_data(form_data) |
||||
|
if not fetch_datas: |
||||
|
raise ValidationError( |
||||
|
_("No data was found for the specified criteria.")) |
||||
|
worksheet = workbook.add_worksheet() |
||||
|
name_formate = workbook.add_format( |
||||
|
{'bold': True, 'align': 'center', 'valign': 'vcenter', 'border': 1, |
||||
|
'bg_color': '#D3D3D3', 'font_size': 16}) |
||||
|
format2 = workbook.add_format( |
||||
|
{'font_size': 12, 'bold': True, 'bg_color': '#D3D3D3'}) |
||||
|
rows = 0 |
||||
|
cols = 0 |
||||
|
worksheet.merge_range(rows, cols, rows + 1, cols + 3, |
||||
|
'Low Sale Report', name_formate) |
||||
|
worksheet.set_column('B:B', 35) |
||||
|
worksheet.set_column('C:C', 15) |
||||
|
worksheet.set_column('D:D', 15) |
||||
|
worksheet.write('A4', "ID", format2) |
||||
|
worksheet.write('B4', "Product", format2) |
||||
|
worksheet.write('C4', "Sold Quantity", format2) |
||||
|
worksheet.write('D4', "Revenue", format2) |
||||
|
# Write data to the worksheet |
||||
|
row_num = 5 |
||||
|
cols_num = 0 |
||||
|
for rec in fetch_datas: |
||||
|
worksheet.write(row_num, cols_num, rec[0]) |
||||
|
worksheet.write(row_num, cols_num + 1, rec[3]) |
||||
|
worksheet.write(row_num, cols_num + 2, rec[1]) |
||||
|
worksheet.write(row_num, cols_num + 3, rec[2]) |
||||
|
row_num += 1 |
||||
|
# Close the workbook |
||||
|
workbook.close() |
||||
|
# Seek to the beginning of the BytesIO buffer |
||||
|
output.seek(0) |
||||
|
# Stream the Excel file to the response |
||||
|
response.stream.write(output.read()) |
||||
|
output.close() |
||||
|
|
||||
|
@api.model |
||||
|
def default_get(self, fields): |
||||
|
"""Prefilling the wizard data into the settings field values""" |
||||
|
res = super().default_get(fields) |
||||
|
# Fetch configuration parameters from ResConfigSettings |
||||
|
config_params = self.env['ir.config_parameter'].sudo() |
||||
|
# Prefill the values based on the configuration parameters |
||||
|
res['product_type'] = config_params.get_param( |
||||
|
'low_sale_report.product_type', default='variant') |
||||
|
res['absolute_qty'] = config_params.get_param( |
||||
|
'low_sale_report.absolute_qty', default=0.0) |
||||
|
end_date = res.get('analysed_period_end') |
||||
|
if end_date: |
||||
|
if (config_params.get_param('low_sale_report.analysed_period') == |
||||
|
'last_month'): |
||||
|
start_date = end_date - relativedelta(days=30) |
||||
|
elif (config_params.get_param('low_sale_report.analysed_period') == |
||||
|
'last_3'): |
||||
|
start_date = end_date - relativedelta(months=3) |
||||
|
elif (config_params.get_param('low_sale_report.analysed_period') == |
||||
|
'last_6'): |
||||
|
start_date = end_date - relativedelta(months=6) |
||||
|
elif (config_params.get_param('low_sale_report.analysed_period') == |
||||
|
'last_12'): |
||||
|
start_date = end_date - relativedelta(months=12) |
||||
|
else: |
||||
|
# Default to last_month if no valid option is selected |
||||
|
start_date = end_date - relativedelta(months=12) |
||||
|
res['analysed_period_start'] = start_date |
||||
|
return res |
@ -0,0 +1,51 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<odoo> |
||||
|
<!-- Low sale report view form--> |
||||
|
<record id="low_sale_report_view_form" model="ir.ui.view"> |
||||
|
<field name="name">low.sale.report.view.form</field> |
||||
|
<field name="model">low.sale.report</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<form> |
||||
|
<group> |
||||
|
<group> |
||||
|
<field name="product_type"/> |
||||
|
<label for="analysed_period_start"/> |
||||
|
<div class="o_row"> |
||||
|
<field name="analysed_period_start"/> |
||||
|
<field name="analysed_period_end" nolabel="1"/> |
||||
|
</div> |
||||
|
<field name="absolute_qty"/> |
||||
|
</group> |
||||
|
<group> |
||||
|
<field name="category" options="{'no_create':True, 'no_create_edit': True}"/> |
||||
|
<field name="sale_team" options="{'no_create':True, 'no_create_edit': True}"/> |
||||
|
</group> |
||||
|
</group> |
||||
|
<footer> |
||||
|
<button id="pivot_view_report" name="action_pivot_low_sale_report" |
||||
|
string="Show in Odoo" type="object" |
||||
|
class="btn-primary o_confirm_yes"/> |
||||
|
<button id="excel_view_report" name="action_excel_low_sale_report" |
||||
|
string="Export as xlsx" type="object" |
||||
|
class="btn-primary o_confirm_yes"/> |
||||
|
<button string="Cancel" class="btn-default" |
||||
|
special="cancel"/> |
||||
|
</footer> |
||||
|
</form> |
||||
|
</field> |
||||
|
</record> |
||||
|
<!-- Low sale report action--> |
||||
|
<record id="low_sale_report_action" model="ir.actions.act_window"> |
||||
|
<field name="name">Low Sale Report</field> |
||||
|
<field name="type">ir.actions.act_window</field> |
||||
|
<field name="res_model">low.sale.report</field> |
||||
|
<field name="view_mode">form</field> |
||||
|
<field name="target">new</field> |
||||
|
</record> |
||||
|
<!-- Low sale report menu--> |
||||
|
<menuitem id="low_sale_report_menu" |
||||
|
name="Low Sale Report" |
||||
|
action="low_sale_report_action" |
||||
|
parent="sale.sale_menu_root" sequence="45" |
||||
|
/> |
||||
|
</odoo> |