@ -0,0 +1,46 @@ |
|||
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg |
|||
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html |
|||
:alt: License: AGPL-3 |
|||
|
|||
Advanced Sales Reports |
|||
====================== |
|||
This Module Helps to Generate Advanced sales reports. |
|||
|
|||
Configuration |
|||
============= |
|||
* No additional configurations needed |
|||
|
|||
License |
|||
------- |
|||
General Public License, Version 3 (AGPL v3). |
|||
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
Credits |
|||
------- |
|||
Developer: (V18, V17) Ayana KP, |
|||
Contact: odoo@cybrosys.com |
|||
|
|||
Contacts |
|||
-------- |
|||
* Mail Contact : odoo@cybrosys.com |
|||
* Website : https://cybrosys.com |
|||
|
|||
Bug Tracker |
|||
----------- |
|||
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
|||
|
|||
Maintainer |
|||
========== |
|||
.. image:: https://cybrosys.com/images/logo.png |
|||
:target: https://cybrosys.com |
|||
This module is maintained by Cybrosys Technologies. |
|||
|
|||
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,23 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Ayana KP (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 controllers |
|||
from . import wizard |
@ -0,0 +1,62 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Ayana KP (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': 'Advanced Sales Reports', |
|||
'version': '18.0.1.0.0', |
|||
'category': 'Sales', |
|||
'summary': """This Module Helps to Generate Advanced sales reports""", |
|||
'description': """This module helps you to print reports like Sales Analysis, |
|||
Sales By Category, Sales Indent, Sales Invoice ,Product Profit , |
|||
Hourly Sales in PDF and XLSX format.""", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': 'https://www.cybrosys.com', |
|||
'depends': ['sale_management', 'account'], |
|||
'data': [ |
|||
'security/ir.model.access.csv', |
|||
'wizard/sale_report_advance_views.xml', |
|||
'wizard/sale_report_invoice_views.xml', |
|||
'wizard/sale_report_analysis_views.xml', |
|||
'wizard/sale_report_weekly_views.xml', |
|||
'wizard/sale_report_category_views.xml', |
|||
'wizard/sale_report_indent_views.xml', |
|||
'views/sale_report_advanced_views.xml', |
|||
'report/sale_advanced_reports.xml', |
|||
'report/invoice_analysis_templates.xml', |
|||
'report/sales_indent_templates.xml', |
|||
'report/sale_profit_templates.xml', |
|||
'report/sales_category_templates.xml', |
|||
'report/sales_analysis_templates.xml', |
|||
'report/sales_weekly_templates.xml', |
|||
], |
|||
'assets': { |
|||
'web.assets_backend': [ |
|||
'sale_report_advanced/static/src/js/action_manager.js', |
|||
], |
|||
}, |
|||
'images': ['static/description/banner.png'], |
|||
'license': 'AGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': False, |
|||
} |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Ayana KP (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 sale_report_advanced |
@ -0,0 +1,66 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################### |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Ayana KP (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/>. |
|||
# |
|||
############################################################################### |
|||
import json |
|||
from odoo import http |
|||
from odoo.http import content_disposition, request |
|||
from odoo.tools import html_escape |
|||
|
|||
|
|||
class XLSXReportController(http.Controller): |
|||
@http.route('/xlsx_reports', type='http', auth='user', methods=['POST'], |
|||
csrf=False) |
|||
def get_report_xlsx(self, model, options, output_format, report_name): |
|||
"""Generate an XLSX reports based on the provided data and return |
|||
it as a response. |
|||
Args: |
|||
model (str): The name of the model on which the reports is based. |
|||
data (str): The data required for generating the reports. |
|||
output_format (str): The desired output format for the reports (e.g., 'xlsx'). |
|||
report_name (str): The name to be given to the generated reports file. |
|||
Returns: |
|||
Response: The generated reports file as a response. |
|||
Raises: |
|||
Exception: If an error occurs during reports generation. """ |
|||
uid = request.session.uid |
|||
report_obj = request.env[model].with_user(uid) |
|||
token = 'dummy-because-api-expects-one' |
|||
try: |
|||
if output_format == 'xlsx': |
|||
response = request.make_response( |
|||
None, |
|||
headers=[ |
|||
('Content-Type', 'application/vnd.ms-excel'), |
|||
('Content-Disposition', |
|||
content_disposition(report_name + '.xlsx')) |
|||
] |
|||
) |
|||
report_obj.get_xlsx_report(options, response) |
|||
response.set_cookie('fileToken', token) |
|||
return response |
|||
except Exception as e: |
|||
se = http.serialize_exception(e) |
|||
error = { |
|||
'code': 200, |
|||
'message': 'Odoo Server Error', |
|||
'data': se |
|||
} |
|||
return request.make_response(html_escape(json.dumps(error))) |
@ -0,0 +1,7 @@ |
|||
## Module <sales_report_advanced> |
|||
|
|||
#### 07.10.2024 |
|||
#### Version 18.0.1.0.0 |
|||
##### ADD |
|||
- Initial Commit for Advanced Sales Reports |
|||
|
@ -0,0 +1,94 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Template for invoice analysis report --> |
|||
<template id="invoice_analysis_view"> |
|||
<t t-call="web.html_container"> |
|||
<t t-call="web.external_layout"> |
|||
<t class="page"> |
|||
<div class="oe_structure"/> |
|||
<center> |
|||
<b> |
|||
<h3>Invoice Analysis Report</h3> |
|||
</b> |
|||
</center> |
|||
<t t-if="start_date and end_date"> |
|||
<center> |
|||
<span t-esc="start_date"/> |
|||
To |
|||
<span t-esc="end_date"/> |
|||
</center> |
|||
</t> |
|||
<t t-foreach="partner_id" t-as="partner"> |
|||
<center> |
|||
<b> |
|||
<span t-esc="partner['name']"/> |
|||
</b> |
|||
</center> |
|||
<br/> |
|||
<t t-set="t_invoiced" t-value="0"/> |
|||
<t t-set="t_paid" t-value="0"/> |
|||
<t t-set="t_due" t-value="0"/> |
|||
<table class="table table-condensed"> |
|||
<thead> |
|||
<tr> |
|||
<th>Order Number</th> |
|||
<th>Order Date</th> |
|||
<th>Invoice Number</th> |
|||
<th>Invoice Date</th> |
|||
<th>Amount Invoiced</th> |
|||
<th>Amount Paid</th> |
|||
<th>Amount Due</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr t-foreach="form" t-as="order"> |
|||
<t t-if="order['partner_id'] == partner['id']"> |
|||
<td> |
|||
<span t-esc="order['so']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['order_date']" |
|||
t-options='{"widget": "date"}'/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['invoice']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['date']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['invoiced']"/> |
|||
<t t-set="t_invoiced" t-value="t_invoiced + order['invoiced']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['paid']"/> |
|||
<t t-set="t_paid" t-value="t_paid + order['paid']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['due']"/> |
|||
<t t-set="t_due" t-value="t_due + order['due']"/> |
|||
</td> |
|||
</t> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
<span>Total invoiced</span> |
|||
<t t-esc="t_invoiced"/> |
|||
</td> |
|||
<td> |
|||
<span>Total paid:</span> |
|||
<t t-esc="t_paid"/> |
|||
</td> |
|||
<td> |
|||
<span>Total due:</span> |
|||
<t t-esc="t_due"/> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
</odoo> |
@ -0,0 +1,46 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Actions for pdf report --> |
|||
<record id="action_sale_report" model="ir.actions.report"> |
|||
<field name="name">Sales</field> |
|||
<field name="model">sale.report.advance</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">sale_report_advanced.sale_report_view</field> |
|||
<field name="report_file">sale_report_advanced.sale_report_view</field> |
|||
</record> |
|||
<record id="action_invoice_analysis" model="ir.actions.report"> |
|||
<field name="name">Invoice Analysis</field> |
|||
<field name="model">sale.report.invoice</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">sale_report_advanced.invoice_analysis_view</field> |
|||
<field name="report_file">sale_report_advanced.invoice_analysis_view</field> |
|||
</record> |
|||
<record id="action_sale_category" model="ir.actions.report"> |
|||
<field name="name">Sales Category</field> |
|||
<field name="model">sale.report.category</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">sale_report_advanced.sales_category_view</field> |
|||
<field name="report_file">sale_report_advanced.sales_category_view</field> |
|||
</record> |
|||
<record id="action_sale_indent" model="ir.actions.report"> |
|||
<field name="name">Product Sales Indent</field> |
|||
<field name="model">sale.report.indent</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">sale_report_advanced.sales_indent_view</field> |
|||
<field name="report_file">sale_report_advanced.sales_indent_view</field> |
|||
</record> |
|||
<record id="action_sales_analysis" model="ir.actions.report"> |
|||
<field name="name">Sales Analysis Report</field> |
|||
<field name="model">sale.report.analysis</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">sale_report_advanced.sales_analysis_view</field> |
|||
<field name="report_file">sale_report_advanced.sales_analysis_view</field> |
|||
</record> |
|||
<record id="action_sales_weekly" model="ir.actions.report"> |
|||
<field name="name">Hourly Sales Report</field> |
|||
<field name="model">sale.report.weekly</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">sale_report_advanced.sales_hourly_view</field> |
|||
<field name="report_file">sale_report_advanced.sales_hourly_view</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,337 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Template for sale report --> |
|||
<template id="sale_report_view"> |
|||
<t t-call="web.html_container"> |
|||
<t t-call="web.external_layout"> |
|||
<t class="page"> |
|||
<div class="oe_structure"/> |
|||
<center> |
|||
<b> |
|||
<h3>Sales Profit Report</h3> |
|||
</b> |
|||
</center> |
|||
<t t-if="start_date and end_date"> |
|||
<center> |
|||
<span t-esc="start_date"/> |
|||
To |
|||
<span t-esc="end_date"/> |
|||
</center> |
|||
</t> |
|||
<t t-if="type=='customer'"> |
|||
<t t-foreach="partner_id" t-as="partner"> |
|||
<center> |
|||
<b> |
|||
<span t-esc="partner['name']"/> |
|||
</b> |
|||
</center> |
|||
<t t-set="t_cost" t-value="0"/> |
|||
<t t-set="t_price" t-value="0"/> |
|||
<t t-set="t_profit" t-value="0"/> |
|||
<t t-set="t_margin" t-value="0"/> |
|||
<br/> |
|||
<table class="table table-condensed"> |
|||
<thead> |
|||
<tr> |
|||
<th>Order</th> |
|||
<th>Date</th> |
|||
<th>Product</th> |
|||
<th>Quantity</th> |
|||
<th>Cost</th> |
|||
<th>Sale Price</th> |
|||
<th>Profit</th> |
|||
<th>Margin(%)</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr t-foreach="form" t-as="order"> |
|||
<t t-if="order['partner_id'] == partner['id']"> |
|||
<td> |
|||
<span t-esc="order['sequence']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['date']" |
|||
t-options='{"widget": "date"}'/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['product']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['quantity']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['cost']"/> |
|||
<t t-set="t_cost" t-value="t_cost + order['cost']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['price']"/> |
|||
<t t-set="t_price" t-value="t_price + order['price']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['profit']"/> |
|||
<t t-set="t_profit" t-value="t_profit + order['profit']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['margin']"/> |
|||
<t t-set="t_margin" t-value="t_margin + order['margin']"/> |
|||
</td> |
|||
</t> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
<span>Total cost</span> |
|||
<t t-esc="t_cost"/> |
|||
</td> |
|||
<td> |
|||
<span>Total Price:</span> |
|||
<t t-esc="t_price"/> |
|||
</td> |
|||
<td> |
|||
<span>Total Profit:</span> |
|||
<t t-esc="t_profit"/> |
|||
</td> |
|||
<td> |
|||
<span>Total margin:</span> |
|||
<t t-esc="t_margin"/> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</t> |
|||
</t> |
|||
<t t-if="type=='product'"> |
|||
<t t-foreach="product_id" t-as="product"> |
|||
<center> |
|||
<b> |
|||
<span t-esc="product['name']"/> |
|||
</b> |
|||
</center> |
|||
<t t-set="t_cost" t-value="0"/> |
|||
<t t-set="t_price" t-value="0"/> |
|||
<t t-set="t_profit" t-value="0"/> |
|||
<t t-set="t_margin" t-value="0"/> |
|||
<br/> |
|||
<table class="table table-condensed"> |
|||
<thead> |
|||
<tr> |
|||
<th>Order</th> |
|||
<th>Date</th> |
|||
<th>Customer</th> |
|||
<th>Quantity</th> |
|||
<th>Cost</th> |
|||
<th>Sale Price</th> |
|||
<th>Profit</th> |
|||
<th>Margin(%)</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr t-foreach="form" t-as="order"> |
|||
<t t-if="order['product_id'] == product['id']"> |
|||
<td> |
|||
<span t-esc="order['sequence']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['date']" |
|||
t-options='{"widget": "date"}'/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['partner']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['quantity']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['cost']"/> |
|||
<t t-set="t_cost" t-value="t_cost + order['cost']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['price']"/> |
|||
<t t-set="t_price" t-value="t_price + order['price']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['profit']"/> |
|||
<t t-set="t_profit" t-value="t_profit + order['profit']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['margin']"/> |
|||
<t t-set="t_margin" t-value="t_margin + order['margin']"/> |
|||
</td> |
|||
</t> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
<span>Total cost</span> |
|||
<t t-esc="t_cost"/> |
|||
</td> |
|||
<td> |
|||
<span>Total Price:</span> |
|||
<t t-esc="t_price"/> |
|||
</td> |
|||
<td> |
|||
<span>Total Profit:</span> |
|||
<t t-esc="t_profit"/> |
|||
</td> |
|||
<td> |
|||
<span>Total margin:</span> |
|||
<t t-esc="t_margin"/> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</t> |
|||
</t> |
|||
<t t-if="type=='both'"> |
|||
<table class="table table-condensed"> |
|||
<t t-set="t_cost" t-value="0"/> |
|||
<t t-set="t_price" t-value="0"/> |
|||
<t t-set="t_profit" t-value="0"/> |
|||
<t t-set="t_margin" t-value="0"/> |
|||
<thead> |
|||
<tr> |
|||
<th>Order</th> |
|||
<th>Date</th> |
|||
<th>Customer</th> |
|||
<th>Product</th> |
|||
<th>Quantity</th> |
|||
<th>Cost</th> |
|||
<th>Sale Price</th> |
|||
<th>Profit</th> |
|||
<th>Margin(%)</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr t-foreach="form" t-as="order"> |
|||
<td> |
|||
<span t-esc="order['sequence']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['date']" |
|||
t-options='{"widget": "date"}'/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['partner']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['product']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['quantity']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['cost']"/> |
|||
<t t-set="t_cost" t-value="t_cost + order['cost']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['price']"/> |
|||
<t t-set="t_price" t-value="t_price + order['price']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['profit']"/> |
|||
<t t-set="t_profit" t-value="t_profit + order['profit']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['margin']"/> |
|||
<t t-set="t_margin" t-value="t_margin + order['margin']"/> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
<span>Total cost</span> |
|||
<t t-esc="t_cost"/> |
|||
</td> |
|||
<td> |
|||
<span>Total Price:</span> |
|||
<t t-esc="t_price"/> |
|||
</td> |
|||
<td> |
|||
<span>Total Profit:</span> |
|||
<t t-esc="t_profit"/> |
|||
</td> |
|||
<td> |
|||
<span>Total margin:</span> |
|||
<t t-esc="t_margin"/> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</t> |
|||
<t t-if="no_value == True"> |
|||
<table class="table table-condensed"> |
|||
<t t-set="t_cost" t-value="0"/> |
|||
<t t-set="t_price" t-value="0"/> |
|||
<t t-set="t_profit" t-value="0"/> |
|||
<t t-set="t_margin" t-value="0"/> |
|||
<thead> |
|||
<tr> |
|||
<th>Order</th> |
|||
<th>Date</th> |
|||
<th>Customer</th> |
|||
<th>Product</th> |
|||
<th>Quantity</th> |
|||
<th>Cost</th> |
|||
<th>Sale Price</th> |
|||
<th>Profit</th> |
|||
<th>Margin(%)</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr t-foreach="form" t-as="order" t-key="order"> |
|||
<td> |
|||
<span t-esc="order['sequence']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['date']" |
|||
t-options='{"widget": "date"}'/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['partner']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['product']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['quantity']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['cost']"/> |
|||
<t t-set="t_cost" t-value="t_cost + order['cost']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['price']"/> |
|||
<t t-set="t_price" t-value="t_price + order['price']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['profit']"/> |
|||
<t t-set="t_profit" t-value="t_profit + order['profit']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['margin']"/> |
|||
<t t-set="t_margin" t-value="t_margin + order['margin']"/> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
<span>Total cost</span> |
|||
<t t-esc="t_cost"/> |
|||
</td> |
|||
<td> |
|||
<span>Total Price:</span> |
|||
<t t-esc="t_price"/> |
|||
</td> |
|||
<td> |
|||
<span>Total Profit:</span> |
|||
<t t-esc="t_profit"/> |
|||
</td> |
|||
<td> |
|||
<span>Total margin:</span> |
|||
<t t-esc="t_margin"/> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
</odoo> |
@ -0,0 +1,168 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Template for sale analysis --> |
|||
<template id="sales_analysis_view"> |
|||
<t t-call="web.html_container"> |
|||
<t t-call="web.external_layout"> |
|||
<style> |
|||
</style> |
|||
<t class="page"> |
|||
<div class="oe_structure"/> |
|||
<center> |
|||
<b> |
|||
<h3>Sales Analysis Report</h3> |
|||
</b> |
|||
</center> |
|||
<t t-if="start_date and end_date"> |
|||
<center> |
|||
<span t-esc="start_date"/> |
|||
To |
|||
<span t-esc="end_date"/> |
|||
</center> |
|||
</t> |
|||
<t t-foreach="partner_id" t-as="partner"> |
|||
<center> |
|||
<b> |
|||
<span t-esc="partner['name']" style="font-size:22px;"/> |
|||
</b> |
|||
</center> |
|||
<t t-if="type =='sale'"> |
|||
<t t-set="t_amt" t-value="0"/> |
|||
<t t-set="t_paid" t-value="0"/> |
|||
<t t-set="t_balance" t-value="0"/> |
|||
<table class="table table-condensed"> |
|||
<thead> |
|||
<tr> |
|||
<th>Order Number</th> |
|||
<th>Order Date</th> |
|||
<th>Sales Person</th> |
|||
<th>Sales Amount</th> |
|||
<th>Amount Paid</th> |
|||
<th>Balance</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr t-foreach="form" t-as="order"> |
|||
<t t-if="order['partner_id'] == partner['id']"> |
|||
<td> |
|||
<span t-esc="order['so']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['date']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['sales_person']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['s_amt']"/> |
|||
<t t-set="t_amt" t-value="t_amt + order['s_amt']"/> |
|||
|
|||
</td> |
|||
<td> |
|||
<span t-esc="order['p_amt']"/> |
|||
<t t-set="t_paid" t-value="t_paid + order['p_amt']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['balance']"/> |
|||
<t t-set="t_balance" t-value="t_balance + order['balance']"/> |
|||
</td> |
|||
</t> |
|||
</tr> |
|||
<tr> |
|||
<td colsapn="3"> |
|||
<span>Total Amount</span> |
|||
<t t-esc="t_amt"/> |
|||
</td> |
|||
<td> |
|||
<span>Total Paid:</span> |
|||
<t t-esc="t_paid"/> |
|||
</td> |
|||
<td> |
|||
<span>Total Balance:</span> |
|||
<t t-esc="t_balance"/> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</t> |
|||
<t t-else=""> |
|||
<t t-set="t_total" t-value="0"/> |
|||
<t t-set="t_price" t-value="0"/> |
|||
<t t-set="t_disc" t-value="0"/> |
|||
<t t-set="t_qty" t-value="0"/> |
|||
<table class="table table-condensed"> |
|||
<thead> |
|||
<tr> |
|||
<th>Order</th> |
|||
<th>Date</th> |
|||
<th>Product</th> |
|||
<th>Quantity</th> |
|||
<th>price</th> |
|||
<th>Discount(%)</th> |
|||
<th>Tax(%)</th> |
|||
<th>Subtotal</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr t-foreach="form" t-as="order"> |
|||
<t t-if="order['partner_id'] == partner['id']"> |
|||
<td> |
|||
<span t-esc="order['so']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['date']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['product_id']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['quantity']"/> |
|||
<t t-set="t_qty" t-value="t_qty + order['quantity']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['price']"/> |
|||
<t t-set="t_price" t-value="t_price + order['price']"/> |
|||
|
|||
</td> |
|||
<td> |
|||
<span t-esc="order['discount']"/> |
|||
<t t-set="t_disc" t-value="t_disc + order['discount']"/> |
|||
|
|||
</td> |
|||
<td> |
|||
<span t-esc="order['tax']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['total']"/> |
|||
<t t-set="t_total" t-value="t_total + order['total']"/> |
|||
|
|||
</td> |
|||
</t> |
|||
</tr> |
|||
<tr> |
|||
<td colsapn="3"> |
|||
<span>Total Quantity</span> |
|||
<t t-esc="t_qty"/> |
|||
</td> |
|||
<td> |
|||
<span>Total Price:</span> |
|||
<t t-esc="t_price"/> |
|||
</td> |
|||
<td> |
|||
<span>Total Discount:</span> |
|||
<t t-esc="t_disc"/> |
|||
</td> |
|||
<td> |
|||
<span>Subtotal</span> |
|||
<t t-esc="t_total"/> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
</odoo> |
@ -0,0 +1,109 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Template for sale category pdf report --> |
|||
<template id="sales_category_view"> |
|||
<t t-call="web.html_container"> |
|||
<t t-call="web.external_layout"> |
|||
<t class="page"> |
|||
<div class="oe_structure"/> |
|||
<center> |
|||
<b> |
|||
<h3>Sales category Report</h3> |
|||
</b> |
|||
</center> |
|||
<t t-if="start_date and end_date"> |
|||
<center> |
|||
<span t-esc="start_date"/> |
|||
To |
|||
<span t-esc="end_date"/> |
|||
</center> |
|||
</t> |
|||
<t t-if="categ_id"> |
|||
<t t-foreach="categ_id" t-as="categ"> |
|||
<center> |
|||
<b> |
|||
<span t-esc="categ['name']"/> |
|||
</b> |
|||
</center> |
|||
<br/> |
|||
<t t-set="t_qty" t-value="0"/> |
|||
<t t-set="t_price" t-value="0"/> |
|||
<t t-set="t_total" t-value="0"/> |
|||
<t t-set="t_subtotal" t-value="0"/> |
|||
<table class="table table-condensed"> |
|||
<thead> |
|||
<tr> |
|||
<th>Order</th> |
|||
<th>Date</th> |
|||
<th>Product</th> |
|||
<th>Quantity</th> |
|||
<th>UOM</th> |
|||
<th>Price</th> |
|||
<th>Tax(%)</th> |
|||
<th>Subtotal</th> |
|||
<th>Total</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr t-foreach="form" t-as="order"> |
|||
<t t-if="order['category_id'] == categ['id']"> |
|||
<td> |
|||
<span t-esc="order['so']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['date']" t-options='{"widget": "date"}'/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['product_id']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['quantity']"/> |
|||
<t t-set="t_qty" t-value="t_qty + order['quantity']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['uom']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['price']"/> |
|||
<t t-set="t_price" t-value="t_price + order['price']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['tax']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['subtotal']"/> |
|||
<t t-set="t_subtotal" t-value="t_subtotal + order['subtotal']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['total']"/> |
|||
<t t-set="t_total" t-value="t_total + order['total']"/> |
|||
</td> |
|||
</t> |
|||
</tr> |
|||
<tr> |
|||
<td colsapn="3"> |
|||
<span>Total Quantity</span> |
|||
<t t-esc="t_qty"/> |
|||
</td> |
|||
<td> |
|||
<span>Total Price:</span> |
|||
<t t-esc="t_price"/> |
|||
</td> |
|||
<td> |
|||
<span>Total Subtotal:</span> |
|||
<t t-esc="t_subtotal"/> |
|||
</td> |
|||
<td> |
|||
<span>Total Total:</span> |
|||
<t t-esc="t_total"/> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
</odoo> |
@ -0,0 +1,59 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Template for sale indent report --> |
|||
<template id="sales_indent_view"> |
|||
<t t-call="web.html_container"> |
|||
<t t-call="web.external_layout"> |
|||
<t class="page"> |
|||
<div class="oe_structure"/> |
|||
<center> |
|||
<b> |
|||
<h3>Product Sales Indent Report</h3> |
|||
</b> |
|||
</center> |
|||
<t t-if="start_date and end_date"> |
|||
<center> |
|||
<span t-esc="start_date"/> |
|||
To |
|||
<span t-esc="end_date"/> |
|||
</center> |
|||
</t> |
|||
<t t-foreach="partner_id" t-as="partner"> |
|||
<center> |
|||
<b> |
|||
<span t-esc="partner['name']" style="font-size:22px;"/> |
|||
</b> |
|||
</center> |
|||
<t t-foreach="categ_id" t-as="categ"> |
|||
<center> |
|||
<b> |
|||
<span t-esc="categ['name']" style="font-size:17px;"/> |
|||
</b> |
|||
</center> |
|||
<table class="table table-condensed"> |
|||
<thead> |
|||
<tr> |
|||
<th>Product</th> |
|||
<th>Quantity</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr t-foreach="form" t-as="order"> |
|||
<t t-if="order['category_id'] == categ['id'] and order['partner_id'] == partner['id']"> |
|||
<td> |
|||
<span t-esc="order['product_id']"/> |
|||
</td> |
|||
<td> |
|||
<span t-esc="order['quantity']"/> |
|||
</td> |
|||
</t> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
</odoo> |
@ -0,0 +1,67 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Template sales hourly report --> |
|||
<template id="sales_hourly_view"> |
|||
<t t-call="web.html_container"> |
|||
<t t-call="web.external_layout"> |
|||
<style> |
|||
</style> |
|||
<t class="page"> |
|||
<div class="oe_structure"/> |
|||
<center> |
|||
<b> |
|||
<h3>Hourly Sales Report</h3> |
|||
</b> |
|||
</center> |
|||
<t t-foreach="times" t-as="t" t-key="t"> |
|||
<t t-log="t"/> |
|||
<center> |
|||
<b> |
|||
<t t-out="t" style="font-size:21px;"/> |
|||
</b> |
|||
</center> |
|||
<t t-set="t_amt" t-value="0"/> |
|||
<table class="table table-condensed"> |
|||
<thead> |
|||
<tr> |
|||
<th>Order Number</th> |
|||
<th>Order Date</th> |
|||
<t t-if="type=='untax'"> |
|||
<th>Untaxed Total</th> |
|||
</t> |
|||
<t t-else=""> |
|||
<th>Total</th> |
|||
</t> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr t-foreach="form" t-as="order" t-key="order"> |
|||
<t t-if="order['time'] == t"> |
|||
<td> |
|||
<t t-esc="order['order']"/> |
|||
</td> |
|||
<td> |
|||
<t t-esc="order['date']"/> |
|||
</td> |
|||
<td> |
|||
<t t-esc="order['amount']"/> |
|||
<t t-set="t_amt" t-value="t_amt + order['amount']"/> |
|||
</td> |
|||
</t> |
|||
</tr> |
|||
<tr> |
|||
<td colsapn="3"> |
|||
<b> |
|||
<span>Total Amount</span> |
|||
</b> |
|||
<t t-esc="t_amt"/> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
</odoo> |
|
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 628 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 738 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 912 KiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 179 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 128 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 103 KiB |