18 changed files with 710 additions and 0 deletions
@ -0,0 +1,17 @@ |
|||
Top/Least Selling Product Report v12 |
|||
==================================== |
|||
Top Selling and Least Selling Product Reports |
|||
|
|||
Installation |
|||
============ |
|||
- www.odoo.com/documentation/12.0/setup/install.html |
|||
- Install our custom addon |
|||
|
|||
Configuration |
|||
============= |
|||
|
|||
No additional configurations needed |
|||
|
|||
Credits |
|||
======= |
|||
Developer: Ajmal JK @ cybrosys, Contact: odoo@cybrosys.com |
@ -0,0 +1,3 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from . import wizard |
|||
from . import report |
@ -0,0 +1,25 @@ |
|||
# -*- coding: utf-8 -*- |
|||
{ |
|||
'name': 'Top/Least Selling Product Report', |
|||
'version': '12.0.1.0.0', |
|||
'summary': 'Top Selling and Least Selling Product Reports', |
|||
'description': 'Top Selling Products,Fast Moving Products,Most Selling Products,Top Growing Products,Least Selling Products,', |
|||
'author': 'Cybrosys Techno solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'website': 'https://www.cybrosys.com', |
|||
'depends': ['base','sale_management','stock','sale'], |
|||
'category': 'Sale', |
|||
'demo': [], |
|||
'data': ['wizard/top_selling_wizard.xml', |
|||
'report/top_selling_report.xml', |
|||
'report/top_selling_report_template.xml'], |
|||
'installable': True, |
|||
'images': ['static/description/banner.png'], |
|||
'qweb': [], |
|||
'license': 'AGPL-3', |
|||
'demo': [], |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': False, |
|||
} |
@ -0,0 +1,6 @@ |
|||
## Module <top_selling_product_report> |
|||
|
|||
#### 20.04.2019 |
|||
#### Version 12.0.1.0.0 |
|||
##### ADD |
|||
- Initial commit for Top Selling Product Report |
@ -0,0 +1,2 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from . import top_selling_report |
@ -0,0 +1,96 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from odoo import models |
|||
from datetime import timedelta, datetime, date |
|||
from dateutil.relativedelta import relativedelta |
|||
import dateutil.relativedelta |
|||
|
|||
|
|||
class CustomReport(models.AbstractModel): |
|||
_name = "report.top_selling_product_report.top_selling_reports" |
|||
|
|||
def _get_report_values(self, docids, data=None): |
|||
|
|||
limit_value = data['period'] if data['period'] else None |
|||
date_option = data['date'] |
|||
date_selected_from = None |
|||
date_selected = None |
|||
date_selected_to = None |
|||
other_details = {} |
|||
|
|||
company_id = data['company'] |
|||
warehouse_id = data['warehouse'] |
|||
|
|||
from_date = date.today() - dateutil.relativedelta.relativedelta(years=100) |
|||
to_date = date.today() + dateutil.relativedelta.relativedelta(days=1) |
|||
|
|||
if date_option == 'days': |
|||
|
|||
from_date = date.today() - dateutil.relativedelta.relativedelta(days=11) |
|||
to_date = date.today() + dateutil.relativedelta.relativedelta(days=1) |
|||
date_selected = "Last 10 Days" |
|||
|
|||
elif date_option == 'last_month': |
|||
|
|||
date_limit = date.today() - dateutil.relativedelta.relativedelta(months=1) |
|||
from_date = date_limit.replace(day=1) |
|||
to_date = (date_limit + relativedelta(months=1, day=1)) - timedelta(1) |
|||
date_selected = "Last Month" |
|||
|
|||
elif date_option == 'curr_month': |
|||
|
|||
from_date = date.today().replace(day=1) |
|||
to_date = date.today() + dateutil.relativedelta.relativedelta(days=1) |
|||
date_selected = "Current Month" |
|||
|
|||
elif date_option == 'last_year': |
|||
|
|||
date_limit = date.today() - dateutil.relativedelta.relativedelta(years=1) |
|||
from_date = date_limit.replace(day=1) |
|||
to_date = (date_limit + relativedelta(months=12, day=1)) - timedelta(1) |
|||
date_selected = "Last Year" |
|||
|
|||
elif date_option == 'curr_year': |
|||
|
|||
date_limit = date.today() - dateutil.relativedelta.relativedelta(years=1) |
|||
from_date = date.today().replace(month=1,day=1) |
|||
to_date = date.today() + dateutil.relativedelta.relativedelta(days=1) |
|||
date_selected = "Current Year" |
|||
|
|||
elif date_option == 'select_period': |
|||
|
|||
from_date = data['from_date'] |
|||
to_date = data['to_date'] |
|||
date_selected_from = from_date |
|||
date_selected_to = to_date |
|||
|
|||
other_details.update({ |
|||
|
|||
'limit': limit_value, |
|||
'least': data['least'], |
|||
'range': date_selected, |
|||
'date_selected_from': date_selected_from, |
|||
'date_selected_to': date_selected_to , |
|||
}) |
|||
|
|||
cr = self._cr |
|||
order = 'asc' if data['least'] else 'desc' |
|||
company_id = str(tuple(company_id)) if len(company_id) > 1 else "("+str(company_id[0])+")" |
|||
warehouse_id = str(tuple(warehouse_id)) if len(warehouse_id) > 1 else "("+str(warehouse_id[0])+")" |
|||
limit_clause = " limit'%s'"%limit_value if limit_value else "" |
|||
|
|||
query = ("""select sl.name as product_name,sum(product_uom_qty),pu.name from sale_order_line sl |
|||
JOIN sale_order so ON sl.order_id = so.id |
|||
JOIN uom_uom pu on sl.product_uom = pu.id |
|||
where so.date_order::DATE >= '%s'::DATE and |
|||
so.date_order::DATE <= '%s'::DATE and |
|||
sl.state = 'sale' and so.company_id in %s |
|||
and so.warehouse_id in %s |
|||
group by sl.name,pu.name order by sum %s""" % (from_date, to_date, company_id, warehouse_id, order)) + limit_clause |
|||
cr.execute(query) |
|||
dat = cr.dictfetchall() |
|||
|
|||
return{ |
|||
'data': dat, |
|||
'other': other_details, |
|||
} |
|||
|
@ -0,0 +1,10 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
|
|||
<report id="top_selling_pdf" |
|||
string="Top Selling Product Report" |
|||
model="top.selling" |
|||
report_type="qweb-pdf" |
|||
file="top_selling_product_report.top_selling_reports" |
|||
name="top_selling_product_report.top_selling_reports" /> |
|||
</odoo> |
@ -0,0 +1,95 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<template id="top_selling_reports"> |
|||
<t t-call="web.html_container"> |
|||
<t t-call="top_selling_product_report.internal_layout"> |
|||
<div class="page"> |
|||
<div class="oe_structure"/> |
|||
<center> |
|||
<t t-if="other['least']"> |
|||
<h2 style="color: #000;">Least Selling Products</h2> |
|||
</t> |
|||
<t t-if="not other['least']"> |
|||
<h2 style="color: #000;">Top Selling Products</h2> |
|||
</t> |
|||
</center> |
|||
<div class="oe_structure"/> |
|||
<br /> |
|||
<span> |
|||
<t t-if="other['range']"> |
|||
<b>Top Product of :</b> <t t-esc="other['range']"/><br /> |
|||
</t> |
|||
<t t-if="other['date_selected_from']"> |
|||
<b>Top Product of :</b> <t t-esc="other['date_selected_from']"/> To <t t-esc="other['date_selected_to']"/><br /> |
|||
</t> |
|||
<t t-if="other['limit']"> |
|||
<b>Product Range :</b> <t t-esc="other['limit']"/> Products<br /> |
|||
</t> |
|||
</span> |
|||
</div> |
|||
<br /> |
|||
<table class="table table-bordered" style="border: 1px solid #000;"> |
|||
<tbody> |
|||
<tr> |
|||
<th style="text-align: center;color: #000;text-color: #000;">Product</th> |
|||
<th style="text-align: center;color: #000;text-color: #000;">Sold Quantity</th> |
|||
<th style="text-align: center;color: #000;text-color: #000;">UoM</th> |
|||
</tr> |
|||
<tr t-foreach="data" t-as="value"> |
|||
<td style="height:5px;color: #000;text-color: #000"><t t-esc="value['product_name']"/></td> |
|||
<td style="height:5px;text-align: center;color: #000;text-color: #000;"><t t-esc="value['sum']"/></td> |
|||
<td style="height:5x;text-align: center;color: #000;text-color: #000;"><t t-esc="value['name']"/></td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
<template id="internal_layout"> |
|||
<t t-if="not o and doc"> |
|||
<t t-set="o" t-value="doc"/> |
|||
</t> |
|||
|
|||
<t t-if="o and 'company_id' in o"> |
|||
<t t-set="company" t-value="o.company_id.sudo()"/> |
|||
</t> |
|||
<t t-if="not o or not 'company_id' in o"> |
|||
<t t-set="company" t-value="res_company"/> |
|||
</t> |
|||
<div class="header o_boxed_header"> |
|||
<div class="row mb8"> |
|||
<div class="col-xs-6"> |
|||
<img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % to_text(company.logo)"/> |
|||
</div> |
|||
<div class="col-xs-6 text-right mb4"> |
|||
<h4 class="mt0" t-field="company.report_header"/> |
|||
<div name="company_address" class="mb4"> |
|||
<span style="color: #000;font-color:#000000;" class="company_address" t-field="company.partner_id" |
|||
t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div style="border-bottom: 1px solid black;"/> |
|||
</div> |
|||
<div class="article o_report_layout_background"> |
|||
<t t-raw="0" /> |
|||
</div> |
|||
<div class="footer"> |
|||
<div class="text-center" style="border-top: 1px solid black;"> |
|||
<ul class="list-inline mb4"> |
|||
<li t-if="company.phone">Phone: <span t-field="company.phone"/></li> |
|||
<li t-if="company.email">Email: <span t-field="company.email"/></li> |
|||
<li t-if="company.website">Web: <span t-field="company.website"/></li> |
|||
<li t-if="company.vat"><t t-esc="company.country_id.vat_label or 'TIN'"/>: <span t-field="company.vat"/></li> |
|||
</ul> |
|||
<div name="financial_infos"> |
|||
<span t-field="company.report_footer"/> |
|||
</div> |
|||
<div class="text-muted"> |
|||
Page: <span class="page"/> / <span class="topage"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
</odoo> |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 36 KiB |
@ -0,0 +1,359 @@ |
|||
|
|||
<section class="oe_container" style="background-image:url(https://www.cybrosys.com/images/odoo-index-header-banner.png);background-repeat:no-repeat;background-size:100%;padding: 4% 0% 2% 15%;background-position-y: -107px;"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan" style="font-size: 35px;color: #fff;font-weight: 900;text-transform: uppercase;text-align: left;margin: 0;margin-bottom: 16px;"> |
|||
Top/Least Selling Product Report |
|||
</h2> |
|||
<h3 class="oe_slogan" style="font-size: 25px;color: #fff;font-weight: 600;text-align: left;opacity: 1;margin: 0 !important;"> |
|||
Top Selling and Least Selling Product Reports |
|||
</h3> |
|||
<h5 class="oe_slogan" style="text-align: left;background: #fff;width: 293px;padding: 10px;color: #080808 !important;opacity: 1 !important;font-weight: 600;font-size: 20px;"> |
|||
<a style="color: #080808 !important;" href="https://www.cybrosys.com" target="_blank">Cybrosys Technologies</a> |
|||
</h5> |
|||
<a style="color: #080808 !important;" href="https://www.cybrosys.com" target="_blank"> |
|||
<div style="width: 215px;margin-left: 57%;text-align: center;background: #ffffff;height: 215px;border-radius: 100%;display: flex;justify-content: center;align-items: center;box-shadow: 0 0 12px 4px #00000059;"> |
|||
<img src="https://www.cybrosys.com/images/cybro-logo-oca.png" alt="cybrosys technologies" style="width: 136px;"/> </div> |
|||
</a> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container" style="padding: 1% 0% 3% 15%;"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;"> |
|||
Overview |
|||
</h2> |
|||
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;"> |
|||
This module helps in generating top selling and least selling product pdf reports. One can generate top/least selling product report |
|||
according to the company and warehouse for range of period. |
|||
</h3> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container" style="background-image:url(https://www.cybrosys.com/images/odoo-index-banner1.png); background-repeat:no-repeat; background-size:cover;padding: 10% 0% 10% 15%;"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;"> |
|||
Features |
|||
</h2> |
|||
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;"> |
|||
<img src="https://www.cybrosys.com/images/ico-tick.png"> |
|||
Generates top/least selling product report. |
|||
</h3> |
|||
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;"> |
|||
<img src="https://www.cybrosys.com/images/ico-tick.png"> |
|||
Generates reports for certain time periods. |
|||
</h3> |
|||
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;"> |
|||
<img src="https://www.cybrosys.com/images/ico-tick.png"> |
|||
Report for a range of product. |
|||
</h3> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;"> |
|||
Screenshots |
|||
</h2> |
|||
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;"> |
|||
When you install this module, an extra menu named Top/Least Selling Product is created. |
|||
</h3> |
|||
<div class="oe_row oe_spaced"> |
|||
<img src="top-selling-product-report1.gif" alt="" style="width: 95%;"/> |
|||
</div> |
|||
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;"> |
|||
|
|||
Go to <b>Sales</b> --> <b>Reporting</b> --> <b>Top/Least Selling Product</b>.<br> |
|||
A wizard will be opened once the user clicks on it..<br> |
|||
<img src="https://www.cybrosys.com/images/ico-tick.png"> |
|||
Choose companies and warehouses for generating report. <br> |
|||
<img src="https://www.cybrosys.com/images/ico-tick.png"> |
|||
Select a time period from 'Top Selling product of' selection field.<br> |
|||
<img src="https://www.cybrosys.com/images/ico-tick.png"> |
|||
Select 'Least Selling Product' to generate least selling product report.<br> |
|||
</h3> |
|||
<div class="oe_row oe_spaced"> |
|||
<img src="top-selling-product-report2.jpg" alt="" style="width: 95%;"/> |
|||
</div> |
|||
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;"> |
|||
|
|||
Click the button <b>Print</b> to least selling product report in PDF format.<br> |
|||
</h3> |
|||
<div class="oe_row oe_spaced"> |
|||
<img src="top-selling-product-report4.png" alt="" style="width: 95%;"/> |
|||
</div> |
|||
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;"> |
|||
<img src="https://www.cybrosys.com/images/ico-tick.png"> |
|||
For 'Top selling product report' deselect 'Least Selling Product'.<br> |
|||
Click the button <b>Print</b> to get top selling product report in PDF format.<br> |
|||
</h3> |
|||
<div class="oe_row oe_spaced"> |
|||
<img src="top-selling-product-report3.png" alt="" style="width: 95%;"/> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
<section class="oe_container" style="padding: 7px 0% 0% 3%;"> |
|||
<div class="oe_row oe_spaced"> |
|||
<a style="color: #080808 !important;" href="https://apps.odoo.com/apps/modules/browse?search=cybrosys" target="_blank"><img src="https://www.cybrosys.com/images/view-more-apps.jpg" alt="cybrosys technologies" style="width: 100%;margin-bottom: 50px;"/></a> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container" style="padding: 1% 0% 0% 3%;"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;"> |
|||
Our Services |
|||
</h2> |
|||
<div style="display:flex;padding-top: 20px;justify-content: space-between;"> |
|||
<div style="flex-basis: 18%;"> |
|||
|
|||
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;"> |
|||
<a href="https://www.cybrosys.com/odoo-customization-and-installation/" target="_blank"> |
|||
<img src="https://www.cybrosys.com/images/odoo-customization.png" style="width: 100%;border-radius: 100%;"/> |
|||
</a> |
|||
</div> |
|||
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;"> |
|||
<a href="https://www.cybrosys.com/odoo-customization-and-installation/" target="_blank"> |
|||
Odoo Customization |
|||
</a> |
|||
</h3> |
|||
|
|||
</div> |
|||
<div style="flex-basis: 18%;"> |
|||
|
|||
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;"> |
|||
<a href="https://www.cybrosys.com/odoo-erp-implementation/" target="_blank"> |
|||
<img src="https://www.cybrosys.com/images/odoo-erp-implementation.png" style="width: 100%;border-radius: 100%;"/> |
|||
</a> |
|||
</div> |
|||
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;"> |
|||
<a href="https://www.cybrosys.com/odoo-erp-implementation/" target="_blank"> |
|||
Odoo Implementation </a> |
|||
</h3> |
|||
|
|||
</div> |
|||
<div style="flex-basis: 18%;"> |
|||
|
|||
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;"> |
|||
<a href="https://www.cybrosys.com/odoo-erp-integration/" target="_blank"> |
|||
<img src="https://www.cybrosys.com/images/odoo-erp-integration.png" style="width: 100%;border-radius: 100%;"/> |
|||
</a> |
|||
</div> |
|||
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;"> |
|||
<a href="https://www.cybrosys.com/odoo-erp-integration/" target="_blank"> |
|||
Odoo Integration |
|||
</a> |
|||
</h3> |
|||
|
|||
</div> |
|||
<div style="flex-basis: 18%;"> |
|||
|
|||
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;"> |
|||
<a href="https://www.cybrosys.com/odoo-erp-support/" target="_blank"> |
|||
<img src="https://www.cybrosys.com/images/odoo-erp-support.png" style="width: 100%;border-radius: 100%;"/> |
|||
</a> |
|||
</div> |
|||
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;"> |
|||
<a href="https://www.cybrosys.com/odoo-erp-support/" target="_blank"> |
|||
Odoo Support</a> |
|||
</h3> |
|||
|
|||
</div> |
|||
<div style="flex-basis: 18%;"> |
|||
|
|||
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;"> |
|||
<a href="https://www.cybrosys.com/hire-odoo-developer/" target="_blank"> |
|||
<img src="https://www.cybrosys.com/images/hire-odoo-developer.png" style="width: 100%;border-radius: 100%;"/> |
|||
</a> |
|||
</div> |
|||
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;"> |
|||
<a href="https://www.cybrosys.com/hire-odoo-developer/" target="_blank"> |
|||
Hire Odoo Developers</a> |
|||
</h3> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
<section class="oe_container" style="padding: 1% 0% 0% 3%;"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;"> |
|||
Our Industries |
|||
</h2> |
|||
<div style="display:flex;justify-content: space-between;flex-wrap:wrap;"> |
|||
<div style="flex-basis: 32%;padding-top: 20px;"> |
|||
|
|||
<div style="width:30%; float:left;"> |
|||
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;"> |
|||
<a href="https://www.cybrosys.com/odoo/industries/best-trading-erp/" target="_blank"> |
|||
<img src="https://www.cybrosys.com/images/odoo-index-industry-1.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div style="width:70%;float:left;"> |
|||
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;"> |
|||
<a href="https://www.cybrosys.com/odoo/industries/best-trading-erp/" target="_blank"> |
|||
Trading |
|||
</a> |
|||
</h3> |
|||
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;"> |
|||
Easily procure and sell your products. |
|||
</h3> |
|||
</div> |
|||
|
|||
</div> |
|||
<div style="flex-basis: 32%;padding-top: 20px;"> |
|||
|
|||
<div style="width:30%; float:left;"> |
|||
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;"> |
|||
<a href="https://www.cybrosys.com/odoo/industries/manufacturing-erp-software/" target="_blank"> |
|||
<img src="https://www.cybrosys.com/images/odoo-index-industry-2.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div style="width:70%;float:left;"> |
|||
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;"> |
|||
<a href="https://www.cybrosys.com/odoo/industries/manufacturing-erp-software/" target="_blank"> |
|||
Manufacturing</a> |
|||
</h3> |
|||
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;"> |
|||
Plan, track and schedule your operations. |
|||
</h3> |
|||
</div> |
|||
|
|||
</div> |
|||
<div style="flex-basis: 32%;padding-top: 20px;"> |
|||
|
|||
<div style="width:30%; float:left;"> |
|||
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;"> |
|||
<a href="https://www.cybrosys.com/odoo/industries/restaurant-management/" target="_blank"> |
|||
<img src="https://www.cybrosys.com/images/odoo-index-industry-3.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div style="width:70%;float:left;"> |
|||
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;"> |
|||
<a href="https://www.cybrosys.com/odoo/industries/restaurant-management/" target="_blank"> |
|||
Restaurant</a> |
|||
</h3> |
|||
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;"> |
|||
Run your bar or restaurant methodical. |
|||
</h3> |
|||
</div> |
|||
|
|||
</div> |
|||
<div style="flex-basis: 32%;padding-top: 20px;"> |
|||
|
|||
<div style="width:30%; float:left;"> |
|||
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;"> |
|||
<a href="https://www.cybrosys.com/odoo/industries/pos/" target="_blank"> |
|||
<img src="https://www.cybrosys.com/images/odoo-index-industry-4.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div style="width:70%;float:left;"> |
|||
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;"> |
|||
<a href="https://www.cybrosys.com/odoo/industries/pos/" target="_blank"> |
|||
POS</a> |
|||
</h3> |
|||
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;"> |
|||
Easy configuring and convivial selling. |
|||
</h3> |
|||
</div> |
|||
|
|||
</div> |
|||
<div style="flex-basis: 32%;padding-top: 20px;"> |
|||
|
|||
<div style="width:30%; float:left;"> |
|||
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;"> |
|||
<a href="https://www.cybrosys.com/odoo/industries/ecommerce-website/" target="_blank"> |
|||
<img src="https://www.cybrosys.com/images/odoo-index-industry-5.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div style="width:70%;float:left;"> |
|||
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 0px;margin-left: 16px;"> |
|||
<a href="https://www.cybrosys.com/odoo/industries/ecommerce-website/" target="_blank"> |
|||
E-commerce & Website</a> |
|||
</h3> |
|||
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;"> |
|||
Mobile friendly, awe-inspiring product pages. |
|||
</h3> |
|||
</div> |
|||
</div> |
|||
<div style="flex-basis: 32%;padding-top: 20px;"> |
|||
|
|||
<div style="width:30%; float:left;"> |
|||
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;"> |
|||
<a href="https://www.cybrosys.com/odoo/industries/hotel-management-erp/" target="_blank"> |
|||
<img src="https://www.cybrosys.com/images/odoo-index-industry-6.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div style="width:70%;float:left;"> |
|||
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;"> |
|||
<a href="https://www.cybrosys.com/odoo/industries/hotel-management-erp/" target="_blank"> |
|||
Hotel Management</a> |
|||
</h3> |
|||
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;"> |
|||
An all-inclusive hotel management application. |
|||
</h3> |
|||
</div> |
|||
</div> |
|||
<div style="flex-basis: 32%;padding-top: 20px;"> |
|||
|
|||
<div style="width:30%; float:left;"> |
|||
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;"> |
|||
<a href="https://www.cybrosys.com/odoo/industries/education-erp-software/" target="_blank"> |
|||
<img src="https://www.cybrosys.com/images/odoo-index-industry-7.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div style="width:70%;float:left;"> |
|||
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;"> |
|||
<a href="https://www.cybrosys.com/odoo/industries/education-erp-software/" target="_blank"> |
|||
Education</a> |
|||
</h3> |
|||
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;"> |
|||
A Collaborative platform for educational management. |
|||
</h3> |
|||
</div> |
|||
</div> |
|||
<div style="flex-basis: 32%;padding-top: 20px;"> |
|||
|
|||
<div style="width:30%; float:left;"> |
|||
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;"> |
|||
<a href="https://www.cybrosys.com/odoo/industries/service-management/" target="_blank"> |
|||
<img src="https://www.cybrosys.com/images/odoo-index-industry-8.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div style="width:70%;float:left;"> |
|||
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;"> |
|||
<a href="https://www.cybrosys.com/odoo/industries/service-management/" target="_blank"> |
|||
Service Management</a> |
|||
</h3> |
|||
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;"> |
|||
Keep track of services and invoice accordingly. |
|||
</h3> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
<section class="oe_container" style="background-image:url(https://www.cybrosys.com/images/odoo-index-footer-bg.png); background-repeat:no-repeat; background-size:100%;padding: 13% 0% 6% 0%;"> |
|||
<div class="oe_slogan" style="margin-top:10px !important;margin-bottom: 0px;"> |
|||
<div> |
|||
<a style="color: #5c5c5c !important;border-radius: 0;background: none;border: none;background: #fff;box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62, 57, 107, 0.05);border-radius: 30px;font-size: 12px;padding: 9px 26px;margin-right: 9px;width: 200px;text-transform: capitalize;" class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" href="mailto:odoo@cybrosys.com"><i class="fa fa-envelope"></i> Email us </a> |
|||
<a style="color: #5c5c5c !important;border-radius: 0;background: none;border: none;background: #fff;box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62, 57, 107, 0.05);border-radius: 30px;font-size: 12px;padding: 9px 26px;margin-right: 9px;width: 200px;text-transform: capitalize;" class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com/contact/"><i class="fa fa-phone"></i> Contact Us </a> |
|||
<a style="color: #5c5c5c !important;border-radius: 0;background: none;border: none;background: #fff;box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62, 57, 107, 0.05);border-radius: 30px;font-size: 12px;padding: 9px 26px;margin-right: 9px;width: 200px;text-transform: capitalize;" class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com/contact/"><i class="fa fa-check-square"></i> Request Customization </a> |
|||
</div> |
|||
<br> |
|||
<img src="https://www.cybrosys.com/images/logo.png" style="width: 190px; margin-bottom: 25px;margin-top: 30px;" class="center-block"> |
|||
<div> |
|||
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td> |
|||
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td> |
|||
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px; ;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td> |
|||
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td> |
|||
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td> |
|||
</div> |
|||
</div> |
|||
</section> |
After Width: | Height: | Size: 123 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 176 KiB |
After Width: | Height: | Size: 197 KiB |
@ -0,0 +1,2 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from . import top_selling_wizard |
@ -0,0 +1,44 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from odoo import fields, api, models |
|||
|
|||
|
|||
class TopSellingWizard(models.TransientModel): |
|||
|
|||
_name = 'top.selling' |
|||
|
|||
from_date = fields.Date(string='From') |
|||
to_date = fields.Date(string='To') |
|||
date = fields.Selection([('days', 'Last 10 Days'), ('curr_month', 'Current Month'), ('last_month', 'Last Month'), |
|||
('curr_year', 'Current Year'), ('last_year', 'Last Year'), ('select_period', 'Select Period')], |
|||
string="Top Selling product of", default='days') |
|||
period = fields.Char(string="Products Range", help="Enter number of products in report.") |
|||
least = fields.Boolean(string="Least Selling Product", default=False) |
|||
company = fields.Many2many('res.company', default=lambda self: self.env.user.company_id, string="Company") |
|||
warehouse = fields.Many2many('stock.warehouse', string="Warehouse") |
|||
|
|||
@api.multi |
|||
def print_report(self): |
|||
|
|||
company_id = [] |
|||
warehouse_id = [] |
|||
|
|||
if self.company: |
|||
for val in self.company: |
|||
company_id.append(val.id) |
|||
else: |
|||
company = self.env['res.company'].search([]) |
|||
for val in company: |
|||
company_id.append(val.id) |
|||
|
|||
if self.warehouse: |
|||
for val in self.warehouse: |
|||
warehouse_id.append(val.id) |
|||
else: |
|||
warehouse = self.env['stock.warehouse'].search([]) |
|||
for val in warehouse: |
|||
warehouse_id.append(val.id) |
|||
|
|||
data = {'date': self.date, 'period': self.period, 'least': self.least, 'from_date': self.from_date, |
|||
'to_date': self.to_date, 'company': company_id, 'warehouse': warehouse_id} |
|||
|
|||
return self.env.ref('top_selling_product_report.top_selling_pdf').report_action(self, data=data) |
@ -0,0 +1,51 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
|
|||
<odoo> |
|||
<record id="top_selling_wizard_report" model="ir.ui.view"> |
|||
<field name="name">Top/Least Selling Products</field> |
|||
<field name="model">top.selling</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Stock Report"> |
|||
<group> |
|||
<group string="Company"> |
|||
<field name="company" widget="many2many_tags"/> |
|||
</group> |
|||
<group string="Warehouses"> |
|||
<field name="warehouse" widget="many2many_tags"/> |
|||
</group> |
|||
<group> |
|||
<field name="date"/> |
|||
<field name="period"/> |
|||
</group> |
|||
<group> |
|||
<field name="from_date" attrs="{'invisible': [('date', '!=', 'select_period')],'required':[('date','=','select_period')]}"/> |
|||
<field name="to_date" attrs="{'invisible': [('date', '!=', 'select_period')],'required':[('date','=','select_period')]}"/> |
|||
</group> |
|||
</group> |
|||
<group> |
|||
<field name="least"/> |
|||
</group> |
|||
|
|||
<footer> |
|||
<button name="print_report" type="object" string="Print" class="oe_highlight"/> |
|||
<button string="Cancel" class="btn btn-default" special="cancel"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="top_selling_wizard" model="ir.actions.act_window"> |
|||
<field name="name">Top/Least Selling Products</field> |
|||
<field name="res_model">top.selling</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">form</field> |
|||
<field name="target">new</field> |
|||
</record> |
|||
|
|||
<menuitem id="top_selling_report" |
|||
name="Top/Least Selling Products" |
|||
parent="sale.menu_sale_report" |
|||
action="top_selling_wizard" |
|||
groups="sales_team.group_sale_manager" |
|||
/> |
|||
</odoo> |
Loading…
Reference in new issue