Browse Source

Aug 31: [ADD] Initial commit 'sales_product_performance_report'

pull/254/merge
Cybrosys Technologies 8 months ago
parent
commit
bb3ae04c7e
  1. 42
      sales_product_performance_report/README.rst
  2. 23
      sales_product_performance_report/__init__.py
  3. 50
      sales_product_performance_report/__manifest__.py
  4. 7
      sales_product_performance_report/doc/RELEASE_NOTES.md
  5. 24
      sales_product_performance_report/models/__init__.py
  6. 127
      sales_product_performance_report/models/product_template.py
  7. 122
      sales_product_performance_report/models/res_users.py
  8. 54
      sales_product_performance_report/models/sale_order.py
  9. 3
      sales_product_performance_report/security/ir.model.access.csv
  10. BIN
      sales_product_performance_report/static/description/assets/icons/check.png
  11. BIN
      sales_product_performance_report/static/description/assets/icons/chevron.png
  12. BIN
      sales_product_performance_report/static/description/assets/icons/cogs.png
  13. BIN
      sales_product_performance_report/static/description/assets/icons/consultation.png
  14. BIN
      sales_product_performance_report/static/description/assets/icons/ecom-black.png
  15. BIN
      sales_product_performance_report/static/description/assets/icons/education-black.png
  16. BIN
      sales_product_performance_report/static/description/assets/icons/hotel-black.png
  17. BIN
      sales_product_performance_report/static/description/assets/icons/license.png
  18. BIN
      sales_product_performance_report/static/description/assets/icons/lifebuoy.png
  19. BIN
      sales_product_performance_report/static/description/assets/icons/manufacturing-black.png
  20. BIN
      sales_product_performance_report/static/description/assets/icons/pos-black.png
  21. BIN
      sales_product_performance_report/static/description/assets/icons/puzzle.png
  22. BIN
      sales_product_performance_report/static/description/assets/icons/restaurant-black.png
  23. BIN
      sales_product_performance_report/static/description/assets/icons/service-black.png
  24. BIN
      sales_product_performance_report/static/description/assets/icons/trading-black.png
  25. BIN
      sales_product_performance_report/static/description/assets/icons/training.png
  26. BIN
      sales_product_performance_report/static/description/assets/icons/update.png
  27. BIN
      sales_product_performance_report/static/description/assets/icons/user.png
  28. BIN
      sales_product_performance_report/static/description/assets/icons/wrench.png
  29. BIN
      sales_product_performance_report/static/description/assets/misc/categories.png
  30. BIN
      sales_product_performance_report/static/description/assets/misc/check-box.png
  31. BIN
      sales_product_performance_report/static/description/assets/misc/compass.png
  32. BIN
      sales_product_performance_report/static/description/assets/misc/corporate.png
  33. BIN
      sales_product_performance_report/static/description/assets/misc/customer-support.png
  34. BIN
      sales_product_performance_report/static/description/assets/misc/cybrosys-logo.png
  35. BIN
      sales_product_performance_report/static/description/assets/misc/features.png
  36. BIN
      sales_product_performance_report/static/description/assets/misc/logo.png
  37. BIN
      sales_product_performance_report/static/description/assets/misc/pictures.png
  38. BIN
      sales_product_performance_report/static/description/assets/misc/pie-chart.png
  39. BIN
      sales_product_performance_report/static/description/assets/misc/right-arrow.png
  40. BIN
      sales_product_performance_report/static/description/assets/misc/star.png
  41. BIN
      sales_product_performance_report/static/description/assets/misc/support.png
  42. BIN
      sales_product_performance_report/static/description/assets/misc/whatsapp.png
  43. BIN
      sales_product_performance_report/static/description/assets/modules/1.png
  44. BIN
      sales_product_performance_report/static/description/assets/modules/2.png
  45. BIN
      sales_product_performance_report/static/description/assets/modules/3.png
  46. BIN
      sales_product_performance_report/static/description/assets/modules/4.png
  47. BIN
      sales_product_performance_report/static/description/assets/modules/5.png
  48. BIN
      sales_product_performance_report/static/description/assets/modules/6.png
  49. BIN
      sales_product_performance_report/static/description/assets/screenshots/1.png
  50. BIN
      sales_product_performance_report/static/description/assets/screenshots/10.png
  51. BIN
      sales_product_performance_report/static/description/assets/screenshots/11.png
  52. BIN
      sales_product_performance_report/static/description/assets/screenshots/12.png
  53. BIN
      sales_product_performance_report/static/description/assets/screenshots/13.png
  54. BIN
      sales_product_performance_report/static/description/assets/screenshots/14.png
  55. BIN
      sales_product_performance_report/static/description/assets/screenshots/15.png
  56. BIN
      sales_product_performance_report/static/description/assets/screenshots/2.png
  57. BIN
      sales_product_performance_report/static/description/assets/screenshots/3.png
  58. BIN
      sales_product_performance_report/static/description/assets/screenshots/4.png
  59. BIN
      sales_product_performance_report/static/description/assets/screenshots/5.png
  60. BIN
      sales_product_performance_report/static/description/assets/screenshots/6.png
  61. BIN
      sales_product_performance_report/static/description/assets/screenshots/7.png
  62. BIN
      sales_product_performance_report/static/description/assets/screenshots/8.png
  63. BIN
      sales_product_performance_report/static/description/assets/screenshots/9.png
  64. BIN
      sales_product_performance_report/static/description/assets/screenshots/hero.gif
  65. BIN
      sales_product_performance_report/static/description/banner.jpg
  66. BIN
      sales_product_performance_report/static/description/icon.png
  67. 663
      sales_product_performance_report/static/description/index.html
  68. 27
      sales_product_performance_report/views/product_template_views.xml
  69. 62
      sales_product_performance_report/views/res_users_views.xml
  70. 25
      sales_product_performance_report/views/sale_order_menu.xml
  71. 23
      sales_product_performance_report/wizard/__init__.py
  72. 117
      sales_product_performance_report/wizard/product_performance.py
  73. 42
      sales_product_performance_report/wizard/product_performance_views.xml
  74. 108
      sales_product_performance_report/wizard/sales_performance.py
  75. 42
      sales_product_performance_report/wizard/sales_performance_views.xml

42
sales_product_performance_report/README.rst

@ -0,0 +1,42 @@
.. 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
Sales And Products Performance Report
=====================================
Overall Performance Report of Sales and Products.
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
License
-------
GNU AFFERO GENERAL PUBLIC LICENSE Version 3 (AGPL v3)
(https://www.gnu.org/licenses/agpl-3.0-standalone.html)
Credits
-------
Developer: (V15) Saneen K, Contact: odoo@cybrosys.com
Contacts
--------
* Mail Contact : odoo@cybrosys.com
* Website : https://cybrosys.com
Bug Tracker
-----------
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
Maintainer
==========
.. image:: https://cybrosys.com/images/logo.png
:target: https://cybrosys.com
This module is maintained by Cybrosys Technologies.
For support and more information, please visit `Our Website <https://cybrosys.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

23
sales_product_performance_report/__init__.py

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

50
sales_product_performance_report/__manifest__.py

@ -0,0 +1,50 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Saneen K (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
{
'name': "Sales And Products Performance Report",
'version': '15.0.1.0.0',
'category': 'Sales, Accounting',
'summary': 'Performance Report Summary of Sales and Products',
'description': "The Overview of Sales and Products Performance Done by"
"Sales Team and Sales Person",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': 'https://www.cybrosys.com',
'depends': [
'stock',
'sale_management'
],
'data': [
'security/ir.model.access.csv',
'views/product_template_views.xml',
'views/res_users_views.xml',
'views/sale_order_menu.xml',
'wizard/product_performance_views.xml',
'wizard/sales_performance_views.xml',
],
'images': ['static/description/banner.jpg'],
'license': 'AGPL-3',
'installable': True,
'auto_install': False,
'application': False,
}

7
sales_product_performance_report/doc/RELEASE_NOTES.md

@ -0,0 +1,7 @@
## Module <sales_product_performance_report>
#### 31.07.2024
#### Version 15.0.1.0.0
#### ADD
- Initial commit for Sales And Products Performance Report

24
sales_product_performance_report/models/__init__.py

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

127
sales_product_performance_report/models/product_template.py

@ -0,0 +1,127 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Saneen K(odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
from odoo import fields, models, _
from odoo.exceptions import UserError
from odoo.http import request
class ProductTemplate(models.Model):
"""Inherits the product template for adding fields and methods"""
_inherit = 'product.template'
stock_warehouse_id = fields.Many2one('stock.warehouse',
string='Warehouse',
help="Warehouse from where the"
" product is placed",
domain="[('company_id', '=', "
"company_id)]")
quantity = fields.Float(string='On Hand',
help='On Hand Quantity')
revenue = fields.Float(string="Revenue",
help='Total Revenue for the Product')
total_order = fields.Integer(string="Total Order",
help='Total Number of the '
'Order for the Product')
ordered_quantities = fields.Integer(string="Ordered Quantities",
help='Total Number of the Quantity'
' that Ordered')
delivered_quantities = fields.Integer(string="Delivered Quantities",
help='Total Number of the Quantity'
' that Delivered')
returned_quantities = fields.Integer(string="Returned Quantities",
help='Total Number of the Quantity'
' that returned')
avg_price = fields.Float(string="Avg Price", help='Avg Price of Products')
avg_qty_order = fields.Float(string="Avg Qty Per Order",
help='Average Quantity Order')
avg_stock = fields.Integer(string="Avg Stock",
help='Avg Stock of Products')
def performance_values(self, start_date, end_date, up_to_date):
"""
For Calculate Performance Values
:param start_date: for get records after the date .
:param end_date: for get records before the date.
:param up_to_date: for up_to_date records.
"""
domain = [('product_template_id', '=', self.id)]
if not up_to_date:
if start_date:
domain.append(('order_id.date_order', '>=', start_date))
if end_date:
domain.append(('order_id.date_order', '<=', end_date))
sale_order = self.env['sale.order.line'].search(domain)
product_variant = self.env['product.product'].search([
('product_tmpl_id', '=', self.id)])
stock_quant = self.env['stock.quant'].search([
('product_id', '=', product_variant[0].id)])
self.quantity = self.qty_available
self.stock_warehouse_id = stock_quant.location_id.warehouse_id
self.delivered_quantities = sum(sale_order.mapped('qty_delivered'))
self.ordered_quantities = sum(sale_order.mapped('product_uom_qty'))
self.total_order = len(sale_order)
self.avg_stock = (self.ordered_quantities / self.total_order) \
if self.total_order != 0 else 0
self.avg_qty_order = self.delivered_quantities / self.total_order \
if self.total_order != 0 else 0.00
self.avg_price = (sum(sale_order.mapped('price_unit')) /
self.total_order) if self.total_order != 0 else 0.00
self.revenue = 0
for line in sale_order:
self.revenue += line.price_subtotal
return_qty = self.env['stock.move'].search(
[('sale_line_id', '=', line.id),
('picking_id.sale_id', '=', line.order_id.id),
('picking_type_id.code', '=', 'incoming')])
if return_qty.quantity_done:
self.returned_quantities = return_qty.quantity_done
def action_sale_order(self):
"""
action for get sale orders done with this product
return: to sale order tree view and form view
"""
domain = [('product_template_id', '=', self.id)]
if not self._context['up_to_date']:
if self._context['start_date']:
domain.append(
('order_id.date_order', '>=', self._context['start_date']))
if self._context['end_date']:
domain.append(
('order_id.date_order', '<=', self._context['end_date']))
sale_order = self.env['sale.order.line'].search(domain)
orders = [order.order_id.id for order in sale_order]
tree_view_id = request.env.ref(
'sale.view_order_tree').id
form_view_id = request.env.ref(
'sale.view_order_form').id
if orders:
return {
'name': _('Product Performance Report'),
'res_model': 'sale.order',
'views': [(tree_view_id, 'list'), (form_view_id, 'form')],
'type': 'ir.actions.act_window',
'target': 'self',
'domain': [('id', 'in', orders)]
}
else:
raise UserError(_("No Orders with this Product!"))

122
sales_product_performance_report/models/res_users.py

@ -0,0 +1,122 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Saneen K (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
from odoo import fields, models, _
from odoo.exceptions import UserError
from odoo.http import request
class ResUsers(models.Model):
"""Inherits the User model for adding fields and methods"""
_inherit = 'res.users'
warehouse_id = fields.Many2one('stock.warehouse',
string='Warehouse',
domain="[('company_id', '=', company_id)]",
help='Warehouse')
estimated_revenue = fields.Float(string="Estimated Revenue",
help='Estimated Revenue of orders done by'
'the user.')
net_revenue = fields.Float(string="Net Revenue",
help='Net Revenue of orders')
total_sale_order = fields.Integer(string="Total Order",
help='No of Total Orders')
sale_order_done = fields.Integer(string="Sale Order Done",
help='No of Done Sale Orders')
returned_orders = fields.Integer(string="Returned Orders",
help='No of Returned Orders')
avg_price = fields.Float(string="Avg Price", help='Average Price')
overall_performance = fields.Float(string="Over All%",
help='Overall Performance')
overall_performance_separate = fields.Float(string="Over All Separated",
help='Overall Performance of '
'Sales Person Done with '
'Different Sales Team')
def performance_values(self, sale_person, start_date,
end_date, up_to_date):
"""
For Calculate Performance Values
:param sale_person: for get sale_person .
:param start_date: for get records after the date .
:param end_date: for get records before the date.
:param up_to_date: for up_to_date records.
"""
domain = [
('team_id', '=', self.sale_team_id.id),
('user_id', '=', sale_person.id)
]
if not up_to_date:
if start_date:
domain.append(('date_order', '>=', start_date))
if end_date:
domain.append(('date_order', '<=', end_date))
sale_order = self.env['sale.order'].search(domain)
self.total_sale_order = len(sale_order)
domain.append(('state', '=', 'sale'))
self.sale_order_done = len(self.env['sale.order'].search(domain))
self.net_revenue = sum(self.env['sale.order'].search
(domain).mapped('amount_total'))
self.estimated_revenue = sum(sale_order.mapped('amount_total'))
self.avg_price = self.estimated_revenue / self.total_sale_order \
if self.total_sale_order else None
return_order = self.env['stock.picking'].search([
('sale_id', 'in', sale_order.ids),
('picking_type_id.code', '=', "incoming")
])
self.returned_orders = len(return_order)
overall_order = self.env['sale.order'].search_count([])
self.overall_performance = (
(self.total_sale_order / overall_order) * 100)
separate_order = self.env['sale.order'].search_count([
('team_id', '!=', self.sale_team_id.id),
('user_id', '=', sale_person.id)])
self.overall_performance_separate = (
(separate_order / overall_order) * 100)
def action_sale_order(self):
"""
action for get sale orders done with this product
return: to sale order tree view and form view
"""
domain = [('user_id', '=', self.id)]
if not self._context['up_to_date']:
if self._context['start_date']:
domain.append(('date_order', '>=',
self._context['start_date']))
if self._context['end_date']:
domain.append(('date_order', '<=', self._context['end_date']))
sale_order = self.env['sale.order'].search(domain).mapped('id')
tree_view_id = request.env.ref(
'sale.view_order_tree').id
form_view_id = request.env.ref(
'sale.view_order_form').id
if sale_order:
return {
'name': _('Sales Order Report'),
'res_model': 'sale.order',
'views': [(tree_view_id, 'list'), (form_view_id, 'form')],
'type': 'ir.actions.act_window',
'target': 'self',
'domain': [('id', 'in', sale_order) if sale_order else None],
}
else:
raise UserError(_("No Orders done by this Sales Person!"))

54
sales_product_performance_report/models/sale_order.py

@ -0,0 +1,54 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Saneen K (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
from odoo import api, models, _
class SaleOrder(models.Model):
"""Inherits the sale order model for creating the product
performance report"""
_inherit = 'sale.order'
@api.model
def action_product_performance_report(self):
"""
action for get product performance report
"""
return {
'name': _('Product Performance'),
'type': 'ir.actions.act_window',
'view_mode': 'form',
'res_model': 'product.performance',
'target': 'new',
}
@api.model
def action_sales_performance_report(self):
"""
action for get sales performance report
"""
return {
'name': _('Sales Performance'),
'type': 'ir.actions.act_window',
'view_mode': 'form',
'res_model': 'sales.performance',
'target': 'new',
}

3
sales_product_performance_report/security/ir.model.access.csv

@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_product_performance_user,access.product.performance.user,model_product_performance,base.group_user,1,1,1,1
access_sales_performance_user,access.sales.performance.user,model_sales_performance,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_product_performance_user access.product.performance.user model_product_performance base.group_user 1 1 1 1
3 access_sales_performance_user access.sales.performance.user model_sales_performance base.group_user 1 1 1 1

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
sales_product_performance_report/static/description/assets/misc/categories.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
sales_product_performance_report/static/description/assets/misc/check-box.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
sales_product_performance_report/static/description/assets/misc/compass.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
sales_product_performance_report/static/description/assets/misc/corporate.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
sales_product_performance_report/static/description/assets/misc/customer-support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
sales_product_performance_report/static/description/assets/misc/cybrosys-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
sales_product_performance_report/static/description/assets/misc/features.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

BIN
sales_product_performance_report/static/description/assets/misc/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
sales_product_performance_report/static/description/assets/misc/pictures.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
sales_product_performance_report/static/description/assets/misc/pie-chart.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
sales_product_performance_report/static/description/assets/misc/right-arrow.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

BIN
sales_product_performance_report/static/description/assets/misc/star.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
sales_product_performance_report/static/description/assets/misc/support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
sales_product_performance_report/static/description/assets/misc/whatsapp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
sales_product_performance_report/static/description/assets/modules/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
sales_product_performance_report/static/description/assets/modules/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
sales_product_performance_report/static/description/assets/modules/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
sales_product_performance_report/static/description/assets/modules/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
sales_product_performance_report/static/description/assets/modules/5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
sales_product_performance_report/static/description/assets/modules/6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
sales_product_performance_report/static/description/assets/screenshots/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 KiB

BIN
sales_product_performance_report/static/description/assets/screenshots/10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

BIN
sales_product_performance_report/static/description/assets/screenshots/11.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

BIN
sales_product_performance_report/static/description/assets/screenshots/12.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
sales_product_performance_report/static/description/assets/screenshots/13.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

BIN
sales_product_performance_report/static/description/assets/screenshots/14.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

BIN
sales_product_performance_report/static/description/assets/screenshots/15.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

BIN
sales_product_performance_report/static/description/assets/screenshots/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

BIN
sales_product_performance_report/static/description/assets/screenshots/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

BIN
sales_product_performance_report/static/description/assets/screenshots/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

BIN
sales_product_performance_report/static/description/assets/screenshots/5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

BIN
sales_product_performance_report/static/description/assets/screenshots/6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

BIN
sales_product_performance_report/static/description/assets/screenshots/7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

BIN
sales_product_performance_report/static/description/assets/screenshots/8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

BIN
sales_product_performance_report/static/description/assets/screenshots/9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

BIN
sales_product_performance_report/static/description/assets/screenshots/hero.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 KiB

BIN
sales_product_performance_report/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
sales_product_performance_report/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

663
sales_product_performance_report/static/description/index.html

@ -0,0 +1,663 @@
<div style="background-color: #714B67; height: 810px; width: 100%; padding: 15px; position: relative;">
<!-- TITLE BAR -->
<div class="d-flex align-items-center justify-content-between" style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;">
<img src="assets/misc/cybrosys-logo.png" width="42" height="42" style="width: 42px; height: 42px;" />
<div>
<div style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" class="mr-2">
<i class="fa fa-check mr-1"></i>Enterprise
</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: #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>Odoo sh
</div>
</div>
</div>
<!-- END OF TITLE BAR -->
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12">
<!-- APP HERO -->
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;">
Sales And Products Performance Report
</h1>
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">Performance Report Summary of Sales and Products</p>
<!-- END OF APP HERO -->
<img src="assets/screenshots/hero.gif" class="img-responsive" style="width: 100%; margin-left: auto; margin-right: auto;" />
</div>
</div>
</div>
</div>
<!-- NAVIGATION SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;">
<div class="d-flex justify-content-center align-items-center mr-2" style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/compass.png" />
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Explore This
Module</h2>
</div>
<div class="row my-4" style="font-family: 'Montserrat', sans-serif;">
<div class="col-sm-12 col-md-6 my-3">
<a href="#overview">
<div class="d-flex justify-content-between align-items-center" style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Overview</span>
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">Learn
more about this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36" />
</div>
</a>
</div>
<div class="col-sm-12 col-md-6 my-3">
<a href="#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 for 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">
Observing records without a dedicated report can be a daunting task, especially in the context of sales and product performance. Businesses often struggle to extract meaningful insights from a sheer volume of data scattered across various sources. Without a structured report, tracking sales trends, identifying top-performing products, or evaluating the success of marketing campaigns can be a time-consuming and error-prone process.
<br/><br/>On the other hand, the Sales and Product Performance Report in Odoo brings a breath of fresh air to this challenge. It simplifies the task of record observation by presenting crucial data in an organized, visually appealing manner. With just a few clicks, businesses can access comprehensive sales and product performance metrics, allowing for quick and accurate decision-making. This report not only saves time but also reduces the likelihood of oversight or misinterpretation of data, enhancing the efficiency of sales analysis and strategic planning.
<br/><br/>In essence, while observing records without a report can be cumbersome and prone to inaccuracies, the Sales and Product Performance Report in Odoo streamlines the process, making it remarkably easier to gain valuable insights and drive informed business decisions. It's an indispensable tool for businesses aiming to stay competitive and agile in today's data-driven marketplace.
</div>
</div>
<!-- END OF OVERVIEW SECTION -->
<!-- PRODUCT PERFORMANCE 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;">Product Performance</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: 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;">Comprehensive Data Analysis</span>
<br/>
</div>
<span>The Product Performance Report provides a comprehensive analysis of how each product in your inventory is performing. It offers insights into sales, revenues, quantities sold, and profitability for individual products.</span>
<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;">Customizable Date Ranges</span>
</div>
<span>Users can set custom date ranges for the report, allowing them to analyze product performance over specific time periods. This flexibility is crucial for seasonal businesses and campaign analysis.</span>
<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;">Product Filtering</span>
</div>
<span>Users can filter the report by product category, enabling them to focus on specific product groups or types. This is valuable for businesses with diverse product catalogs.</span>
<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;">Exporting Data</span>
</div>
<span>Users can export the report data to various formats (e.g., Excel or CSV), making it convenient for sharing and further analysis outside the Odoo environment.</span>
</div>
<div class="col-sm-12 col-md-6">
<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;">User-Friendly Interface</span>
</div>
<span>Odoo's user-friendly interface ensures that both technical and non-technical users can navigate and utilize the report effectively.</span>
<br/>
<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;">Identifying Opportunities</span>
</div>
<span>By analyzing the report, businesses can identify opportunities to promote top-performing products or make data-driven decisions about inventory management.</span>
<br/>
<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;">Cost Analysis</span>
</div>
<span>Some Product Performance Reports also include cost-related metrics, enabling businesses to evaluate profitability accurately.</span>
<br/>
<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;">Order View</span>
</div>
<span>Accessible View of Sale Orders That Done by the Products.</span>
</div>
</div>
<!-- END OF FEATURES SECTION -->
<!-- SCREENSHOTS SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="screenshots">
<div class="d-flex justify-content-center align-items-center mr-2" style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/pictures.png" />
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Screenshots
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Access Product Performance Report from Reporting Menu</h3>
<img src="assets/screenshots/1.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">A Wizard for Redirect to Performance View with Filter Start and End Date</h3>
<img src="assets/screenshots/2.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">An Option to Get up-to-date Records </h3>
<img src="assets/screenshots/3.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Filter Report Based on Products and Category</h3>
<img src="assets/screenshots/4.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">View of Product Performance Report with Product, Category, Company, Warehouse, Revenue, On Hand Quantity, Total Orders</h3>
<img src="assets/screenshots/5.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">With Ordered Quantities, Delivered Quantities, Returned Quantities, Avg Price and Avg Quantity per Order</h3>
<img src="assets/screenshots/6.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">A Button for Redirect to Sale Orders that Done with this Products</h3>
<img src="assets/screenshots/7.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">The Sale Order View(Editable)</h3>
<img src="assets/screenshots/8.png" class="img-thumbnail">
</div>
</div>
</div>
<!-- END OF SCREENSHOTS SECTION -->
<!-- END OF PRODUCT PERFORMANCE SECTION -->
<!-- SALES PERFORMANCE SECTION -->
<!-- FEATURES SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="sales_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;">Sales Performance</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: 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;">Data-Driven Insights</span>
<br/>
</div>
<span>These reports provide data-driven insights into sales team and salesperson performance. Businesses can make informed decisions based on concrete data rather than assumptions.</span>
<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;">Performance Evaluation</span>
</div>
<span>They allow for the evaluation of sales teams and individual salespeople, helping identify top performers and areas that require improvement. This aids in performance reviews and incentive programs.</span>
<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;">Revenue Analysis</span>
</div>
<span>Users can analyze revenue generated by each salesperson or team, helping identify sources of revenue and areas with growth potential.</span>
<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;">Exporting Data</span>
</div>
<span>Users can export the report data to various formats (e.g., Excel or CSV), making it convenient for sharing and further analysis outside the Odoo environment.</span>
</div>
<div class="col-sm-12 col-md-6">
<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;">User-Friendly Interface</span>
</div>
<span>Odoo's user-friendly interface ensures that both technical and non-technical users can navigate and utilize the report effectively.</span>
<br/>
<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;">Identifying Opportunities</span>
</div>
<span>By analyzing the report, businesses can identify opportunities to promote top-performing sales team and sales person or make data-driven decisions about sales department.</span>
<br/>
<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;">Customizable Filters</span>
</div>
<span>Reports often come with customizable filters, allowing users to focus on specific time periods, sales teams, salespeople, or other criteria.</span>
<br/>
<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;">Order View</span>
</div>
<span>Accessible View of Sale Orders That Done by the Sales Persons.</span>
</div>
</div>
<!-- END OF FEATURES SECTION -->
<!-- SCREENSHOTS SECTION -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="sales_screenshots">
<div class="d-flex justify-content-center align-items-center mr-2" style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/pictures.png" />
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Screenshots
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Access Sales Performance Report from Reporting Menu</h3>
<img src="assets/screenshots/9.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">A Wizard for Redirect to Performance View with Filter Start Date, End Date and Uptodate</h3>
<img src="assets/screenshots/10.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Filter Report Based on Sales Team and Sales Person</h3>
<img src="assets/screenshots/11.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">View of Sales Performance Report with Sales Person, Sales Team, Company, Warehouse, Estimated Revenue, Net Revenue, Total Orders, Done Orders, Returned Orders, Avg Price and Overall Performance</h3>
<img src="assets/screenshots/12.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">An Optional Field for Order that Done without Sales Team </h3>
<img src="assets/screenshots/13.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">A Button for Redirect to Sale Orders that Done by Sales Persons</h3>
<img src="assets/screenshots/14.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">The Sale Order View(Editable)</h3>
<img src="assets/screenshots/15.png" class="img-thumbnail">
</div>
</div>
</div>
<!-- END OF SCREENSHOTS SECTION -->
<!-- END OF SALES PERFORMANCE SECTION -->
<!-- RELATED PRODUCTS -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/categories.png" />
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Related
Products
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner" style="padding: 30px;">
<div class="carousel-item" style="min-height: 198.656px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/sale_discount_total/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block" style="border-radius: 0px;" src="assets/modules/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/15.0/barcode_scanning_sale_purchase/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block" style="border-radius: 0px;" src="assets/modules/2.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/sale_purchase_previous_product_cost/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block" style="border-radius: 0px;" src="assets/modules/3.png">
</div>
</a>
</div>
</div>
<div class="carousel-item active" style="min-height: 198.656px;">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/sales_person_signature/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block" style="border-radius: 0px;" src="assets/modules/4.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/margin_product_sale_invoice/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block" style="border-radius: 0px;" src="assets/modules/5.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/sale_product_image/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block" style="border-radius: 0px;" src="assets/modules/6.png">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev" style="width:35px; color:#000"> <span
class="carousel-control-prev-icon"><i class="fa fa-chevron-left" style="font-size:24px"></i></span>
</a> <a class="carousel-control-next" href="#demo1" data-slide="next" style="width:35px; color:#000">
<span class="carousel-control-next-icon"><i class="fa fa-chevron-right" style="font-size:24px"></i></span>
</a>
</div>
</div>
</div>
<!-- END OF RELATED PRODUCTS -->
<!-- OUR SERVICES -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2" style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/star.png" />
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Our Services
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/cogs.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Customization</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/wrench.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/lifebuoy.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Support</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/user.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Hire
Odoo
Developer</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/puzzle.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Integration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/update.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Migration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/consultation.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Consultancy</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/training.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3" style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/license.png" class="img-responsive" height="48px" width="48px">
</div>
<h6 class="text-center" style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Licensing Consultancy</h6>
</div>
</div>
</div>
<!-- END OF OUR SERVICES -->
<!-- OUR INDUSTRIES -->
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2" style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/corporate.png" />
</div>
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Our
Industries
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/trading-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Trading
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easily procure
and
sell your products</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/pos-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
POS
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easy
configuration
and convivial experience</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/education-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Education
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
A platform for
educational management</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/manufacturing-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Manufacturing
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Plan, track and
schedule your operations</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center" style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/ecom-black.png" class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
E-commerce &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: 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 d-flex justify-content-center align-items-center" 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 d-flex justify-content-center align-items-center" 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 -->

27
sales_product_performance_report/views/product_template_views.xml

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Custom Tree View for Product Template -->
<record id="view_product_template_report_tree" model="ir.ui.view">
<field name="name">product.template.report.tree</field>
<field name="model">product.template</field>
<field name="arch" type="xml">
<tree string="Sales Orders" sample="1">
<field name="product_variant_id"/>
<field name="categ_id"/>
<field name="company_id"/>
<field name="stock_warehouse_id"/>
<field name="revenue" sum="Total Revenue" widget="monetary" optional="show" />
<field name="quantity" sum="On Hand Quantity" optional="show" decoration-danger="quantity &lt;= avg_stock"/>
<field name="avg_stock" sum="On Hand Quantity" optional="show" invisible="1"/>
<field name="total_order" sum="Total Order" optional="show"/>
<button name="action_sale_order" type="object"
string="Sale Orders" class="oe_highlight"/>
<field name="ordered_quantities" sum="Total Ordered Quantities" optional="show"/>
<field name="delivered_quantities" sum="Total Delivered Quantities" optional="show"/>
<field name="returned_quantities" sum="Total Returned Quantities" optional="show"/>
<field name="avg_price" sum="Total Avg Price" widget="monetary" optional="show"/>
<field name="avg_qty_order"/>
</tree>
</field>
</record>
</odoo>

62
sales_product_performance_report/views/res_users_views.xml

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Custom Tree View for Res Users -->
<record id="view_res_users_report_tree" model="ir.ui.view">
<field name="name">res.users.report.tree</field>
<field name="model">res.users</field>
<field name="arch" type="xml">
<tree string="Sales Orders" sample="1">
<field name="partner_id" string="Sales Person"/>
<field name="sale_team_id" string="Sales Team"/>
<field name="company_id"/>
<field name="estimated_revenue" sum="Total Estimated Revenue"
widget="monetary" decoration-bf="1" optional="show"/>
<field name="net_revenue" sum="Net Revenue" widget="monetary"
decoration-bf="1" optional="show"/>
<field name="total_sale_order" sum="Total Order"
widget="monetary" decoration-bf="1" optional="show"/>
<button name="action_sale_order" type="object"
string="Sale Orders" class="oe_highlight"/>
<field name="sale_order_done" sum="Total Done Order"
widget="monetary" decoration-bf="1" optional="show"/>
<field name="returned_orders" sum="Total Returned Quantities"
widget="monetary" decoration-bf="1" optional="show"/>
<field name="avg_price" sum="Total Avg Price" widget="monetary"
decoration-bf="1" optional="show"/>
<field name="overall_performance" optional="show"/>
<field name="overall_performance_separate" optional="hide"/>
</tree>
</field>
</record>
<!-- Record for search filter in res user tree view -->
<record id="res_users_report_view_search" model="ir.ui.view">
<field name="name">res.users.report.view.search</field>
<field name="model">res.users</field>
<field name="arch" type="xml">
<search>
<field name="partner_id" string="Sales Person"/>
<field name="sale_team_id" string="Sales Team"/>
<field name="company_id"/>
<field name="estimated_revenue" sum="Total Estimated Revenue"
widget="monetary" decoration-bf="1" optional="show"/>
<field name="net_revenue" sum="Net Revenue" widget="monetary"
decoration-bf="1" optional="show"/>
<field name="total_sale_order" sum="Total Order"
widget="monetary" decoration-bf="1" optional="show"/>
<field name="sale_order_done" sum="Total Done Order"
widget="monetary" decoration-bf="1" optional="show"/>
<field name="returned_orders" sum="Total Returned Quantities"
widget="monetary" decoration-bf="1" optional="show"/>
<field name="avg_price" sum="Total Avg Price" widget="monetary"
decoration-bf="1" optional="show"/>
<field name="overall_performance" optional="show"/>
<field name="overall_performance_separate" optional="hide"/>
<group expand="1" string="Group By">
<filter string="Sales Team" name="sale_team_id"
context="{'group_by':'sale_team_id'}"/>
</group>
</search>
</field>
</record>
</odoo>

25
sales_product_performance_report/views/sale_order_menu.xml

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Action for Product Performance Report -->
<record id="ir_actions_server_action_product_performance_report" model="ir.actions.server">
<field name="name">Product Performance</field>
<field name="model_id" ref="sales_product_performance_report.model_sale_order"/>
<field name="type">ir.actions.server</field>
<field name="state">code</field>
<field name="code">action= model.action_product_performance_report()</field>
</record>
<!-- Action for Sales Performance Report -->
<record id="ir_actions_server_action_sales_performance_report" model="ir.actions.server">
<field name="name">Sales Performance</field>
<field name="model_id" ref="sales_product_performance_report.model_sale_order"/>
<field name="type">ir.actions.server</field>
<field name="state">code</field>
<field name="code">action= model.action_sales_performance_report()</field>
</record>
<!-- Menu Items for Product Performance and Sales Performance Report -->
<menuitem id="menu_report" name="Report" action="sale.action_order_report_all" parent="sale.menu_sale_report"/>
<menuitem id="menu_product_performance_view" name="Product Performance Report" action="ir_actions_server_action_product_performance_report" parent="sale.menu_sale_report"/>
<menuitem id="menu_sales_performance_view" name="Sales Performance Report" action="ir_actions_server_action_sales_performance_report" parent="sale.menu_sale_report"/>
</odoo>

23
sales_product_performance_report/wizard/__init__.py

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

117
sales_product_performance_report/wizard/product_performance.py

@ -0,0 +1,117 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Saneen K (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
from itertools import zip_longest
from odoo import api, fields, models, tools, _
from odoo.exceptions import UserError, ValidationError
from odoo.http import request
class ProductPerformance(models.TransientModel):
_name = 'product.performance'
_description = "Product Performance Reports"
@tools.ormcache()
def _get_default_category_id(self):
# Deletion forbidden (at least through unlink)
return self.env.ref('product.product_category_all')
start_date = fields.Date(string="Start Date", help="The start date of"
" the report")
end_date = fields.Date(string="End Date", help="The end date of "
"the report")
up_to_date_report = fields.Boolean(string="Report Up To Date",
help='For Getting the Up To Date '
'Report')
product_ids = fields.Many2many('product.template',
string='Product',
help='All the Products that with '
'same category',
domain="[('categ_id', 'child_of', "
"categ_id)]")
categ_id = fields.Many2one('product.category',
string='Product Category',
help='Product Category',
default=_get_default_category_id,
required=True)
company_ids = fields.Many2many('res.company', string='Company',
help="Select the companies to which this "
"record applies.")
@api.onchange('end_date')
def check_date_validity(self):
"""Function for ensuring the start date doesn't exceed the end date"""
if self.start_date:
if self.start_date > self.end_date:
raise ValidationError(_("The start date cannot be later "
"than the end date. Please select "
"a valid start date."))
def action_view_product_performance(self):
"""
return: to sale order tree view and form view
"""
products = []
companies = []
if self.product_ids:
for product, company in zip_longest(self.product_ids,
self.company_ids,
fillvalue=None):
products.append(product.id) if self.product_ids else None
companies.append(company.id) if self.company_ids else None
if product:
product.performance_values(self.start_date, self.end_date,
self.up_to_date_report)
else:
if self.company_ids:
product = self.env['product.template'].search(
[('categ_id', 'child_of', self.categ_id.id),
('company_id', 'in', self.company_ids.ids)])
else:
product = self.env['product.template'].search(
[('categ_id', 'child_of', self.categ_id.id)])
for rec in product:
self.env['product.template'].browse(rec.id).performance_values(
self.start_date, self.end_date, self.up_to_date_report)
if product:
products = [each_product.id for each_product in product]
else:
raise UserError(_("No products in this Company!"))
tree_view_id = request.env.ref(
'sales_product_performance_report.view_product_template_report_tree').id
domain = [('id', 'in', products) if products else None]
if companies:
domain.append(('company_id', 'in', companies))
return {
'name': _('Product Performance Report'),
'res_model': 'product.template',
'views': [(tree_view_id, 'list')],
'view_id': tree_view_id,
'type': 'ir.actions.act_window',
'target': 'fullscreen',
'domain': domain if products else None,
'context': {
'create': False,
'start_date': self.start_date if self.start_date else None,
'end_date': self.end_date if self.end_date else None,
'up_to_date': self.up_to_date_report
}
}

42
sales_product_performance_report/wizard/product_performance_views.xml

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Product Performance Wizard Form -->
<record id="product_performance_view_form" model="ir.ui.view">
<field name="name">product.performance.view.form</field>
<field name="model">product.performance</field>
<field name="arch" type="xml">
<form string="Performance">
<group class="oe_title">
<field name="start_date"/>
<field name="end_date"/>
<field name="up_to_date_report"/>
</group>
<group>
<group>
<field name="categ_id"/>
<field name="product_ids" widget="many2many_tags"/>
</group>
<group>
<field name="company_ids" widget="many2many_tags"/>
</group>
</group>
<footer>
<button name="action_view_product_performance" string="View Data"
type="object" class="btn-primary"/>
<button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="z"/>
</footer>
</form>
</field>
</record>
<!-- Wizard Form Action -->
<record id="product_performance_action"
model="ir.actions.act_window">
<field name="name">Product Performance</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.performance</field>
<field name="view_mode">form</field>
<field name="view_id" ref="product_performance_view_form"/>
<field name="target">new</field>
</record>
</odoo>

108
sales_product_performance_report/wizard/sales_performance.py

@ -0,0 +1,108 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Saneen K (odoo@cybrosys.com)
#
# You can modify it under the terms of the GNU AFFERO
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details.
#
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
# (AGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
from odoo import fields, models, _
from odoo.exceptions import UserError
from odoo.http import request
class SalesPerformance(models.TransientModel):
_name = 'sales.performance'
_description = "Sales Performance Reports"
start_date = fields.Date(string="Start Date", help="The start date of"
" the report")
end_date = fields.Date(string="End Date", help="The end date of "
"the report")
up_to_date_report = fields.Boolean(string="Report Up To Date",
help='For Getting the Up To Date '
'Report')
company_ids = fields.Many2many('res.company',
string="Company",
help="Select the companies to which this "
"record applies.")
sales_team_ids = fields.Many2many('crm.team',
string="Sales Team",
domain="['|', ('company_id', '=', False),"
"('company_id', 'in', company_ids)]",
help='Select the Sales Team')
sales_person_ids = fields.Many2many('res.users',
string="Sales Person",
domain="[('sale_team_id', 'in', sales_team_ids)]",
help='Select Sales Person',)
def action_view_sales_performance(self):
"""
return: to sale order tree view and form view
"""
sales_person = []
if self.sales_person_ids:
for s_person in self.sales_person_ids:
if s_person:
sales_person.append(s_person.id)
s_person.performance_values(s_person, self.start_date,
self.end_date,
self.up_to_date_report)
elif self.sales_team_ids:
for s_team in self.sales_team_ids:
s_person = self.env['res.users'].search([
('sale_team_id', '=', s_team.id)])
for person in s_person:
sales_person.append(person.id)
person.performance_values(person, self.start_date,
self.end_date,
self.up_to_date_report)
else:
s_person = self.env['res.users'].search([
('company_id', 'in', self.company_ids.ids)])
for rec in s_person:
sales_person.append(rec.id)
rec.performance_values(rec, self.start_date, self.end_date,
self.up_to_date_report)
tree_view_id = request.env.ref(
'sales_product_performance_report.view_res_users_report_tree').id
domain = [('id', 'in', sales_person) if sales_person else None]
if sales_person:
return {
'name': _('Sales Performance Report'),
'res_model': 'res.users',
'views': [(tree_view_id, 'tree')],
'view_id': tree_view_id,
'type': 'ir.actions.act_window',
'target': 'self',
'domain': domain if sales_person else None,
'context': {
'create': False,
'start_date': self.start_date if self.start_date else None,
'end_date': self.end_date if self.end_date else None,
'up_to_date': self.up_to_date_report,
'search_default_sale_team_id': [self.sales_team_ids.ids]
if self.sales_team_ids else None,
},
}
else:
if self.company_ids:
raise UserError(_(f"No Sales Team in {self.company_ids.name}!") if self.company_ids else _(f"No Sales "
f"Team in "
f"Company!"))
else:
raise UserError(
_(f"Select a Company"))

42
sales_product_performance_report/wizard/sales_performance_views.xml

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Sales Performance Wizard Form -->
<record id="sales_performance_view_form" model="ir.ui.view">
<field name="name">sales.performance.view.form</field>
<field name="model">sales.performance</field>
<field name="arch" type="xml">
<form string="Performance">
<group class="oe_title">
<field name="start_date"/>
<field name="end_date"/>
<field name="up_to_date_report"/>
</group>
<group>
<group>
<field name="company_ids" widget="many2many_tags"/>
</group>
<group>
<field name="sales_team_ids" widget="many2many_tags"/>
<field name="sales_person_ids" widget="many2many_tags" options="{'no_create_edit': True}"/>
</group>
</group>
<footer>
<button name="action_view_sales_performance" string="View Data"
type="object" class="btn-primary"/>
<button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="z"/>
</footer>
</form>
</field>
</record>
<!-- Wizard Form Action -->
<record id="action_sales_performance"
model="ir.actions.act_window">
<field name="name">Sales Performance</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">sales.performance</field>
<field name="view_mode">form</field>
<field name="view_id" ref="sales_performance_view_form"/>
<field name="target">new</field>
</record>
</odoo>
Loading…
Cancel
Save