Browse Source

[ADD] Initial Commit 'sale_report_generator'

pull/207/merge
AjmalCybro 3 years ago
parent
commit
a91c0714e4
  1. 42
      sale_report_generator/README.rst
  2. 24
      sale_report_generator/__init__.py
  3. 52
      sale_report_generator/__manifest__.py
  4. 22
      sale_report_generator/controllers/__init__.py
  5. 56
      sale_report_generator/controllers/main.py
  6. 7
      sale_report_generator/doc/RELEASE_NOTES.md
  7. 22
      sale_report_generator/models/__init__.py
  8. 564
      sale_report_generator/models/sale_report.py
  9. 22
      sale_report_generator/report/__init__.py
  10. 37
      sale_report_generator/report/sale_order_report.py
  11. 468
      sale_report_generator/report/sale_order_report.xml
  12. 2
      sale_report_generator/security/ir.model.access.csv
  13. BIN
      sale_report_generator/static/description/assets/icons/check.png
  14. BIN
      sale_report_generator/static/description/assets/icons/chevron.png
  15. BIN
      sale_report_generator/static/description/assets/icons/cogs.png
  16. BIN
      sale_report_generator/static/description/assets/icons/consultation.png
  17. BIN
      sale_report_generator/static/description/assets/icons/ecom-black.png
  18. BIN
      sale_report_generator/static/description/assets/icons/education-black.png
  19. BIN
      sale_report_generator/static/description/assets/icons/hotel-black.png
  20. BIN
      sale_report_generator/static/description/assets/icons/license.png
  21. BIN
      sale_report_generator/static/description/assets/icons/lifebuoy.png
  22. BIN
      sale_report_generator/static/description/assets/icons/logo.png
  23. BIN
      sale_report_generator/static/description/assets/icons/manufacturing-black.png
  24. BIN
      sale_report_generator/static/description/assets/icons/pos-black.png
  25. BIN
      sale_report_generator/static/description/assets/icons/puzzle.png
  26. BIN
      sale_report_generator/static/description/assets/icons/restaurant-black.png
  27. BIN
      sale_report_generator/static/description/assets/icons/service-black.png
  28. BIN
      sale_report_generator/static/description/assets/icons/trading-black.png
  29. BIN
      sale_report_generator/static/description/assets/icons/training.png
  30. BIN
      sale_report_generator/static/description/assets/icons/update.png
  31. BIN
      sale_report_generator/static/description/assets/icons/user.png
  32. BIN
      sale_report_generator/static/description/assets/icons/wrench.png
  33. BIN
      sale_report_generator/static/description/assets/modules/customer_so_history.png
  34. BIN
      sale_report_generator/static/description/assets/modules/individual_product_report.png
  35. BIN
      sale_report_generator/static/description/assets/modules/sale_discount_total.png
  36. BIN
      sale_report_generator/static/description/assets/modules/sale_report_advanced.png
  37. BIN
      sale_report_generator/static/description/assets/modules/sale_report_format_editor.png
  38. BIN
      sale_report_generator/static/description/assets/modules/sales_order_delivery_status.png
  39. BIN
      sale_report_generator/static/description/assets/screenshots/sale.gif
  40. BIN
      sale_report_generator/static/description/assets/screenshots/sale_report1.png
  41. BIN
      sale_report_generator/static/description/assets/screenshots/sale_report2.png
  42. BIN
      sale_report_generator/static/description/assets/screenshots/sale_report3.png
  43. BIN
      sale_report_generator/static/description/assets/screenshots/sale_report4.png
  44. BIN
      sale_report_generator/static/description/assets/screenshots/sale_report5.png
  45. BIN
      sale_report_generator/static/description/assets/screenshots/sale_report6.png
  46. BIN
      sale_report_generator/static/description/assets/screenshots/sale_report7.png
  47. BIN
      sale_report_generator/static/description/banner.png
  48. BIN
      sale_report_generator/static/description/icon.png
  49. 620
      sale_report_generator/static/description/index.html
  50. 56
      sale_report_generator/static/src/css/sale_report.css
  51. 236
      sale_report_generator/static/src/js/sale_report.js
  52. 486
      sale_report_generator/static/src/xml/sale_report_view.xml
  53. 12
      sale_report_generator/views/sale_report.xml

42
sale_report_generator/README.rst

@ -0,0 +1,42 @@
Sale All In One Report Generator
====================================
* Sale All In One Dynamic Report For Odoo 15 community And Enterprise editions
Installation
============
- www.odoo.com/documentation/15.0/setup/install.html
- Install our custom addon
License
-------
General Public License, Version 3 (LGPL v3).
(https://www.odoo.com/documentation/user/13.0/legal/licenses/licenses.html)
Company
-------
* 'Cybrosys Techno Solutions <https://cybrosys.com/>`__
Credits
-------
* Developer:
(v15) Sruthi @ Cybrosys
Contacts
--------
* Mail Contact : odoo@cybrosys.com
Bug Tracker
-----------
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
Maintainer
==========
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>`__

24
sale_report_generator/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import models
from . import report
from . import controllers

52
sale_report_generator/__manifest__.py

@ -0,0 +1,52 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
{
'name': 'Sales All In One Report Generator',
'version': '15.0.1.0.0',
'summary': "Dynamic Sales Report Maker",
'description': "Dynamic Sales Report Maker",
'category': 'Sale',
'author': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': 'https://www.cybrosys.com',
'depends': ['sale_management'],
'data': [
'security/ir.model.access.csv',
'views/sale_report.xml',
'report/sale_order_report.xml'
],
'assets': {
'web.assets_backend': [
'sale_report_generator/static/src/js/sale_report.js',
'sale_report_generator/static/src/css/sale_report.css'
],
'web.assets_qweb': [
'sale_report_generator/static/src/xml/sale_report_view.xml',
],
},
'images': ['static/description/banner.png'],
'license': 'AGPL-3',
'installable': True,
'auto_install': False,
'auto_install': False,
}

22
sale_report_generator/controllers/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import main

56
sale_report_generator/controllers/main.py

@ -0,0 +1,56 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
import json
from odoo import http
from odoo.http import content_disposition, request
from odoo.addons.web.controllers.main import _serialize_exception
from odoo.tools import html_escape
class TBXLSXReportController(http.Controller):
@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, **kw):
uid = request.session.uid
report_obj = request.env[model].with_user(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 = _serialize_exception(e)
error = {
'code': 200,
'message': 'Odoo Server Error',
'data': se
}
return request.make_response(html_escape(json.dumps(error)))

7
sale_report_generator/doc/RELEASE_NOTES.md

@ -0,0 +1,7 @@
## Module <sale_report_generator>
#### 21.06.2022
#### Version 15.0.1.0.0
#### ADD
Initial Commit

22
sale_report_generator/models/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import sale_report

564
sale_report_generator/models/sale_report.py

@ -0,0 +1,564 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import models, fields, api
import io
import json
try:
from odoo.tools.misc import xlsxwriter
except ImportError:
import xlsxwriter
class SaleReportGenerator(models.Model):
_name = "sales.report"
sale_report = fields.Char(string="Sale Report")
date_from = fields.Datetime(string="Date From")
date_to = fields.Datetime(string="Date to")
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')], default='report_by_order')
@api.model
def sale_report(self, option):
orders = self.env['sale.order'].search([])
report_values = self.env['sales.report'].search(
[('id', '=', 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,
})
filters = self.get_filter(option)
report = self._get_report_values(data)
lines = self._get_report_values(data).get('SALE')
main_line = self._get_report_values(data).get('sale_main')
return {
'name': "Sale Orders",
'type': 'ir.actions.client',
'tag': 's_r',
'orders': data,
'filters': filters,
'report_lines': lines,
'report_main_line': main_line,
}
def get_filter(self, option):
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):
r = self.env['sales.report'].search([('id', '=', option[0])])
default_filters = {}
filter_dict = {
'report_type': r.report_type,
}
filter_dict.update(default_filters)
return filter_dict
@api.model
def create(self, vals):
res = super(SaleReportGenerator, self).create(vals)
return res
def write(self, vals):
res = super(SaleReportGenerator, self).write(vals)
return res
def _get_report_sub_lines(self, data, report, date_from, date_to):
report_sub_lines = []
new_filter = None
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):
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):
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):
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'})
sub_heading = workbook.add_format(
{'align': 'center', 'bold': True, 'font_size': '10px',
'border': 1,
'border_color': 'black'})
heading = workbook.add_format(
{'align': 'center', 'bold': True, 'font_size': '10px',
'border': 2,
'border_color': 'black'})
txt = workbook.add_format({'font_size': '10px', 'border': 1})
txt_l = workbook.add_format(
{'font_size': '10px', 'border': 1, 'bold': True})
txt_v = workbook.add_format(
{'align': 'right', 'font_size': '10px', 'border': 1})
sheet.merge_range('A2:H3',
'Sales Report',
head)
date_head = workbook.add_format({'align': 'center', 'bold': True,
'font_size': '10px'})
date_style = workbook.add_format({'align': 'center',
'font_size': '10px'})
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:
one_lst = []
two_lst = []
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:
one_lst = []
two_lst = []
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'], 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:
one_lst = []
two_lst = []
row += 1
sheet.write(row, col, rec_data['product'], 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:
one_lst = []
two_lst = []
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:
one_lst = []
two_lst = []
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', '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:
one_lst = []
two_lst = []
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()

22
sale_report_generator/report/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import sale_order_report

37
sale_report_generator/report/sale_order_report.py

@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from odoo import api, models, _
class SaleOrder(models.AbstractModel):
_name = 'report.sale_report_generator.sale_order_report'
@api.model
def _get_report_values(self, docids, data=None):
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

468
sale_report_generator/report/sale_order_report.xml

@ -0,0 +1,468 @@
<odoo>
<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>
<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></br>
<table class="table table-sm table-reports">
<thead>
<tr >
<th 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></br>
</div>
</template>
<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></br>
<table class="table table-sm table-reports">
<thead>
<tr class="text-right">
<th>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']"/>
</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></br>
</div>
</template>
<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></br>
<table class="table table-sm table-reports">
<thead>
<tr>
<th 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']"/>
</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></br>
</div>
</template>
<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></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></br>
</div>
</template>
<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></br>
<table class="table table-sm table-reports">
<thead>
<tr>
<th>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>
<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></br>
</div>
</template>
<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></br>
<table class="table table-sm table-reports">
<thead>
<tr class="text-left">
<th>State</th>
<th colspan="6">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></br>
</div>
</template>
<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>

2
sale_report_generator/security/ir.model.access.csv

@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_sales_report,access_sales_report,model_sales_report,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_sales_report access_sales_report model_sales_report base.group_user 1 1 1 1

BIN
sale_report_generator/static/description/assets/icons/check.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
sale_report_generator/static/description/assets/icons/chevron.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

BIN
sale_report_generator/static/description/assets/icons/cogs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
sale_report_generator/static/description/assets/icons/consultation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
sale_report_generator/static/description/assets/icons/ecom-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
sale_report_generator/static/description/assets/icons/education-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

BIN
sale_report_generator/static/description/assets/icons/hotel-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

BIN
sale_report_generator/static/description/assets/icons/license.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
sale_report_generator/static/description/assets/icons/lifebuoy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
sale_report_generator/static/description/assets/icons/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
sale_report_generator/static/description/assets/icons/manufacturing-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
sale_report_generator/static/description/assets/icons/pos-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
sale_report_generator/static/description/assets/icons/puzzle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
sale_report_generator/static/description/assets/icons/restaurant-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
sale_report_generator/static/description/assets/icons/service-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
sale_report_generator/static/description/assets/icons/trading-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
sale_report_generator/static/description/assets/icons/training.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
sale_report_generator/static/description/assets/icons/update.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
sale_report_generator/static/description/assets/icons/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
sale_report_generator/static/description/assets/icons/wrench.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
sale_report_generator/static/description/assets/modules/customer_so_history.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
sale_report_generator/static/description/assets/modules/individual_product_report.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
sale_report_generator/static/description/assets/modules/sale_discount_total.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
sale_report_generator/static/description/assets/modules/sale_report_advanced.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
sale_report_generator/static/description/assets/modules/sale_report_format_editor.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
sale_report_generator/static/description/assets/modules/sales_order_delivery_status.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
sale_report_generator/static/description/assets/screenshots/sale.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

BIN
sale_report_generator/static/description/assets/screenshots/sale_report1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

BIN
sale_report_generator/static/description/assets/screenshots/sale_report2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

BIN
sale_report_generator/static/description/assets/screenshots/sale_report3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

BIN
sale_report_generator/static/description/assets/screenshots/sale_report4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

BIN
sale_report_generator/static/description/assets/screenshots/sale_report5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
sale_report_generator/static/description/assets/screenshots/sale_report6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

BIN
sale_report_generator/static/description/assets/screenshots/sale_report7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
sale_report_generator/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

BIN
sale_report_generator/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

620
sale_report_generator/static/description/index.html

@ -0,0 +1,620 @@
<div class="container" style="padding: 1rem !important; margin-bottom: 1rem !important;">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12 d-flex justify-content-between" style="border-bottom: 1px solid #d5d5d5;">
<div class="my-3">
<img src="./assets/icons/logo.png" style="width: auto !important; height: 40px !important;">
</div>
<div class="my-3 d-flex align-items-center">
<div
style="background-color: #7C7BAD !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;">
<i class="fa fa-check mr-1"></i>Community
</div>
<div
style="background-color: #875A7B !important; color: #fff !important; font-weight: 600 !important; padding: 5px 15px 8px !important; margin: 0 5px !important;">
<i class="fa fa-check mr-1"></i>Enterprise
</div>
</div>
</div>
</div>
</div>
<div class="container" style="padding: 0rem 1.5rem 4rem !important">
<div class="row" style="height: 900px !important;">
<div class="col-sm-12 col-md-12 col-lg-12"
style="padding: 4rem 1rem !important; background-color: #714B67 !important; height: 600px !important; border-radius: 20px !important;">
<h1
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #FFFFFF !important; font-size: 3.5rem !important; text-align: center !important;">
Sales All In One Report Generator</h1>
<p
style="font-family: 'Montserrat', sans-serif !important; font-weight: 300 !important; color: #FFFFFF !important; font-size: 1.4rem !important; text-align: center !important;">
Dynamic Sales Report Maker
</p>
<img src="./assets/screenshots/sale.gif" class="img-responsive" width="100%" height="auto" />
</div>
</div>
<div class="row">
<div class="col-md-12" style="border-bottom: 1px solid #d5d5d5 !important; margin-bottom: 2rem !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-compass mr-2"></i>Explore this module
</h2>
</div>
<div class="col-md-6">
<a href="#overview" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Overview</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
Learn more about this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#features" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Features</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
View features of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#screenshots" style="text-decoration: none !important;">
<div class="row"
style="background-color: #f5f2f5 !important; border-radius: 10px !important; margin: 1rem !important; padding: 1.5em !important; height: 100px !important;">
<div class="col-8">
<h3
style="font-family: 'Montserrat', sans-serif !important; font-weight: 600 !important; color: #714B67 !important; font-size: 1.2rem !important;">
Screenshots</h3>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #714B67 !important; font-size: 0.9rem !important;">
See key screenshots of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color: #714B67 !important;"></i>
</div>
</div>
</a>
</div>
</div>
<div class="row" id="overview">
<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-pie-chart mr-2"></i>Overview
</h2>
</div>
<div class="col-mg-12 pl-3">
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important; line-height: 30px !important;">
This app useful to provide different Sales Reports to do analysis. It shows the sales analysis of a company in many aspects such as by order,order details,salesman and so on. It can be filtered out based on different date ranges too.</p>
</div>
</div>
<div class="row" id="features">
<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-star mr-2"></i>Features
</h2>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Community &amp; Enterprise Support</h4>
<p
style="font-family: 'Roboto', sans-serif !important; font-weight: 400 !important; color: #282F33 !important; font-size: 1rem !important;">
Available in Odoo 15.0 Community and Enterprise.</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Generates Report for a specific date range.</h4>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Filtering based on different aspects</h4>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Print Reports in both PDF and XLSX format.</h4>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<img src="assets/icons/check.png">
</div>
<div>
<h4
style="font-family: 'Roboto', sans-serif !important; font-weight: 600 !important; color: #282F33 !important; font-size: 1.3rem !important;">
Drilled on approach</h4>
</div>
</div>
</div>
<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/sale_report1.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/sale_report2.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/sale_report3.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/sale_report4.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/sale_report5.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/sale_report6.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/sale_report7.png" class="img-responsive img-thumbnail border" width="100%" height="auto" />
</div>
</div>
<!-- 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/15.0/sale_report_advanced/" 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/sale_report_advanced.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/14.0/sale_discount_total/" 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/sale_discount_total.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/15.0/sales_order_delivery_status/"
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/sales_order_delivery_status.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/15.0/customer_so_history/" 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/customer_so_history.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/15.0/individual_product_report/" 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/individual_product_report.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/15.0/sale_report_format_editor/" 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/sale_report_format_editor.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 SUGGESTED PRODUCTS -->
<!-- OUR SERVICES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Services</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</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: #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>
</section>
<!-- END OF END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<section class="container" style="margin-top: 6rem !important;">
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Our Industries</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 10px; 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: 10px; 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: 10px; 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: 10px; 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: 10px; 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 &amp; 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: 10px; 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: 10px; 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: 10px; 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>
</section>
<!-- END OF END OF OUR INDUSTRIES -->
<!-- FOOTER -->
<!-- Footer Section -->
<section class="container" style="margin: 5rem auto 2rem;">
<div class="row" style="max-width:1540px;">
<div class="col-lg-12 d-flex flex-column justify-content-center align-items-center">
<h2 style="color: #212529 !important;">Need Help?</h2>
<hr
style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;" />
</div>
</div>
<!-- Contact Cards -->
<div class="row d-flex justify-content-center align-items-center"
style="max-width:1540px; margin: 0 auto 2rem auto;">
<div class="col-lg-12" style="padding: 0rem 3rem 2rem; border-radius: 10px; margin-right: 3rem; ">
<div class="row mt-4">
<div class="col-lg-6">
<a href="mailto:odoo@cybrosys.com" target="_blank" class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #4d4d4d; color: #FFF; border-radius: 4px;"><i
class="fa fa-envelope mr-2"></i>odoo@cybrosys.com</a>
</div>
<div class="col-lg-6">
<a href="https://api.whatsapp.com/send?phone=918606827707" target="_blank"
class="btn btn-block mb-2 deep_hover"
style="text-decoration: none; background-color: #25D366; color: #FFF; border-radius: 4px;"><i
class="fa fa-whatsapp mr-2"></i>WhatsApp</a>
</div>
</div>
</div>
</div>
<!-- End of Contact Cards -->
</section>
<!-- Footer -->
<section class="oe_container" style="padding: 2rem 3rem 1rem;">
<div class="row" style="max-width:1540px; margin: 0 auto; margin-right: 3rem; ">
<!-- Logo -->
<div class="col-lg-12 d-flex justify-content-center align-items-center" style="margin-top: 3rem;">
<img src="https://www.cybrosys.com/images/logo.png" width="200px" height="auto" />
</div>
<!-- End of Logo -->
<div class="col-lg-12">
<hr
style="margin-top: 3rem;background: linear-gradient(90deg, rgba(2,0,36,0) 0%, rgba(229,229,229,1) 33%, rgba(229,229,229,1) 58%, rgba(0,212,255,0) 100%); height: 2px; border-style: none;">
<!-- End of Footer Section -->
</div>
</div>
</section>
<!-- END OF FOOTER -->
</div>

56
sale_report_generator/static/src/css/sale_report.css

@ -0,0 +1,56 @@
.time_range_sale {
width: 125px;
border: 2px solid #ccc;
border-radius: 5px;
padding: 10px;
}
.apply_sale{
}
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 {
height: 40px;
background-color: #eeeeee;
width: 200px;
}
ul.dropdown-menu.show li {
margin-left: 10px;
}
ul.dropdown-menu.show a{
color: #221c1c;
}

236
sale_report_generator/static/src/js/sale_report.js

@ -0,0 +1,236 @@
odoo.define('sale_report_generator.sale_report', function(require) {
'use strict';
var AbstractAction = require('web.AbstractAction');
var core = require('web.core');
var rpc = require('web.rpc');
var QWeb = core.qweb;
var _t = core._t;
var datepicker = require('web.datepicker');
var time = require('web.time');
var framework = require('web.framework');
var session = require('web.session');
var 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();
})
},
_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);
},
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']
}));
})
},
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: 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);
});
},
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),
});
},
//
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'
});
},
//
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;
});

486
sale_report_generator/static/src/xml/sale_report_view.xml

@ -0,0 +1,486 @@
<templates>
<t t-name="SaleReport">
<div class="">
<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>
<t t-name="saleFilterView">
<div class="row" style="margin-right: 10px; margin-left: 10px;">
<div class="sub_container_left"
style="width: 285px; margin-left: 36px;">
<div class="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;">
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></br>
<div class="sub_container_right row"
style=" height: 3%; top: 0px; position: relative; display: flex; margin-bottom: 20px;">
<div class="time_range_sale" style="">
<a type="button" class="dropdown-toggle"
data-toggle="dropdown">
<span class="fa fa-calendar" title="Dates" role="img"
aria-label="Dates"/>
Date Range
</a>
<div class="dropdown-menu" role="menu">
<div class="form-group">
<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">
<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">
<span class="fa fa-calendar" role="img"
aria-label="Calendar"/>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="search-Result-Selection" style="">
<a type="button" class="dropdown-toggle report-type"
data-toggle="dropdown">
<span class="fa fa-book"/>
Report Type:
</a>
<select id="selection" class="dropdown-menu report_type"
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 class="apply_sale" style="margin-left: -25px; margin-top: 0px;">
<button type="button" id="apply_filter"
class="btn btn-primary"
style="top: 0px; height: 42px; color: white; background-color: #7c7bad; border-color: #7c7bad; width: 100px;">
Apply
</button>
</div>
</div>
</div>
</t>
<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="#">
<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']"/>
</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">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']"/>
</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">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-esc="sale_report['state']"/>
</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>

12
sale_report_generator/views/sale_report.xml

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="sale_all_report_action" model="ir.actions.client">
<field name="name">Sales Report</field>
<field name="tag">s_r</field>
</record>
<menuitem action="sale_all_report_action" parent="sale.menu_sale_report"
id="sale_report_sub_menu"
name="Sales Dynamic Report"/>
</odoo>
Loading…
Cancel
Save