@ -0,0 +1,46 @@ |
|||
.. 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 |
|||
|
|||
Sale All In One Report Generator |
|||
================================ |
|||
* Sale All In One Dynamic Report For Odoo 16 community And Enterprise editions |
|||
|
|||
Installation |
|||
============ |
|||
- www.odoo.com/documentation/16.0/setup/install.html |
|||
- Install our custom addon |
|||
|
|||
License |
|||
------- |
|||
General Public License, Version 3 (AGPL v3). |
|||
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
Credits |
|||
------- |
|||
* Developer: (V16) Anfas Faisal K, Contact: odoo@cybrosys.com |
|||
|
|||
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: `<static/description/index.html>`__ |
@ -0,0 +1,24 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Anfas Faisal K (odoo@cybrosys.info) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import controllers |
|||
from . import models |
|||
from . import report |
@ -0,0 +1,61 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Anfas Faisal K (odoo@cybrosys.info) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
{ |
|||
'name': 'Sales All In One Report Generator', |
|||
'version': '16.0.1.0.0', |
|||
'category': 'Sales', |
|||
'summary': "A range of sales reports for comprehensive " |
|||
"analysis, covering aspects like orders, order details, " |
|||
"salesman and so on, with the ability to filter data by " |
|||
"different date ranges.", |
|||
'description': "This application serves as a valuable tool for generating " |
|||
"diverse sales reports, facilitating in-depth analysis. It " |
|||
"presents a comprehensive overview of a company's sales " |
|||
"performance across various dimensions, including order " |
|||
"summaries, order details, salesperson-specific data, " |
|||
"and more. Additionally, users have the option to apply " |
|||
"date range filters to extract specific insights from the " |
|||
"data. ", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': 'https://www.cybrosys.com', |
|||
'depends': ['sale_management'], |
|||
'data': [ |
|||
'security/ir.model.access.csv', |
|||
'report/sale_order_report.xml', |
|||
'report/sale_order_templates.xml', |
|||
'views/sale_report_views.xml', |
|||
], |
|||
'assets': { |
|||
'web.assets_backend': [ |
|||
'sale_report_generator/static/src/js/sale_report.js', |
|||
'sale_report_generator/static/src/css/sale_report.css', |
|||
'sale_report_generator/static/src/xml/sale_report_templates.xml', |
|||
], |
|||
}, |
|||
'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) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Anfas Faisal K (odoo@cybrosys.info) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import sale_report_generator |
@ -0,0 +1,65 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Anfas Faisal K (odoo@cybrosys.info) |
|||
# |
|||
# 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 <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 TBXLSXReport(http.Controller): |
|||
"""Controller class to generate dynamic sale reports in Excel format. |
|||
Methods: |
|||
get_report_xlsx: Generate a dynamic sale report in Excel format and |
|||
send it as a response to a HTTP POST request. |
|||
""" |
|||
@http.route('/sale_dynamic_xlsx_reports', type='http', auth='user', |
|||
methods=['POST'], csrf=False) |
|||
def get_report_xlsx(self, model, options, output_format, report_data, |
|||
report_name, dfr_data): |
|||
"""Generate a dynamic sale report in Excel format and send it as a |
|||
response to a HTTP POST request.""" |
|||
report_obj = request.env[model].with_user(request.session.uid) |
|||
dfr_data = dfr_data |
|||
options = 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_sale_xlsx_report(options, response, report_data, |
|||
dfr_data) |
|||
response.set_cookie('fileToken', token) |
|||
return response |
|||
except Exception as e: |
|||
se = http.serialize_exception(e) |
|||
error = { |
|||
'code': 200, |
|||
'message': 'Odoo Server Error', |
|||
'data': se |
|||
} |
|||
return request.make_response(html_escape(json.dumps(error))) |
@ -0,0 +1,7 @@ |
|||
## Module <sale_report_generator> |
|||
|
|||
#### 21.11.2023 |
|||
#### Version 16.0.1.0.0 |
|||
#### ADD |
|||
|
|||
- Initial Commit for Sales All In One Report Generator |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Anfas Faisal K (odoo@cybrosys.info) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import sales_report |
@ -0,0 +1,526 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Anfas Faisal K (odoo@cybrosys.info) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
import io |
|||
import json |
|||
from odoo import api, fields, models |
|||
|
|||
try: |
|||
from odoo.tools.misc import xlsxwriter |
|||
except ImportError: |
|||
import xlsxwriter |
|||
|
|||
|
|||
class SaleReport(models.Model): |
|||
"""Model for generating sales reports. |
|||
Methods: |
|||
sale_report : Generate a sales report based on the provided option. |
|||
get_filter :This method relies on the 'get_filter_data' method to |
|||
retrieve filter data based on the provided option. It then formats the |
|||
filter data and returns a dictionary of filters to apply to the sales |
|||
report. |
|||
get_filter_data:This method relies on the 'get_filter_data' method to |
|||
retrieve filter data based on the provided option. It then formats the |
|||
filter data and returns a dictionary of filters to apply to the sales |
|||
report. |
|||
create : Create a new record for the current model. |
|||
write : Override the write method to perform additional actions when |
|||
updating a record. |
|||
_get_report_sub_lines: Generates sub-lines for a sales report based |
|||
on the given report type and date rangeand append to report_sub_lines. |
|||
_get_report_total_value : Retrieves the main lines of a report based on |
|||
the report type in data. |
|||
get_sale_xlsx_report:Generate a sales report in XLSX format based on |
|||
the specified filters. |
|||
""" |
|||
_name = "sales.report" |
|||
_description = "Generate Sales Report" |
|||
|
|||
sale_report = fields.Char(string="Sale Report", |
|||
help="The generated sales report") |
|||
date_from = fields.Datetime(string="Date From", |
|||
help="The starting date for the report") |
|||
date_to = fields.Datetime(string="Date to", |
|||
help="The ending date for the report") |
|||
report_type = fields.Selection([ |
|||
('report_by_order', 'Report By Order'), |
|||
('report_by_order_detail', 'Report By Order Detail'), |
|||
('report_by_product', 'Report By Product'), |
|||
('report_by_categories', 'Report By Categories'), |
|||
('report_by_salesperson', 'Report By Sales Person'), |
|||
('report_by_state', 'Report By State')], string='Report Type', |
|||
default='report_by_order', help="Select the type of report to generate") |
|||
|
|||
@api.model |
|||
def sale_report(self, option): |
|||
"""Generate a sales report based on the provided option.""" |
|||
report_values = self.env['sales.report'].browse(option[0]) |
|||
data = { |
|||
'report_type': report_values.report_type, |
|||
'model': self, |
|||
} |
|||
if report_values.date_from: |
|||
data.update({ |
|||
'date_from': report_values.date_from, |
|||
}) |
|||
if report_values.date_to: |
|||
data.update({ |
|||
'date_to': report_values.date_to, |
|||
}) |
|||
return { |
|||
'name': "Sale Orders", |
|||
'type': 'ir.actions.client', |
|||
'tag': 's_r', |
|||
'orders': data, |
|||
'filters': self.get_filter(option), |
|||
'report_lines': self._get_report_values(data).get('SALE'), |
|||
'report_main_line': self._get_report_values(data).get('sale_main'), |
|||
} |
|||
|
|||
def get_filter(self, option): |
|||
""" This method relies on the 'get_filter_data' method to retrieve |
|||
filter data based on the provided option. It then formats the filter |
|||
data and returns a dictionary of filters to apply to the sales |
|||
report.""" |
|||
data = self.get_filter_data(option) |
|||
filters = {} |
|||
if data.get('report_type') == 'report_by_order': |
|||
filters['report_type'] = 'Report By Order' |
|||
elif data.get('report_type') == 'report_by_order_detail': |
|||
filters['report_type'] = 'Report By Order Detail' |
|||
elif data.get('report_type') == 'report_by_product': |
|||
filters['report_type'] = 'Report By Product' |
|||
elif data.get('report_type') == 'report_by_categories': |
|||
filters['report_type'] = 'Report By Categories' |
|||
elif data.get('report_type') == 'report_by_salesperson': |
|||
filters['report_type'] = 'Report By Sales Person' |
|||
elif data.get('report_type') == 'report_by_state': |
|||
filters['report_type'] = 'Report By State' |
|||
else: |
|||
filters['report_type'] = 'report_by_order' |
|||
return filters |
|||
|
|||
def get_filter_data(self, option): |
|||
""" This method relies on the 'sales.report' model to retrieve the |
|||
sales report values.""" |
|||
default_filters = {} |
|||
report = self.env['sales.report'].browse(option[0]) |
|||
filter_dict = { |
|||
'report_type': report.report_type, |
|||
} |
|||
filter_dict.update(default_filters) |
|||
return filter_dict |
|||
|
|||
def _get_report_sub_lines(self, data, report, date_from, date_to): |
|||
""" Generates sub-lines for a sales report based on the given report |
|||
type and date range and append to report_sub_lines""" |
|||
report_sub_lines = [] |
|||
if data.get('report_type') == 'report_by_order': |
|||
query = '''select so.id,so.name as number,so.date_order, |
|||
so.partner_id,so.amount_total,so.user_id, |
|||
res_partner.name as customer,res_users.partner_id as |
|||
user_partner,so.id as id,sum(sale_order_line.product_uom_qty), |
|||
(SELECT res_partner.name as sales_man FROM res_partner |
|||
WHERE res_partner.id = res_users.partner_id) |
|||
from sale_order as so |
|||
inner join res_partner on so.partner_id = res_partner.id |
|||
inner join res_users on so.user_id = res_users.id |
|||
inner join sale_order_line on so.id = sale_order_line.order_id |
|||
''' |
|||
term = 'Where ' |
|||
if data.get('date_from'): |
|||
query += "Where so.date_order >= '%s' " % data.get('date_from') |
|||
term = 'AND ' |
|||
if data.get('date_to'): |
|||
query += term + "so.date_order <= '%s' " % data.get('date_to') |
|||
query += "group by so.user_id,res_users.partner_id," \ |
|||
"res_partner.name,so.partner_id,so.date_order," \ |
|||
"so.name,so.amount_total,so.id" |
|||
self._cr.execute(query) |
|||
report_by_order = self._cr.dictfetchall() |
|||
report_sub_lines.append(report_by_order) |
|||
elif data.get('report_type') == 'report_by_order_detail': |
|||
query = '''SELECT so.id,so.name as number,so.date_order, |
|||
res_partner.name as customer, |
|||
rc.name as company,product_template.name as product, |
|||
product_product.default_code,so_line.product_uom_qty, |
|||
so_line.price_subtotal,so.amount_total,so.partner_id, |
|||
so.user_id,ru.id,so_line.product_id, |
|||
sum(so_line.product_uom_qty), |
|||
(SELECT res_partner.name as salesman FROM res_partner |
|||
WHERE res_partner.id = res_users.partner_id) from |
|||
sale_order as so inner join sale_order_line as so_line |
|||
on so.id = so_line.order_id inner join product_product |
|||
ON so_line.product_id=product_product.id inner join |
|||
product_template ON product_product.product_tmpl_id = |
|||
product_template.id inner join res_partner on |
|||
so.partner_id=res_partner.id inner join res_users on |
|||
so.user_id = res_users.id inner join res_company as rc |
|||
on so.company_id=rc.id inner join res_users as ru on |
|||
so.user_id=ru.id |
|||
''' |
|||
term = 'Where ' |
|||
if data.get('date_from'): |
|||
query += "Where so.date_order >= '%s' " % data.get('date_from') |
|||
term = 'AND ' |
|||
if data.get('date_to'): |
|||
query += term + "so.date_order <= '%s' " % data.get('date_to') |
|||
query += ''' group by so.user_id, so.name, so.id,so.date_order, |
|||
res_partner.name,rc.name,product_template.name, |
|||
product_product.default_code,so_line.product_uom_qty, |
|||
so_line.price_subtotal,so.amount_total,so.partner_id, |
|||
so.user_id,ru.id,so_line.product_id,res_users.partner_id |
|||
''' |
|||
self._cr.execute(query) |
|||
report_by_order_details = self._cr.dictfetchall() |
|||
report_sub_lines.append(report_by_order_details) |
|||
elif data.get('report_type') == 'report_by_product': |
|||
query = '''SELECT so.id,so.date_order, |
|||
product_template.name as product, |
|||
product_category.name as category, |
|||
product_product.default_code,so_line.product_uom_qty, |
|||
so.amount_total,so.name as number |
|||
From sale_order as so |
|||
inner join sale_order_line as so_line on |
|||
so.id = so_line.order_id inner join product_product ON |
|||
so_line.product_id=product_product.id inner join |
|||
product_template ON product_product.product_tmpl_id = |
|||
product_template.id inner join product_category on |
|||
product_category.id = product_template.categ_id |
|||
''' |
|||
term = 'Where ' |
|||
if data.get('date_from'): |
|||
query += "Where so.date_order >= '%s' " % data.get('date_from') |
|||
term = 'AND ' |
|||
if data.get('date_to'): |
|||
query += term + "so.date_order <= '%s' " % data.get('date_to') |
|||
query += ("group by so.id,so.date_order,product_template.name," |
|||
"product_category.name,product_product.default_code," |
|||
"so_line.product_uom_qty") |
|||
self._cr.execute(query) |
|||
report_by_product = self._cr.dictfetchall() |
|||
report_sub_lines.append(report_by_product) |
|||
elif data.get('report_type') == 'report_by_categories': |
|||
query = '''select product_category.name, |
|||
sum(so_line.product_uom_qty) as qty,sum(so_line.price_subtotal) as |
|||
amount_total from sale_order_line as so_line inner join |
|||
product_template on so_line.product_id = product_template.id |
|||
inner join product_category on product_category.id = |
|||
product_template.categ_id inner join sale_order on so_line.order_id |
|||
= sale_order.id |
|||
''' |
|||
term = 'Where ' |
|||
if data.get('date_from'): |
|||
query += "Where sale_order.date_order >= '%s' " % data.get( |
|||
'date_from') |
|||
term = 'AND ' |
|||
if data.get('date_to'): |
|||
query += term + "sale_order.date_order <= '%s' " % data.get( |
|||
'date_to') |
|||
query += "group by product_category.name" |
|||
self._cr.execute(query) |
|||
report_by_categories = self._cr.dictfetchall() |
|||
report_sub_lines.append(report_by_categories) |
|||
elif data.get('report_type') == 'report_by_salesperson': |
|||
query = ''' |
|||
select res_partner.name,sum(sale_order_line.product_uom_qty) as qty, |
|||
sum(sale_order_line.price_subtotal) as amount,count(so.id) as order |
|||
from sale_order as so |
|||
inner join res_users on so.user_id = res_users.id |
|||
inner join res_partner on res_users.partner_id = res_partner.id |
|||
inner join sale_order_line on so.id = sale_order_line.order_id |
|||
''' |
|||
term = 'Where ' |
|||
if data.get('date_from'): |
|||
query += "Where so.date_order >= '%s' " % data.get('date_from') |
|||
term = 'AND ' |
|||
if data.get('date_to'): |
|||
query += term + "so.date_order <= '%s' " % data.get('date_to') |
|||
query += "group by res_partner.name" |
|||
self._cr.execute(query) |
|||
report_by_salesperson = self._cr.dictfetchall() |
|||
report_sub_lines.append(report_by_salesperson) |
|||
elif data.get('report_type') == 'report_by_state': |
|||
query = ''' |
|||
select so.state,count(so.id),sum(sale_order_line.product_uom_qty) as qty, |
|||
sum(sale_order_line.price_subtotal) as amount from sale_order as so |
|||
inner join sale_order_line on so.id = sale_order_line.order_id |
|||
''' |
|||
term = 'Where ' |
|||
if data.get('date_from'): |
|||
query += "Where so.date_order >= '%s' " % data.get('date_from') |
|||
term = 'AND ' |
|||
if data.get('date_to'): |
|||
query += term + "so.date_order <= '%s' " % data.get('date_to') |
|||
query += "group by so.state" |
|||
self._cr.execute(query) |
|||
report_by_state = self._cr.dictfetchall() |
|||
report_sub_lines.append(report_by_state) |
|||
return report_sub_lines |
|||
|
|||
def _get_report_total_value(self, data, report): |
|||
"""Retrieves the main lines of a report based on the report type in |
|||
data.""" |
|||
report_main_lines = [] |
|||
if data.get('report_type') == 'report_by_order': |
|||
self._cr.execute(''' |
|||
select count(so.id) as order,sum(so.amount_total) as amount |
|||
from sale_order as so |
|||
''') |
|||
report_by_order = self._cr.dictfetchall() |
|||
report_main_lines.append(report_by_order) |
|||
elif data.get('report_type') == 'report_by_order_detail': |
|||
self._cr.execute(''' |
|||
select count(so_line.id) as order,sum(so_line.price_subtotal) as total |
|||
from sale_order_line as so_line |
|||
''') |
|||
report_by_order_detail = self._cr.dictfetchall() |
|||
report_main_lines.append(report_by_order_detail) |
|||
elif data.get('report_type') == 'report_by_product': |
|||
self._cr.execute(''' |
|||
select count(so_line.product_id) as order,sum(so_line.price_subtotal) as amount |
|||
from sale_order_line as so_line |
|||
''') |
|||
report_by_product = self._cr.dictfetchall() |
|||
report_main_lines.append(report_by_product) |
|||
else: |
|||
report_main_lines = False |
|||
return report_main_lines |
|||
|
|||
def _get_report_values(self, data): |
|||
""" Generate a dictionary of report values based on the input |
|||
data dictionary.""" |
|||
docs = data['model'] |
|||
date_from = data.get('date_from') |
|||
date_to = data.get('date_to') |
|||
if data['report_type'] == 'report_by_order_detail': |
|||
report = ['Report By Order Detail'] |
|||
elif data['report_type'] == 'report_by_product': |
|||
report = ['Report By Product'] |
|||
elif data['report_type'] == 'report_by_categories': |
|||
report = ['Report By Categories'] |
|||
elif data['report_type'] == 'report_by_salesperson': |
|||
report = ['Report By Sales Person'] |
|||
elif data['report_type'] == 'report_by_state': |
|||
report = ['Report By State'] |
|||
else: |
|||
report = ['Report By Order'] |
|||
report_res_total = self._get_report_total_value(data, report) |
|||
if data.get('report_type'): |
|||
report_res = \ |
|||
self._get_report_sub_lines(data, report, date_from, date_to)[0] |
|||
else: |
|||
report_res = self._get_report_sub_lines(data, report, date_from, |
|||
date_to) |
|||
if data.get('report_type') == 'report_by_order': |
|||
report_res_total = self._get_report_total_value(data, report)[0] |
|||
return { |
|||
'doc_ids': self.ids, |
|||
'docs': docs, |
|||
'SALE': report_res, |
|||
'sale_main': report_res_total, |
|||
} |
|||
|
|||
def get_sale_xlsx_report(self, data, response, report_data, dfr_data): |
|||
"""Generate a sales report in XLSX format based on the specified |
|||
filters.""" |
|||
report_data_main = json.loads(report_data) |
|||
output = io.BytesIO() |
|||
filters = json.loads(data) |
|||
workbook = xlsxwriter.Workbook(output, {'in_memory': True}) |
|||
sheet = workbook.add_worksheet() |
|||
head = workbook.add_format({'align': 'center', 'bold': True, |
|||
'font_size': '20px'}) |
|||
heading = workbook.add_format( |
|||
{'align': 'center', 'bold': True, 'font_size': '10px', |
|||
'border': 2, |
|||
'border_color': 'black'}) |
|||
txt_l = workbook.add_format( |
|||
{'font_size': '10px', 'border': 1, 'bold': True}) |
|||
sheet.merge_range('A2:H3', |
|||
'Sales Report', |
|||
head) |
|||
if filters.get('report_type') == 'report_by_order': |
|||
sheet.merge_range('B5:D5', 'Report Type: ' + |
|||
filters.get('report_type'), txt_l) |
|||
sheet.write('A7', 'Sale', heading) |
|||
sheet.write('B7', 'Date Order', heading) |
|||
sheet.write('C7', 'Customer', heading) |
|||
sheet.write('D7', 'Sales Person', heading) |
|||
sheet.write('E7', 'Total Qty', heading) |
|||
sheet.write('F7', 'Amount Total', heading) |
|||
lst = [] |
|||
for rec in report_data_main[0]: |
|||
lst.append(rec) |
|||
row = 6 |
|||
col = 0 |
|||
sheet.set_column(3, 0, 15) |
|||
sheet.set_column(4, 1, 15) |
|||
sheet.set_column(5, 2, 15) |
|||
sheet.set_column(6, 3, 15) |
|||
sheet.set_column(7, 4, 15) |
|||
sheet.set_column(8, 5, 15) |
|||
for rec_data in report_data_main: |
|||
row += 1 |
|||
sheet.write(row, col, rec_data['number'], txt_l) |
|||
sheet.write(row, col + 1, rec_data['date_order'], txt_l) |
|||
sheet.write(row, col + 2, rec_data['customer'], txt_l) |
|||
sheet.write(row, col + 3, rec_data['sales_man'], txt_l) |
|||
sheet.write(row, col + 4, rec_data['sum'], txt_l) |
|||
sheet.write(row, col + 5, rec_data['amount_total'], txt_l) |
|||
if filters.get('report_type') == 'report_by_order_detail': |
|||
sheet.merge_range('B5:D5', 'Report Type: ' + |
|||
filters.get('report_type'), txt_l) |
|||
sheet.write('A7', 'Sale', heading) |
|||
sheet.write('B7', 'Date Order', heading) |
|||
sheet.write('C7', 'Customer', heading) |
|||
sheet.write('D7', 'Company', heading) |
|||
sheet.write('E7', 'Sales Person', heading) |
|||
sheet.write('F7', 'Product Name', heading) |
|||
sheet.write('G7', 'Product Code', heading) |
|||
sheet.write('H7', 'Quantity', heading) |
|||
sheet.write('I7', 'Price Subtotal', heading) |
|||
sheet.write('J7', 'Amount Total', heading) |
|||
lst = [] |
|||
for rec in report_data_main[0]: |
|||
lst.append(rec) |
|||
row = 6 |
|||
col = 0 |
|||
sheet.set_column(3, 0, 15) |
|||
sheet.set_column(4, 1, 15) |
|||
sheet.set_column(5, 2, 15) |
|||
sheet.set_column(6, 3, 15) |
|||
sheet.set_column(7, 4, 15) |
|||
sheet.set_column(8, 5, 15) |
|||
sheet.set_column(9, 6, 15) |
|||
sheet.set_column(10, 7, 15) |
|||
sheet.set_column(11, 8, 15) |
|||
sheet.set_column(12, 9, 15) |
|||
for rec_data in report_data_main: |
|||
row += 1 |
|||
sheet.write(row, col, rec_data['number'], txt_l) |
|||
sheet.write(row, col + 1, rec_data['date_order'], txt_l) |
|||
sheet.write(row, col + 2, rec_data['customer'], txt_l) |
|||
sheet.write(row, col + 3, rec_data['company'], txt_l) |
|||
sheet.write(row, col + 4, rec_data['salesman'], txt_l) |
|||
sheet.write(row, col + 5, rec_data['product']['en_US'], txt_l) |
|||
sheet.write(row, col + 6, rec_data['default_code'], txt_l) |
|||
sheet.write(row, col + 7, rec_data['product_uom_qty'], txt_l) |
|||
sheet.write(row, col + 8, rec_data['price_subtotal'], txt_l) |
|||
sheet.write(row, col + 9, rec_data['amount_total'], txt_l) |
|||
if filters.get('report_type') == 'report_by_product': |
|||
|
|||
sheet.merge_range('B5:D5', 'Report Type: ' + |
|||
filters.get('report_type'), txt_l) |
|||
sheet.write('A7', 'Product', heading) |
|||
sheet.write('B7', 'Category', heading) |
|||
sheet.write('C7', 'Product Code', heading) |
|||
sheet.write('D7', 'Quantity', heading) |
|||
sheet.write('E7', 'Amount Total', heading) |
|||
lst = [] |
|||
for rec in report_data_main[0]: |
|||
lst.append(rec) |
|||
row = 6 |
|||
col = 0 |
|||
sheet.set_column(3, 0, 15) |
|||
sheet.set_column(4, 1, 15) |
|||
sheet.set_column(5, 2, 15) |
|||
sheet.set_column(6, 3, 15) |
|||
sheet.set_column(7, 4, 15) |
|||
for rec_data in report_data_main: |
|||
row += 1 |
|||
sheet.write(row, col, rec_data['product']['en_US'], txt_l) |
|||
sheet.write(row, col + 1, rec_data['category'], txt_l) |
|||
sheet.write(row, col + 2, rec_data['default_code'], txt_l) |
|||
sheet.write(row, col + 3, rec_data['product_uom_qty'], txt_l) |
|||
sheet.write(row, col + 4, rec_data['amount_total'], txt_l) |
|||
if filters.get('report_type') == 'report_by_categories': |
|||
sheet.merge_range('B5:D5', 'Report Type: ' + |
|||
filters.get('report_type'), txt_l) |
|||
sheet.write('B7', 'Category', heading) |
|||
sheet.write('C7', 'Qty', heading) |
|||
sheet.write('D7', 'Amount Total', heading) |
|||
lst = [] |
|||
for rec in report_data_main[0]: |
|||
lst.append(rec) |
|||
row = 6 |
|||
col = 1 |
|||
sheet.set_column(3, 1, 15) |
|||
sheet.set_column(4, 2, 15) |
|||
sheet.set_column(5, 3, 15) |
|||
for rec_data in report_data_main: |
|||
row += 1 |
|||
sheet.write(row, col, rec_data['name'], txt_l) |
|||
sheet.write(row, col + 1, rec_data['qty'], txt_l) |
|||
sheet.write(row, col + 2, rec_data['amount_total'], txt_l) |
|||
if filters.get('report_type') == 'report_by_salesperson': |
|||
sheet.merge_range('B5:D5', 'Report Type: ' + |
|||
filters.get('report_type'), txt_l) |
|||
sheet.write('A7', 'Sales Person', heading) |
|||
sheet.write('B7', 'Total Order', heading) |
|||
sheet.write('C7', 'Total Qty', heading) |
|||
sheet.write('D7', 'Total Amount', heading) |
|||
lst = [] |
|||
for rec in report_data_main[0]: |
|||
lst.append(rec) |
|||
row = 6 |
|||
col = 0 |
|||
sheet.set_column(3, 0, 15) |
|||
sheet.set_column(4, 1, 15) |
|||
sheet.set_column(5, 2, 15) |
|||
sheet.set_column(6, 3, 15) |
|||
for rec_data in report_data_main: |
|||
row += 1 |
|||
sheet.write(row, col, rec_data['name'], txt_l) |
|||
sheet.write(row, col + 1, rec_data['order'], txt_l) |
|||
sheet.write(row, col + 2, rec_data['qty'], txt_l) |
|||
sheet.write(row, col + 3, rec_data['amount'], txt_l) |
|||
if filters.get('report_type') == 'report_by_state': |
|||
sheet.merge_range('B5:D5', 'Report Type: ' + |
|||
filters.get('report_type'), txt_l) |
|||
sheet.write('A7', 'State', heading) |
|||
sheet.write('B7', 'Product Total Count', heading) |
|||
sheet.write('C7', 'Quantity', heading) |
|||
sheet.write('D7', 'Amount', heading) |
|||
lst = [] |
|||
for rec in report_data_main[0]: |
|||
lst.append(rec) |
|||
row = 6 |
|||
col = 0 |
|||
sheet.set_column(3, 0, 15) |
|||
sheet.set_column(4, 1, 15) |
|||
sheet.set_column(5, 2, 15) |
|||
sheet.set_column(6, 3, 15) |
|||
for rec_data in report_data_main: |
|||
row += 1 |
|||
if rec_data['state'] == 'draft': |
|||
sheet.write(row, col, 'Quotation', txt_l) |
|||
elif rec_data['state'] == 'sent': |
|||
sheet.write(row, col, 'Quotation Sent', txt_l) |
|||
elif rec_data['state'] == 'sale': |
|||
sheet.write(row, col, 'Sale Order', txt_l) |
|||
sheet.write(row, col + 1, rec_data['count'], txt_l) |
|||
sheet.write(row, col + 2, rec_data['qty'], txt_l) |
|||
sheet.write(row, col + 3, rec_data['amount'], txt_l) |
|||
workbook.close() |
|||
output.seek(0) |
|||
response.stream.write(output.read()) |
|||
output.close() |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Anfas Faisal K (odoo@cybrosys.info) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import sale_order_report |
@ -0,0 +1,42 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Anfas Faisal K (odoo@cybrosys.info) |
|||
# |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import api, models |
|||
|
|||
|
|||
class SaleOrderReport(models.AbstractModel): |
|||
"""Model for generating sale order reports. |
|||
Methods: |
|||
_get_report_values: Returns the report data for a sale order report.""" |
|||
|
|||
_name = 'report.sale_report_generator.sale_order_report' |
|||
|
|||
@api.model |
|||
def _get_report_values(self, docids, data=None): |
|||
"""Returns the report data for a sale order report.""" |
|||
if self.env.context.get('sale_order_report'): |
|||
if data.get('report_data'): |
|||
data.update({'report_main_line_data': data.get( |
|||
'report_data')['report_lines'], |
|||
'Filters': data.get('report_data')['filters'], |
|||
'company': self.env.company, |
|||
}) |
|||
return data |
@ -0,0 +1,11 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Report Function--> |
|||
<record id="action_report_sale_all_in_one" model="ir.actions.report"> |
|||
<field name="name">Sales All In One Report</field> |
|||
<field name="model">sales.report</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">sale_report_generator.sale_order_report</field> |
|||
<field name="report_file">sale_report_generator.sale_order_report</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,392 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!--It calls different reports depending on the selected filter in the application's user interface--> |
|||
<template id="sale_order_report"> |
|||
<t t-call="web.html_container"> |
|||
<t t-call="web.internal_layout"> |
|||
<t t-if="Filters.get('report_type')=='Report By Order'"> |
|||
<t t-call="sale_report_generator.report_order"/> |
|||
</t> |
|||
<t t-if="Filters.get('report_type')=='Report By Order Detail'"> |
|||
<t t-call="sale_report_generator.report_order_detail"/> |
|||
</t> |
|||
<t t-if="Filters.get('report_type')=='Report By Product'"> |
|||
<t t-call="sale_report_generator.report_product"/> |
|||
</t> |
|||
<t t-if="Filters.get('report_type')=='Report By Categories'"> |
|||
<t t-call="sale_report_generator.report_category"/> |
|||
</t> |
|||
<t t-if="Filters.get('report_type')=='Report By Sales Person'"> |
|||
<t t-call="sale_report_generator.report_salesman"/> |
|||
</t> |
|||
<t t-if="Filters.get('report_type')=='Report By State'"> |
|||
<t t-call="sale_report_generator.report_state"/> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
<!-- Pdf Order --> |
|||
<template id="report_order"> |
|||
<div class="page"> |
|||
<div class="oe_structure"/> |
|||
<span t-if="Filters.get('date_from')"> |
|||
<strong>From:</strong> |
|||
<t t-esc="Filters['date_from']"/> |
|||
</span> |
|||
<span t-if="Filters.get('date_to')"> |
|||
<strong>To:</strong> |
|||
<t t-esc="Filters['date_to']"/> |
|||
</span> |
|||
<div> |
|||
<div style="width:100%;"> |
|||
<div style="text-align:centre;" class="row"> |
|||
<div class="col-2"> |
|||
<strong>Report Type:</strong> |
|||
<t t-esc="Filters.get('report_type')"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<br/> |
|||
<table class="table table-sm table-reports"> |
|||
<thead> |
|||
<tr> |
|||
<th colspan="6" class="text-left">Sale</th> |
|||
<th colspan="6" class="text-center">Date Order</th> |
|||
<th colspan="6" class="text-right">Customer</th> |
|||
<th colspan="6" class="text-right">Sales Person</th> |
|||
<th colspan="6" class="text-center">Total Qty</th> |
|||
<th colspan="6" class="text-left">Amount Total</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody class="text-left"> |
|||
<t t-foreach="report_main_line_data" t-as="main"> |
|||
<tr style="font-weight: bold;"> |
|||
<td colspan="6"> |
|||
<span t-esc="main['number']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['date_order']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['customer']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['sales_man']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['sum']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['amount_total']"/> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<br/> |
|||
</div> |
|||
</template> |
|||
<!-- Pdf Order By Detail--> |
|||
<template id="report_order_detail"> |
|||
<div class="page"> |
|||
<div class="oe_structure"/> |
|||
<span t-if="Filters.get('date_from')"> |
|||
<strong>From:</strong> |
|||
<t t-esc="Filters['date_from']"/> |
|||
</span> |
|||
<span t-if="Filters.get('date_to')"> |
|||
<strong>To:</strong> |
|||
<t t-esc="Filters['date_to']"/> |
|||
</span> |
|||
<div> |
|||
<div style="width:100%;"> |
|||
<div style="text-align:centre;" class="row"> |
|||
<div class="col-2"> |
|||
<strong>Report Type:</strong> |
|||
<t t-esc="Filters.get('report_type')"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<br/> |
|||
<table class="table table-sm table-reports"> |
|||
<thead> |
|||
<tr class="text-right"> |
|||
<th colspan="6">Sale</th> |
|||
<th colspan="6">Date Order</th> |
|||
<th colspan="6">Customer</th> |
|||
<th colspan="6">Company</th> |
|||
<th colspan="6">Sales Person</th> |
|||
<th colspan="6">Product Name</th> |
|||
<th colspan="6">Product Code</th> |
|||
<th colspan="6">Quantity</th> |
|||
<th colspan="6">Price Subtotal</th> |
|||
<th colspan="6">Amount Total</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<t t-foreach="report_main_line_data" t-as="main"> |
|||
<tr style="font-weight: bold;"> |
|||
<td colspan="6"> |
|||
<span t-esc="main['number']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['date_order']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['customer']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['company']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['salesman']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['product']['en_US']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['default_code']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['product_uom_qty']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['price_subtotal']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['amount_total']"/> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<br/> |
|||
</div> |
|||
</template> |
|||
<!--Pdf Product--> |
|||
<template id="report_product"> |
|||
<div class="page"> |
|||
<div class="oe_structure"/> |
|||
<span t-if="Filters.get('date_from')"> |
|||
<strong>From:</strong> |
|||
<t t-esc="Filters['date_from']"/> |
|||
</span> |
|||
<span t-if="Filters.get('date_to')"> |
|||
<strong>To:</strong> |
|||
<t t-esc="Filters['date_to']"/> |
|||
</span> |
|||
<div> |
|||
<div style="width:100%;"> |
|||
<div style="text-align:centre;" class="row"> |
|||
<div class="col-2"> |
|||
<strong>Report Type:</strong> |
|||
<t t-esc="Filters.get('report_type')"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<br/> |
|||
<table class="table table-sm table-reports"> |
|||
<thead> |
|||
<tr> |
|||
<th colspan="6" class="text-left">Product</th> |
|||
<th colspan="6" class="text-center">Category</th> |
|||
<th colspan="6" class="text-center">Product Code</th> |
|||
<th colspan="6" class="text-center">Quantity</th> |
|||
<th colspan="6">Amount Total</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<t t-foreach="report_main_line_data" t-as="main"> |
|||
<tr style="font-weight: bold;"> |
|||
<td colspan="6"> |
|||
<span t-esc="main['product']['en_US']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['category']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['default_code']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['product_uom_qty']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['amount_total']"/> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<br/> |
|||
</div> |
|||
</template> |
|||
<!-- Pdf Category--> |
|||
<template id="report_category"> |
|||
<div class="page"> |
|||
<div class="oe_structure"/> |
|||
<span t-if="Filters.get('date_from')"> |
|||
<strong>From:</strong> |
|||
<t t-esc="Filters['date_from']"/> |
|||
</span> |
|||
<span t-if="Filters.get('date_to')"> |
|||
<strong>To:</strong> |
|||
<t t-esc="Filters['date_to']"/> |
|||
</span> |
|||
<div> |
|||
<div style="width:100%;"> |
|||
<div style="text-align:centre;" class="row"> |
|||
<div class="col-2"> |
|||
<strong>Report Type:</strong> |
|||
<t t-esc="Filters.get('report_type')"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<br/> |
|||
<table class="table table-sm table-reports"> |
|||
<thead> |
|||
<tr> |
|||
<th colspan="6">Category</th> |
|||
<th colspan="6">Qty</th> |
|||
<th colspan="6">Amount Total</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<t t-foreach="report_main_line_data" t-as="sale_category"> |
|||
<tr style="font-weight: bold;"> |
|||
<td colspan="6"> |
|||
<span t-esc="sale_category['name']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="sale_category['qty']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="sale_category['amount_total']"/> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<br/> |
|||
</div> |
|||
</template> |
|||
<!--PDF Salesman--> |
|||
<template id="report_salesman"> |
|||
<div class="page"> |
|||
<div class="oe_structure"/> |
|||
<span t-if="Filters.get('date_from')"> |
|||
<strong>From:</strong> |
|||
<t t-esc="Filters['date_from']"/> |
|||
</span> |
|||
<span t-if="Filters.get('date_to')"> |
|||
<strong>To:</strong> |
|||
<t t-esc="Filters['date_to']"/> |
|||
</span> |
|||
<div> |
|||
<div style="width:100%;"> |
|||
<div style="text-align:centre;" class="row"> |
|||
<div class="col-2"> |
|||
<strong>Report Type:</strong> |
|||
<t t-esc="Filters.get('report_type')"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<br/> |
|||
<table class="table table-sm table-reports"> |
|||
<thead> |
|||
<tr> |
|||
<th colspan="6">Sales Person</th> |
|||
<th colspan="6">Total Order</th> |
|||
<th colspan="6">Total Qty</th> |
|||
<th colspan="6">Total Amount</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<t t-foreach="report_main_line_data" t-as="main"> |
|||
<tr style="font-weight: bold;"> |
|||
<td colspan="6"> |
|||
<span t-esc="main['name']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['order']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['qty']"/> |
|||
</td> |
|||
<td colspan="6"> |
|||
<span t-esc="main['amount']"/> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<br/> |
|||
</div> |
|||
</template> |
|||
<!--PDF By State--> |
|||
<template id="report_state"> |
|||
<div class="page"> |
|||
<div class="oe_structure"/> |
|||
<span t-if="Filters.get('date_from')"> |
|||
<strong>From:</strong> |
|||
<t t-esc="Filters['date_from']"/> |
|||
</span> |
|||
<span t-if="Filters.get('date_to')"> |
|||
<strong>To:</strong> |
|||
<t t-esc="Filters['date_to']"/> |
|||
</span> |
|||
<div> |
|||
<div style="width:100%;"> |
|||
<div style="text-align:centre;" class="row"> |
|||
<div class="col-2"> |
|||
<strong>Report Type:</strong> |
|||
<t t-esc="Filters.get('report_type')"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<br/> |
|||
<table class="table table-sm table-reports"> |
|||
<thead> |
|||
<tr class="text-left"> |
|||
<th colspan="6">State</th> |
|||
<th colspan="6">Product Total Count</th> |
|||
<th colspan="6">Quantity</th> |
|||
<th colspan="6">Amount</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<t t-foreach="report_main_line_data" t-as="main"> |
|||
<tr style="font-weight: bold;"> |
|||
<td colspan="6"> |
|||
<t t-if="main['state'] == 'draft'"> |
|||
<span>Quotation</span> |
|||
</t> |
|||
<t t-if="main['state'] == 'sent'"> |
|||
<span>Quotation Sent</span> |
|||
</t> |
|||
<t t-if="main['state'] == 'sale'"> |
|||
<span>Sale Order</span> |
|||
</t> |
|||
</td> |
|||
<td colspan="6" class="text-left"> |
|||
<span t-esc="main['count']"/> |
|||
</td> |
|||
<td colspan="6" class="text-left"> |
|||
<span t-esc="main['qty']"/> |
|||
</td> |
|||
<td colspan="6" class="text-left"> |
|||
<span t-esc="main['amount']"/> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
<br/> |
|||
</div> |
|||
</template> |
|||
</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: 16 KiB |
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 227 KiB |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 134 KiB |
After Width: | Height: | Size: 177 KiB |
After Width: | Height: | Size: 114 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 273 KiB |
After Width: | Height: | Size: 101 KiB |
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,657 @@ |
|||
<div style="background-color: #714B67; min-height: 600px; width: 100%; padding: 15px; position: relative;"> |
|||
<!-- TITLE BAR --> |
|||
<div 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: #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>Odoo.sh |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF TITLE BAR --> |
|||
<div> |
|||
<!-- APP HERO --> |
|||
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;"> |
|||
Sales All In One Report Generator</h1> |
|||
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;"> |
|||
All In One Dynamic Report For Sales</p> |
|||
<!-- END OF APP HERO --> |
|||
<img src="assets/screenshots/v16-hero.gif" |
|||
style="width: 75%; height: auto; position: absolute; margin-left: auto; margin-right: auto; top: 45%; left: 12%; right: auto;"/> |
|||
</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="#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 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;">View |
|||
screenshots 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"> |
|||
This application serves as a valuable tool for generating diverse sales reports, facilitating in-depth analysis. It presents a comprehensive overview of a company's sales performance across various dimensions, including order summaries, order details, salesperson-specific data, and more. Additionally, users have the option to apply date range filters to extract specific insights from the data. |
|||
</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;">Generates Report for a specific date range. |
|||
</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" |
|||
style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2"/> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Filtering based on different aspects |
|||
</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" |
|||
style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2"/> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Print Reports in both PDF and XLSX format. |
|||
</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- END OF FEATURES SECTION --> |
|||
|
|||
<!-- SCREENSHOTS SECTION --> |
|||
<div class="row" id="screenshots"> |
|||
<div class="col-md-12" |
|||
style="border-bottom: 1px solid #d5d5d5 !important; margin: 2rem 0 !important"> |
|||
<h2 |
|||
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.5rem !important;"> |
|||
<i class="fa fa-image mr-2"></i>Screenshots |
|||
</h2> |
|||
</div> |
|||
<div class="col-lg-12 my-2"> |
|||
<h4 class="mt-2" |
|||
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
|||
All In One Sales Report Menu</h4> |
|||
<img src="assets/screenshots/enter/1.png" |
|||
class="img-responsive img-thumbnail border" width="100%" |
|||
height="auto"/> |
|||
</div> |
|||
|
|||
<div class="col-lg-12 my-3"> |
|||
<h4 class="mt-3" |
|||
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
|||
Sales Report Based On Orders</h4> |
|||
|
|||
<img src="assets/screenshots/enter/2.png" |
|||
class="img-responsive img-thumbnail border" width="100%" |
|||
height="auto"/> |
|||
</div> |
|||
<div class="col-lg-12 my-3"> |
|||
<h4 class="mt-3" |
|||
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
|||
Sales Report Based On Order Details</h4> |
|||
<img src="assets/screenshots/enter/3.png" |
|||
class="img-responsive img-thumbnail border" width="100%" |
|||
height="auto"/> |
|||
</div> |
|||
|
|||
<div class="col-lg-12 my-3"> |
|||
<h4 class="mt-3" |
|||
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
|||
Sale Report Based On Product</h4> |
|||
<img src="assets/screenshots/enter/4.png" |
|||
class="img-responsive img-thumbnail border" width="100%" |
|||
height="auto"/> |
|||
</div> |
|||
|
|||
<div class="col-lg-12 my-3"> |
|||
<h4 class="mt-3" |
|||
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
|||
Sales Report Based On Categories</h4> |
|||
<img src="assets/screenshots/enter/5.png" |
|||
class="img-responsive img-thumbnail border" width="100%" |
|||
height="auto"/> |
|||
</div> |
|||
<div class="col-lg-12 my-3"> |
|||
<h4 class="mt-3" |
|||
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
|||
Sales Report Based On Sales Person</h4> |
|||
<img src="assets/screenshots/enter/6.png" |
|||
class="img-responsive img-thumbnail border" width="100%" |
|||
height="auto"/> |
|||
</div> |
|||
|
|||
<div class="col-lg-12 my-3"> |
|||
<h4 class="mt-3" |
|||
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;"> |
|||
Sales Report Based On State</h4> |
|||
<img src="assets/screenshots/enter/7.png" |
|||
class="img-responsive img-thumbnail border" width="100%" |
|||
height="auto"/> |
|||
</div> |
|||
<!-- END OF SCREENSHOTS SECTION --> |
|||
|
|||
<!-- RELATED PRODUCTS --> |
|||
<!-- SUGGESTED PRODUCTS --> |
|||
<div class="row"> |
|||
<div class="col-lg-12 d-flex flex-column justify-content-center" |
|||
style="text-align: center; padding: 2.5rem 1rem !important;"> |
|||
<h2 style="color: #212529 !important;">Suggested Products</h2> |
|||
<hr |
|||
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;"/> |
|||
|
|||
<div id="demo1" class="row carousel slide" data-ride="carousel"> |
|||
<!-- The slideshow --> |
|||
<div class="carousel-inner"> |
|||
<div class="carousel-item active" style="min-height:0px"> |
|||
<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/website_product_attachments/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-top-left-radius:10px; border-top-right-radius:10px" |
|||
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/call_for_price_website/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-top-left-radius:10px; border-top-right-radius:10px" |
|||
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/website_cart_clear/#" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-top-left-radius:10px; border-top-right-radius:10px" |
|||
src="./assets/modules/3.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="carousel-item" style="min-height:0px"> |
|||
<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_visibility_website/#" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-top-left-radius:10px; border-top-right-radius:10px" |
|||
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/insta_feed_snippet/#" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-top-left-radius:10px; border-top-right-radius:10px" |
|||
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/website_return_management/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-top-left-radius:10px; border-top-right-radius:10px" |
|||
src="./assets/modules/6.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- Left and right controls --> |
|||
<a class="carousel-control-prev" href="#demo1" data-slide="prev" |
|||
style="left:-25px;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="right:-25px;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 --> |
|||
</div> |
@ -0,0 +1,241 @@ |
|||
.time_range_sale { |
|||
width: 125px; |
|||
border: 2px solid #ccc; |
|||
border-radius: 5px; |
|||
padding: 10px; |
|||
} |
|||
.apply_sale{ |
|||
padding: 0px; |
|||
|
|||
} |
|||
|
|||
a.dropdown-toggle.report-type { |
|||
margin: 10px; |
|||
} |
|||
.search-Result-Selection { |
|||
border: 2px solid #ccc; |
|||
margin-right: 30px; |
|||
margin-left: 10px; |
|||
border-radius: 10px; |
|||
} |
|||
.table_sale_head { |
|||
background-color: #7c7bad; |
|||
color: #fff; |
|||
padding: 20px; |
|||
margin: 20px; |
|||
height: 57px; |
|||
width: 100%; |
|||
border: 1px solid #000; |
|||
} |
|||
element.style { |
|||
top: 0px; |
|||
height: 42px; |
|||
color: white; |
|||
background-color: #7c7bad; |
|||
border-color: #7c7bad; |
|||
width: 100px; |
|||
} |
|||
tr.so-line { |
|||
height: 48px; |
|||
} |
|||
tr.table_sale_head th { |
|||
font-size: 18px; |
|||
text-align: center; |
|||
} |
|||
ul.dropdown-menu.show li { |
|||
margin-left: 10px; |
|||
} |
|||
|
|||
ul.dropdown-menu.show a{ |
|||
color: #221c1c; |
|||
} |
|||
.table_view_sr { |
|||
overflow-y: overlay; |
|||
position: relative; |
|||
height: 800px; |
|||
max-width: 100%; |
|||
|
|||
} |
|||
.search-Result-Selection .btn{ |
|||
padding: 10px; |
|||
} |
|||
|
|||
|
|||
.time_range_pr { |
|||
width: 125px; |
|||
border: 2px solid #ccc; |
|||
border-radius: 5px; |
|||
padding: 20px; |
|||
|
|||
} |
|||
|
|||
.apply_sale { |
|||
margin-right: 5px; |
|||
padding: 4px; |
|||
} |
|||
|
|||
#apply_filter { |
|||
margin-right: 25px; |
|||
} |
|||
|
|||
#pdf, #xlsx, #apply_filter { |
|||
color: white; |
|||
background-color: #7c7bad; |
|||
border-color: #7c7bad; |
|||
} |
|||
|
|||
a.dropdown-toggle.report-type { |
|||
margin: 10px; |
|||
} |
|||
|
|||
.search-Result-Selection { |
|||
border: 2px solid #ccc; |
|||
max-width: 360px; |
|||
min-width: 250px; |
|||
margin-right: 10px; |
|||
margin-left: 10px; |
|||
border-radius: 5px; |
|||
min-height: 40px; |
|||
} |
|||
.search-Result-Selection:hover{ |
|||
border:2px solid #eaeaea; |
|||
|
|||
} |
|||
.dropdown-togglereport-type{ |
|||
min-height: 40px; |
|||
padding-top: 10px; |
|||
} |
|||
|
|||
|
|||
.low_case, #report_res { |
|||
text-transform: capitalize; |
|||
text-align: center; |
|||
|
|||
} |
|||
|
|||
#report_res{ |
|||
padding-right: 3px; |
|||
|
|||
} |
|||
|
|||
|
|||
.print-btns { |
|||
margin-bottom: 30px; |
|||
} |
|||
|
|||
.table_pr_head { |
|||
background-color: #7c7bad; |
|||
color: #fff; |
|||
padding: 20px; |
|||
margin: 20px; |
|||
height: 57px; |
|||
width: 100%; |
|||
border: 1px solid #000; |
|||
} |
|||
|
|||
tr.pr-line { |
|||
height: 48px; |
|||
} |
|||
|
|||
tr.table_pr_head th { |
|||
font-size: 18px; |
|||
text-align: center; |
|||
} |
|||
|
|||
.table_view_pr { |
|||
overflow-y: scroll; |
|||
position: relative; |
|||
height: 500px; |
|||
max-width: 100%; |
|||
|
|||
} |
|||
.my_custom_dropdown{ |
|||
min-width:200px; |
|||
height:150px; |
|||
padding: 20px; |
|||
} |
|||
.my_custom_dropdown input{ |
|||
height:25px; |
|||
|
|||
} |
|||
.report_type{ |
|||
min-height: 100px; |
|||
min-width: 150px; |
|||
padding: 30px 10px 10px; |
|||
} |
|||
|
|||
|
|||
.sub_container_right, .print-btns { |
|||
|
|||
display: flex; |
|||
justify-content: space-around; |
|||
align-items: center; |
|||
|
|||
} |
|||
|
|||
@media screen and (max-width: 768px) { |
|||
.sub_container_right, .print-btns { |
|||
flex-flow: column; |
|||
align-items: center; |
|||
|
|||
} |
|||
|
|||
.sub_container_left { |
|||
order: 2; |
|||
margin: 0; |
|||
} |
|||
|
|||
.sub_container_right { |
|||
flex-flow: row; |
|||
margin-bottom: 10px; |
|||
flex-wrap: wrap !important; |
|||
width: 100%; |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
@media screen and (max-width: 576px) { |
|||
|
|||
|
|||
.apply_filter { |
|||
width: 100%; |
|||
position: relative; |
|||
|
|||
} |
|||
|
|||
#apply_filter { |
|||
position: absolute; |
|||
margin: 30px 0 0; |
|||
top: 50%; |
|||
left: 50%; |
|||
-ms-transform: translate(-50%, -50%); |
|||
transform: translate(-50%, -50%); |
|||
} |
|||
|
|||
#date_chose { |
|||
margin-bottom: 15px; |
|||
} |
|||
|
|||
.search-Result-Selection { |
|||
text-align: center; |
|||
} |
|||
|
|||
.sub_container_left { |
|||
order: 2; |
|||
display: flex; |
|||
margin-top: 50px; |
|||
width: 100%; |
|||
justify-content: center; |
|||
align-items: center; |
|||
flex-wrap: wrap !important; |
|||
|
|||
} |
|||
|
|||
.sub_container_right { |
|||
flex-direction: column; |
|||
} |
|||
} |
@ -0,0 +1,214 @@ |
|||
/** @odoo-module **/ |
|||
import AbstractAction from "web.AbstractAction"; |
|||
import core from 'web.core'; |
|||
import rpc from 'web.rpc'; |
|||
const QWeb = core.qweb; |
|||
import { _t } from "web.core"; |
|||
var datepicker = require('web.datepicker'); |
|||
import time from "web.time"; |
|||
import framework from 'web.framework'; |
|||
import session from 'web.session'; |
|||
|
|||
const SaleReport = AbstractAction.extend({ |
|||
template: 'SaleReport', |
|||
events: { |
|||
'click #apply_filter': 'apply_filter', |
|||
'click #pdf': 'print_pdf', |
|||
'click #xlsx': 'print_xlsx', |
|||
'click .view_sale_order': 'button_view_order', |
|||
'mousedown div.input-group.date[data-target-input="nearest"]': '_onCalendarIconClick', |
|||
}, |
|||
|
|||
init: function(parent, action) { |
|||
this._super(parent, action); |
|||
this.report_lines = action.report_lines; |
|||
this.wizard_id = action.context.wizard | null; |
|||
}, |
|||
start: function() { |
|||
var self = this; |
|||
self.initial_render = true; |
|||
|
|||
rpc.query({ |
|||
model: 'sales.report', |
|||
method: 'create', |
|||
args: [{ |
|||
}] |
|||
}).then(function(res) { |
|||
self.wizard_id = res; |
|||
self.load_data(self.initial_render); |
|||
self.apply_filter(); |
|||
}) |
|||
}, |
|||
//Calendar Icon onclick to get Calendar
|
|||
_onCalendarIconClick: function(ev) { |
|||
var $calendarInputGroup = $(ev.currentTarget); |
|||
var calendarOptions = { |
|||
minDate: moment({ |
|||
y: 1000 |
|||
}), |
|||
maxDate: moment().add(200, 'y'), |
|||
calendarWeeks: true, |
|||
defaultDate: moment().format(), |
|||
sideBySide: true, |
|||
buttons: { |
|||
showClear: true, |
|||
showClose: true, |
|||
showToday: true, |
|||
}, |
|||
icons: { |
|||
date: 'fa fa-calendar', |
|||
}, |
|||
locale: moment.locale(), |
|||
format: time.getLangDateFormat(), |
|||
widgetParent: 'body', |
|||
allowInputToggle: true, |
|||
}; |
|||
$calendarInputGroup.datetimepicker(calendarOptions); |
|||
}, |
|||
|
|||
//This function call an rpc call to the model sales.report & function sale_report with args wizard_id
|
|||
load_data: function(initial_render = true) { |
|||
var self = this; |
|||
self._rpc({ |
|||
model: 'sales.report', |
|||
method: 'sale_report', |
|||
args: [ |
|||
[this.wizard_id] |
|||
], |
|||
}).then(function(datas) { |
|||
if (initial_render) { |
|||
self.$('.filter_view_sr').html(QWeb.render('saleFilterView', { |
|||
filter_data: datas['filters'], |
|||
})); |
|||
self.$el.find('.report_type').select2({ |
|||
placeholder: ' Report Type...', |
|||
}); |
|||
} |
|||
|
|||
if (datas['orders']) |
|||
self.$('.table_view_sr').html(QWeb.render('SaleOrderTable', { |
|||
filter: datas['filters'], |
|||
order: datas['orders'], |
|||
report_lines: datas['report_lines'], |
|||
main_lines: datas['report_main_line'] |
|||
})); |
|||
}) |
|||
}, |
|||
//PDF PRINT
|
|||
print_pdf: function(e) { |
|||
e.preventDefault(); |
|||
var self = this; |
|||
var action_title = self._title; |
|||
self._rpc({ |
|||
model: 'sales.report', |
|||
method: 'sale_report', |
|||
args: [ |
|||
[self.wizard_id] |
|||
], |
|||
}).then(function(data) { |
|||
var action = { |
|||
'type': 'ir.actions.report', |
|||
'report_type': 'qweb-pdf', |
|||
'report_name': 'sale_report_generator.sale_order_report', |
|||
'report_file': 'sale_report_generator.sale_order_report', |
|||
'data': { |
|||
'report_data': data |
|||
}, |
|||
'context': { |
|||
'active_model': 'sales.report', |
|||
'landscape': 1, |
|||
'sale_order_report': true |
|||
}, |
|||
'display_name': 'Sale Order', |
|||
}; |
|||
return self.do_action(action); |
|||
}); |
|||
}, |
|||
//Print XLSX
|
|||
print_xlsx: function() { |
|||
var self = this; |
|||
self._rpc({ |
|||
model: 'sales.report', |
|||
method: 'sale_report', |
|||
args: [ |
|||
[self.wizard_id] |
|||
], |
|||
}).then(function(data) { |
|||
var action = { |
|||
'data': { |
|||
'model': 'sales.report', |
|||
'options': JSON.stringify(data['orders']), |
|||
'output_format': 'xlsx', |
|||
'report_data': JSON.stringify(data['report_lines']), |
|||
'report_name': 'Sale Report', |
|||
'dfr_data': JSON.stringify(data), |
|||
}, |
|||
}; |
|||
self.downloadXlsx(action); |
|||
}); |
|||
}, |
|||
//Download XLSX
|
|||
downloadXlsx: function (action){ |
|||
framework.blockUI(); |
|||
session.get_file({ |
|||
url: '/sale_dynamic_xlsx_reports', |
|||
data: action.data, |
|||
complete: framework.unblockUI, |
|||
error: (error) => this.call('crash_manager', 'rpc_error', error), |
|||
}); |
|||
}, |
|||
//Corresponding SaleOrder Tree,Form View
|
|||
button_view_order: function(event) { |
|||
event.preventDefault(); |
|||
var self = this; |
|||
var context = {}; |
|||
this.do_action({ |
|||
name: _t("Sale Order"), |
|||
type: 'ir.actions.act_window', |
|||
res_model: 'sale.order', |
|||
view_type: 'form', |
|||
domain: [ |
|||
['id', '=', $(event.target).closest('.view_sale_order').attr('id')] |
|||
], |
|||
views: [ |
|||
[false, 'list'], |
|||
[false, 'form'] |
|||
], |
|||
target: 'current' |
|||
}); |
|||
}, |
|||
//Filter Function
|
|||
apply_filter: function() { |
|||
var self = this; |
|||
self.initial_render = false; |
|||
var filter_data_selected = {}; |
|||
|
|||
if (this.$el.find('.datetimepicker-input[name="date_from"]').val()) { |
|||
filter_data_selected.date_from = moment(this.$el.find('.datetimepicker-input[name="date_from"]').val(), time.getLangDateFormat()).locale('en').format('YYYY-MM-DD'); |
|||
} |
|||
if (this.$el.find('.datetimepicker-input[name="date_to"]').val()) { |
|||
filter_data_selected.date_to = moment(this.$el.find('.datetimepicker-input[name="date_to"]').val(), time.getLangDateFormat()).locale('en').format('YYYY-MM-DD'); |
|||
} |
|||
if ($(".report_type").length) { |
|||
var report_res = document.getElementById("report_res") |
|||
filter_data_selected.report_type = $(".report_type")[1].value |
|||
report_res.value = $(".report_type")[1].value |
|||
report_res.innerHTML = report_res.value; |
|||
if ($(".report_type")[1].value == "") { |
|||
report_res.innerHTML = "report_by_order"; |
|||
} |
|||
} |
|||
rpc.query({ |
|||
model: 'sales.report', |
|||
method: 'write', |
|||
args: [ |
|||
self.wizard_id, filter_data_selected |
|||
], |
|||
}).then(function(res) { |
|||
self.initial_render = false; |
|||
self.load_data(self.initial_render); |
|||
}); |
|||
}, |
|||
}); |
|||
core.action_registry.add("s_r", SaleReport); |
|||
return SaleReport; |
@ -0,0 +1,512 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<templates> |
|||
<t t-name="SaleReport"> |
|||
<div class="SalesReportMaker"> |
|||
<div> |
|||
<center> |
|||
<h1 style="margin: 20px;">Sales Dynamic Report</h1> |
|||
</center> |
|||
</div> |
|||
<div> |
|||
<div class="filter_view_sr"/> |
|||
</div> |
|||
<div> |
|||
<div class="table_view_sr" style="width: 95%; margin: auto;"/> |
|||
</div> |
|||
</div> |
|||
</t> |
|||
<!--Print,Xlsx,Date,Filter,Apply Button--> |
|||
<t t-name="saleFilterView"> |
|||
<div style="display: flex; margin-right: 10px; margin-left: 10px;justify-content:space-between"> |
|||
<div class="sub_container_left" |
|||
style="width: 285px; margin-left: 36px;"> |
|||
<div class="row report_print"> |
|||
<button type="button" class="btn btn-primary" id="pdf" |
|||
style="top: 0px; height: 42px; color: white; background-color: #7c7bad; border-color: #7c7bad; width: 127px; margin-right:4px;"> |
|||
Print (PDF) |
|||
</button> |
|||
<button type="button" class="btn btn-primary" id="xlsx" |
|||
style="top: 0px; height: 42px; color: white; background-color: #7c7bad; border-color: #7c7bad; width: 127px;"> |
|||
Export (XLSX) |
|||
</button> |
|||
</div> |
|||
</div> |
|||
<br/> |
|||
<div class="print-btns"> |
|||
<div class="dropdown"> |
|||
<button class="btn btn-secondary dropdown-toggle time_range_pr" |
|||
type="button" id="date_chose" |
|||
data-bs-toggle="dropdown" aria-expanded="false" |
|||
style="height:33px;width:150px;align-items:center;display:flex;"> |
|||
<span class="fa fa-calendar" title="Dates" role="img" |
|||
aria-label="Dates" |
|||
style="display:block;margin-right:5px;"/> |
|||
Date Range |
|||
</button> |
|||
<div class="dropdown-menu" role="menu" |
|||
aria-labelledby="date_chose"> |
|||
<div class="form-group" |
|||
style="margin-left:10px; margin-right:10px;"> |
|||
<label class="" for="date_from">Start Date : |
|||
</label> |
|||
<div class="input-group date" id="date_from" |
|||
data-target-input="nearest"> |
|||
<input type="text" name="date_from" |
|||
class="form-control datetimepicker-input" |
|||
data-target="#date_from" |
|||
t-att-name="prefix"/> |
|||
<div class="input-group-append" |
|||
data-target="#date_from" |
|||
data-toggle="datetimepicker"> |
|||
<span class="input-group-text" |
|||
style="justify-content:center;padding-bottom: 10px;padding-top: 5px;"> |
|||
<span class="fa fa-calendar" role="img" |
|||
aria-label="Calendar"/> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
<label class="" for="date_to">End Date :</label> |
|||
<div class="input-group date" id="date_to" |
|||
data-target-input="nearest"> |
|||
<input type="text" name="date_to" |
|||
class="form-control datetimepicker-input" |
|||
data-target="#date_to" |
|||
t-att-name="prefix"/> |
|||
<div class="input-group-append" |
|||
data-target="#date_to" |
|||
data-toggle="datetimepicker"> |
|||
<span class="input-group-text" |
|||
style="justify-content:center;padding-bottom: 10px;padding-top: 5px;"> |
|||
<span class="fa fa-calendar" role="img" |
|||
aria-label="Calendar"/> |
|||
</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="sub_container_right"> |
|||
<div class="search-Result-Selection"> |
|||
<div class="dropdown"> |
|||
<a class="btn btn-secondary dropdown-togglereport-type" |
|||
href="#" role="button" id="dropdownMenuLink" |
|||
data-bs-toggle="dropdown" |
|||
aria-expanded="false"> |
|||
<span class="fa fa-book"/> |
|||
<span class="low_case dropdown-toggle"> |
|||
Report |
|||
Type : |
|||
</span> |
|||
</a> |
|||
<select id="selection" |
|||
class="dropdown-menu report_type" |
|||
aria-labelledby="dropdownMenuLink" |
|||
name="states[]"> |
|||
<div role="separator" |
|||
class="dropdown-divider"/> |
|||
<option value="report_by_order" |
|||
selected=""> |
|||
Report By Order |
|||
</option> |
|||
<option value="report_by_order_detail"> |
|||
Report |
|||
By Order Detail |
|||
</option> |
|||
<option value="report_by_product">Report By |
|||
Product |
|||
</option> |
|||
<option value="report_by_categories">Report |
|||
By |
|||
Categories |
|||
</option> |
|||
<option value="report_by_salesperson"> |
|||
Report By Sales Person |
|||
</option> |
|||
<option value="report_by_state">Report By |
|||
State |
|||
</option> |
|||
</select> |
|||
<span id="report_res"/> |
|||
</div> |
|||
</div> |
|||
<div class="apply_filter"> |
|||
<button type="button" id="apply_filter" |
|||
class="btn btn-primary"> |
|||
Apply |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</t> |
|||
<!--Report By Order --> |
|||
<t t-name="SaleOrderTable"> |
|||
<div t-if="order.report_type == 'report_by_order'"> |
|||
<div class="table_main_view"> |
|||
<table cellspacing="0" width="100%"> |
|||
<thead> |
|||
<tr class="table_sale_head"> |
|||
<th>Sale</th> |
|||
<th class="mon_fld">Date Order</th> |
|||
<th class="mon_fld">Customer</th> |
|||
<th class="mon_fld">Sales Person</th> |
|||
<th class="mon_fld">Total Qty</th> |
|||
<th class="mon_fld">Amount Total</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<t t-foreach="report_lines" t-as="sale_report"> |
|||
<tr style="border: 1.5px solid black;" |
|||
class="so-line" |
|||
t-att-data-account-id="sale_report['id']" |
|||
t-attf-data-target=".a{{sale_report['id']}}"> |
|||
<td> |
|||
<t t-if="sale_report['id']"> |
|||
<div class="dropdown dropdown-toggle"> |
|||
<a data-toggle="dropdown" href="#" |
|||
id="table_toggle_btn" |
|||
data-bs-toggle="dropdown" |
|||
aria-expanded="false"> |
|||
<span class="caret"/> |
|||
<span> |
|||
<t t-esc="sale_report['number']"/> |
|||
</span> |
|||
</a> |
|||
<ul class="dropdown-menu" |
|||
role="menu" |
|||
aria-labelledby="dropdownMenu"> |
|||
<li> |
|||
<a class="view_sale_order" |
|||
tabindex="-1" href="#" |
|||
t-att-id="sale_report['id']"> |
|||
View Sale Order |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</t> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['date_order']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['customer']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['sales_man']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['sum']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['amount_total']"/> |
|||
</span> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
<!-- Report for order detail--> |
|||
<div t-if="order.report_type == 'report_by_order_detail'"> |
|||
<div class="table_main_view"> |
|||
<table cellspacing="0" width="100%"> |
|||
<thead> |
|||
<tr class="table_sale_head"> |
|||
<th>Sale</th> |
|||
<th class="mon_fld">Date Order</th> |
|||
<th class="mon_fld">Customer</th> |
|||
<th class="mon_fld">Company</th> |
|||
<th class="mon_fld">Sales Person</th> |
|||
<th class="mon_fld">Product Name</th> |
|||
<th class="mon_fld">Product Code</th> |
|||
<th class="mon_fld">Quantity</th> |
|||
<th class="mon_fld">Price Subtotal</th> |
|||
<th class="mon_fld">Amount Total</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<t t-foreach="report_lines" t-as="sale_report"> |
|||
<tr style="border: 1.5px solid black;" |
|||
class="so-line" |
|||
data-toggle="collapse" |
|||
t-att-data-account-id="sale_report['id']" |
|||
t-attf-data-target=".a{{sale_report['id']}}"> |
|||
<td style="border: 0px solid black;"> |
|||
<i class="fa fa-caret-down" role="img" |
|||
aria-label="Unfolded" title="Unfolded"/> |
|||
<span> |
|||
<t t-esc="sale_report['number']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['date_order']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['customer']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['company']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['salesman']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['product']['en_US']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['default_code']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['product_uom_qty']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['price_subtotal']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['amount_total']"/> |
|||
</span> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
<!--Report for product--> |
|||
<div t-if="order.report_type == 'report_by_product'"> |
|||
<div class="table_main_view"> |
|||
<table cellspacing="0" width="100%"> |
|||
<thead> |
|||
<tr class="table_sale_head"> |
|||
<th>Product</th> |
|||
<th class="mon_fld">Sale Order No</th> |
|||
<th class="mon_fld">Category</th> |
|||
<th class="mon_fld">Product Code</th> |
|||
<th class="mon_fld">Quantity</th> |
|||
<th class="mon_fld">Amount Total</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<t t-foreach="report_lines" t-as="sale_report"> |
|||
<tr style="border: 1.5px solid black;" |
|||
class="so-line" |
|||
data-toggle="collapse" |
|||
t-att-data-account-id="sale_report['id']" |
|||
t-attf-data-target=".a{{sale_report['id']}}"> |
|||
<td style="border: 0px solid black;"> |
|||
<i class="fa fa-caret-down" role="img" |
|||
aria-label="Unfolded" title="Unfolded"/> |
|||
<span> |
|||
<t t-esc="sale_report['product']['en_US']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['number']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['category']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['default_code']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['product_uom_qty']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['amount_total']"/> |
|||
</span> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
<!--Report for Categories--> |
|||
<div t-if="order.report_type == 'report_by_categories'"> |
|||
<div class="table_main_view"> |
|||
<table cellspacing="0" width="100%"> |
|||
<thead> |
|||
<tr class="table_sale_head"> |
|||
<th>Category</th> |
|||
<th class="mon_fld">Qty</th> |
|||
<th class="mon_fld">Amount Total</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<t t-foreach="report_lines" t-as="sale_report"> |
|||
<tr style="border: 1.5px solid black;" |
|||
class="so-line" |
|||
data-toggle="collapse" |
|||
t-att-data-account-id="sale_report['id']" |
|||
t-attf-data-target=".a{{sale_report['id']}}"> |
|||
<td style="border: 0px solid black;"> |
|||
<i class="fa fa-caret-down" role="img" |
|||
aria-label="Unfolded" title="Unfolded"/> |
|||
<span> |
|||
<t t-esc="sale_report['name']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['qty']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['amount_total']"/> |
|||
</span> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
<!--Report for Sales Person--> |
|||
<div t-if="order.report_type == 'report_by_salesperson'"> |
|||
<div class="table_main_view"> |
|||
<table cellspacing="0" width="100%"> |
|||
<thead> |
|||
<tr class="table_sale_head"> |
|||
<th>Sales Person</th> |
|||
<th class="mon_fld">Total Order</th> |
|||
<th class="mon_fld">Total Qty</th> |
|||
<th class="mon_fld">Total Amount</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<t t-foreach="report_lines" t-as="sale_report"> |
|||
<tr style="border: 1.5px solid black;" |
|||
class="so-line" |
|||
data-toggle="collapse" |
|||
t-att-data-account-id="sale_report['id']" |
|||
t-attf-data-target=".a{{sale_report['id']}}"> |
|||
<td style="border: 0px solid black;"> |
|||
<i class="fa fa-caret-down" role="img" |
|||
aria-label="Unfolded" title="Unfolded"/> |
|||
<span> |
|||
<t t-esc="sale_report['name']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['order']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['qty']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['amount']"/> |
|||
</span> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
<!--Report for State--> |
|||
<div t-if="order.report_type == 'report_by_state'"> |
|||
<div class="table_main_view"> |
|||
<table cellspacing="0" width="100%"> |
|||
<thead> |
|||
<tr class="table_sale_head"> |
|||
<th>State</th> |
|||
<th class="mon_fld">Product Total Count</th> |
|||
<th class="mon_fld">Quantity</th> |
|||
<th class="mon_fld">Amount</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<t t-foreach="report_lines" t-as="sale_report"> |
|||
<tr style="border: 1.5px solid black;" |
|||
class="so-line" |
|||
data-toggle="collapse" |
|||
t-att-data-account-id="sale_report['id']" |
|||
t-attf-data-target=".a{{sale_report['id']}}"> |
|||
<td style="border: 0px solid black;"> |
|||
<i class="fa fa-caret-down" role="img" |
|||
aria-label="Unfolded" title="Unfolded"/> |
|||
<span> |
|||
<t t-if="sale_report['state'] == 'draft'"> |
|||
Quotation |
|||
</t> |
|||
<t t-if="sale_report['state'] == 'sent'"> |
|||
Quotation Sent |
|||
</t> |
|||
<t t-if="sale_report['state'] == 'sale'"> |
|||
Sales Order |
|||
</t> |
|||
<t t-if="sale_report['state'] == 'done'"> |
|||
Locked |
|||
</t> |
|||
<t t-if="sale_report['state'] == 'cancel'"> |
|||
Cancelled |
|||
</t> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['count']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['qty']"/> |
|||
</span> |
|||
</td> |
|||
<td style="text-align:center;"> |
|||
<span> |
|||
<t t-esc="sale_report['amount']"/> |
|||
</span> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</t> |
|||
</templates> |
@ -0,0 +1,13 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<odoo> |
|||
<!-- action that displays a Sales Report--> |
|||
<record id="sale_all_report_action" model="ir.actions.client"> |
|||
<field name="name">Sales Report</field> |
|||
<field name="tag">s_r</field> |
|||
</record> |
|||
<!--Menu Action--> |
|||
<menuitem action="sale_all_report_action" parent="sale.sale_menu_root" |
|||
id="sale_report_sub_menu" |
|||
name="Sales Dynamic Report" |
|||
sequence="41"/> |
|||
</odoo> |