Bladeren bron

Filtros de los productos más populares

sebas 3 jaren geleden
commit
3eb45e5072
34 gewijzigde bestanden met toevoegingen van 591 en 0 verwijderingen
  1. 6 0
      .gitignore
  2. 2 0
      __init__.py
  3. 43 0
      __openerp__.py
  4. 9 0
      data/top_most_trending_data_view.xml
  5. BIN
      images/icon.png
  6. 6 0
      models/__init__.py
  7. 107 0
      models/product.py
  8. 19 0
      models/purchase.py
  9. 43 0
      models/res_partner.py
  10. 19 0
      models/sale.py
  11. 42 0
      models/stock.py
  12. BIN
      static/description/10_sale_order_filter_top_trending_sold_product.png
  13. BIN
      static/description/11_purchase_order_filter_top_trending_product.png
  14. BIN
      static/description/12_inventory_valuation_by_top_trending_sold_product.png
  15. BIN
      static/description/13_inventory_valuation_by_top_trending_purchase_product.png
  16. BIN
      static/description/14_inventory_valuation_by_top_trending_sold_purchased_product.png
  17. BIN
      static/description/15_top_trending_count.png
  18. BIN
      static/description/1_top_trending_sold_product.png
  19. BIN
      static/description/2_top_trending_purchased_product.png
  20. BIN
      static/description/3_top_trending_sold_purchased_product.png
  21. BIN
      static/description/4_variant_top_trending_sold_product_variant.png
  22. BIN
      static/description/5_top_trending_purchased_product_variant.png
  23. BIN
      static/description/6_top_trending_variant_sold_purchased_product_variant.png
  24. BIN
      static/description/7_customer_filter_top_trending_purchased_product.png
  25. BIN
      static/description/8_customer_filter_top_trending_sold_product.png
  26. BIN
      static/description/9_customer_filter_top_trending_sold_purchased_product.png
  27. BIN
      static/description/contactus.jpg
  28. BIN
      static/description/icon.png
  29. 211 0
      static/description/index.html
  30. 18 0
      views/product_view.xml
  31. 15 0
      views/purchase_view.xml
  32. 18 0
      views/res_partner_view.xml
  33. 15 0
      views/sale_view.xml
  34. 18 0
      views/stock_view.xml

+ 6 - 0
.gitignore

@@ -0,0 +1,6 @@
+.svn
+.settings
+*.project
+*.pyc
+*.pub
+*.*~

+ 2 - 0
__init__.py

@@ -0,0 +1,2 @@
+# -*- coding: utf-8 -*-
+import models

+ 43 - 0
__openerp__.py

@@ -0,0 +1,43 @@
+# -*- coding: utf-8 -*-
+{
+    'name' : 'Odoo Top Trending Product Filters',
+    'version' : '1.0',
+    'summary': "Filter Inventory Valuation,Sale, Purchase, Customer, Supplier, Products",
+    'sequence': 10,
+    'description': """
+Odoo Top Trending Products Filters
+======================
+
+Key Features
+------------
+* Top Trending Sold Product
+* Top Trending Purchased Product
+* Top Trending Sold & Purchased Product
+* Top Trending Sold Product Variant
+* Top Trending Purchased Product Variant
+* Top Trending Sold & Purchased Product
+* Filter Sale Quotation & Order Top Trending Sold Product
+* Filter Purchase Quotation & Order Top Trending Purchased Product
+* Filter Customer On Top Trending Sold Product
+* Filter Supplier On Top Trending Purchased Product
+* Filter Inventory Valuation On Top Trending Sold Product
+* Filter Inventory Valuation On Top Trending Purchased Product
+* Filter Inventory Valuation On Top Trending Sold & Purchased Product
+""",
+    'category': 'Sales',
+    'author': 'Kalpesh Gajera',
+    'website': 'www.visualcv.com/kalpesh-gajera',
+    'depends' : ['sale', 'purchase', 'stock'],
+    'data': [
+        'views/sale_view.xml',
+        'views/purchase_view.xml',
+        'views/product_view.xml',
+        'views/res_partner_view.xml',
+        'views/stock_view.xml',
+        'data/top_most_trending_data_view.xml',
+    ],
+    'images': ['images/icon.png'],
+    'installable': True,
+    'application': True,
+    'auto_install': False,
+}

+ 9 - 0
data/top_most_trending_data_view.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record id="top_most_trending_products" model="ir.config_parameter">
+            <field name="key">top.most.trending.product</field>
+            <field name="value">10</field>
+        </record>
+    </data>
+</openerp>

BIN
images/icon.png


+ 6 - 0
models/__init__.py

@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+import sale
+import purchase
+import product
+import res_partner
+import stock

+ 107 - 0
models/product.py

@@ -0,0 +1,107 @@
+# -*- coding: utf-8 -*-
+from openerp import fields, models, api
+
+
+class ProductTemplate(models.Model):
+    _inherit = "product.template"
+    
+    template_trending_index_sale = fields.Integer('Trending Index Sale', default=0)
+    template_trending_index_purchase = fields.Integer('Trending Index Purchase', default=0)    
+    
+    @api.model
+    def search_read(self, domain=None, fields=None, offset=0, limit=None, order=None):
+        if ['id', '!=', False] in domain:
+            top_most = self.env['ir.config_parameter'].sudo().get_param('top.most.trending.product')
+            self.env.cr.execute('select product_id, count(product_id) as cnt from sale_order_line group by product_id order by cnt desc limit %s' % (top_most))
+            product_list = []
+            template_dict = {}
+            template_list = []
+            for rec in self.env.cr.fetchall():
+                product_id = self.env['product.product'].search([('id', '=', rec[0])])
+                if product_id and product_id.product_tmpl_id:
+                    template_dict[product_id.product_tmpl_id.id] = template_dict.get(product_id.product_tmpl_id.id, 0)+ rec[1]
+            for rec in template_dict.items():
+                template = self.search([('id', '=', rec[0])])
+                template and template.write({'template_trending_index_sale': rec[1]})
+                template_list.append(rec[0])
+            order='template_trending_index_sale desc'
+            domain.extend([['company_id', '=', self.env.user.company_id.id]])
+            id_domain = [x for x in domain if  x[0] == 'id' and x[1] == 'in']
+            if id_domain:
+                id_domain = id_domain[0]
+                domain.remove(id_domain)
+                id_domain[2] = list(set(id_domain[2]) & set(list(set(template_list))))
+                domain.extend([id_domain])
+            else:
+                domain.extend([['id', 'in', list(set(template_list))]])
+        if ['id', '!=', -1] in domain:
+            top_most = self.env['ir.config_parameter'].sudo().get_param('top.most.trending.product')
+            self.env.cr.execute('select product_id, count(product_id) as cnt from purchase_order_line group by product_id order by cnt desc limit %s' % (top_most))
+            product_list = []
+            template_dict = {}
+            template_list = []
+            for rec in self.env.cr.fetchall():
+                product_id = self.env['product.product'].search([('id', '=', rec[0])])
+                if product_id and product_id.product_tmpl_id:
+                    template_dict[product_id.product_tmpl_id.id] = template_dict.get(product_id.product_tmpl_id.id, 0)+ rec[1]
+            for rec in template_dict.items():
+                template = self.search([('id', '=', rec[0])])
+                template and template.write({'template_trending_index_purchase': rec[1]})
+                template_list.append(rec[0])
+            order='template_trending_index_purchase desc'
+            domain.extend([['company_id', '=', self.env.user.company_id.id]])
+            id_domain = [x for x in domain if  x[0] == 'id' and x[1] == 'in']
+            if id_domain:
+                id_domain = id_domain[0]
+                domain.remove(id_domain)
+                id_domain[2] = list(set(id_domain[2]) & set(list(set(template_list))))
+                domain.extend([id_domain])
+            else:
+                domain.extend([['id', 'in', list(set(template_list))]])
+        return super(ProductTemplate, self).search_read(domain=domain, fields=fields, offset=offset, limit=limit, order=order)
+        
+class ProductProduct(models.Model):
+    _inherit = "product.product"
+    
+    product_trending_index_sale = fields.Integer('Trending Index Sale', default=0)
+    product_trending_index_purchase = fields.Integer('Trending Index Purchase', default=0)    
+    
+    @api.model
+    def search_read(self, domain=None, fields=None, offset=0, limit=None, order=None):
+        if ['id', '!=', False] in domain:
+            top_most = self.env['ir.config_parameter'].sudo().get_param('top.most.trending.product')
+            self.env.cr.execute('select product_id, count(product_id) as cnt from sale_order_line group by product_id order by cnt desc limit %s' % (top_most))
+            product_list = []
+            for rec in self.env.cr.fetchall():
+                product = self.search([('id', '=', rec[0])])
+                product and product.write({'product_trending_index_sale': rec[1]})
+                product_list.append(rec[0])
+            order='product_trending_index_sale desc'
+            domain.extend([['company_id', '=', self.env.user.company_id.id]])
+            id_domain = [x for x in domain if  x[0] == 'id' and x[1] == 'in']
+            if id_domain:
+                id_domain = id_domain[0]
+                domain.remove(id_domain)
+                id_domain[2] = list(set(id_domain[2]) & set(list(set(product_list))))
+                domain.extend([id_domain])
+            else:
+                domain.extend([['id', 'in', list(set(product_list))]])
+        if ['id', '!=', -1] in domain:
+            top_most = self.env['ir.config_parameter'].sudo().get_param('top.most.trending.product')
+            self.env.cr.execute('select product_id, count(product_id) as cnt from purchase_order_line group by product_id order by cnt desc limit %s' % (top_most))
+            product_list = []
+            for rec in self.env.cr.fetchall():
+                product = self.search([('id', '=', rec[0])])
+                product and product.write({'product_trending_index_purchase': rec[1]})
+                product_list.append(rec[0])
+            order='product_trending_index_purchase desc'
+            domain.extend([['company_id', '=', self.env.user.company_id.id]])
+            id_domain = [x for x in domain if  x[0] == 'id' and x[1] == 'in']
+            if id_domain:
+                id_domain = id_domain[0]
+                domain.remove(id_domain)
+                id_domain[2] = list(set(id_domain[2]) & set(list(set(product_list))))
+                domain.extend([id_domain])
+            else:
+                domain.extend([['id', 'in', list(set(product_list))]])
+        return super(ProductProduct, self).search_read(domain=domain, fields=fields, offset=offset, limit=limit, order=order)

+ 19 - 0
models/purchase.py

@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from openerp import fields, models, api
+
+
+class PurchaseOrder(models.Model):
+    _inherit = "purchase.order"
+    
+    @api.model
+    def search_read(self, domain=None, fields=None, offset=0, limit=None, order=None):
+        if ['id', '!=', False] in domain:
+            top_most = self.env['ir.config_parameter'].sudo().get_param('top.most.trending.product')
+            self.env.cr.execute('select product_id, count(product_id) as cnt from purchase_order_line group by product_id order by cnt desc limit %s' % (top_most))
+            po_list = []
+            for rec in self.env.cr.fetchall():
+                pol_ids = self.env['purchase.order.line'].search([('product_id', '=', rec[0]), ('order_id.state', 'not in', ['sent', 'cancel'])])
+                po_list.extend(list(set([x.order_id.id for x in pol_ids])))
+            domain.extend([['id', 'in', po_list]])
+            domain.extend([['company_id', '=', self.env.user.company_id.id]])
+        return super(PurchaseOrder, self).search_read(domain=domain, fields=fields, offset=offset, limit=limit, order=order)

+ 43 - 0
models/res_partner.py

@@ -0,0 +1,43 @@
+# -*- coding: utf-8 -*-
+from openerp import fields, models, api
+
+
+class ResPartner(models.Model):
+    _inherit = "res.partner"
+    
+    @api.model
+    def search_read(self, domain=None, fields=None, offset=0, limit=None, order=None):
+        if ['id', '!=', False] in domain:
+            top_most = self.env['ir.config_parameter'].sudo().get_param('top.most.trending.product')
+            self.env.cr.execute('select product_id, count(product_id) as cnt from sale_order_line group by product_id order by cnt desc limit %s' % (top_most))
+            partner_list = []
+            for rec in self.env.cr.fetchall():
+                sol_ids = self.env['sale.order.line'].search([('product_id', '=', rec[0]), ('order_id.state', 'not in', ['draft', 'sent', 'cancel'])])
+                partner_list.extend(list(set([x.order_id.partner_id.id for x in sol_ids])))
+            domain.extend([['company_id', '=', self.env.user.company_id.id]])
+            id_domain = [x for x in domain if  x[0] == 'id' and x[1] == 'in']
+            if id_domain:
+                id_domain = id_domain[0]
+                domain.remove(id_domain)
+                id_domain[2] = list(set(id_domain[2]) & set(list(set(partner_list))))
+                domain.extend([id_domain])
+            else:
+                domain.extend([['id', 'in', list(set(partner_list))]])
+        if ['id', '!=', -1] in domain:
+            top_most = self.env['ir.config_parameter'].sudo().get_param('top.most.trending.product')
+            self.env.cr.execute('select product_id, count(product_id) as cnt from purchase_order_line group by product_id order by cnt desc limit %s' % (top_most))
+            product_list = []
+            partner_list = []
+            for rec in self.env.cr.fetchall():
+                pol_ids = self.env['purchase.order.line'].search([('product_id', '=', rec[0]), ('order_id.state', 'not in', ['draft', 'sent', 'cancel'])])
+                partner_list.extend(list(set([x.order_id.partner_id.id for x in pol_ids])))
+            domain.extend([['company_id', '=', self.env.user.company_id.id]])
+            id_domain = [x for x in domain if  x[0] == 'id' and x[1] == 'in']
+            if id_domain:
+                id_domain = id_domain[0]
+                domain.remove(id_domain)
+                id_domain[2] = list(set(id_domain[2]) & set(list(set(partner_list))))
+                domain.extend([id_domain])
+            else:
+                domain.extend([['id', 'in', list(set(partner_list))]])
+        return super(ResPartner, self).search_read(domain=domain, fields=fields, offset=offset, limit=limit, order=order)

+ 19 - 0
models/sale.py

@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from openerp import fields, models, api
+
+
+class SaleOrder(models.Model):
+    _inherit = "sale.order"
+    
+    @api.model
+    def search_read(self, domain=None, fields=None, offset=0, limit=None, order=None):
+        if ['id', '!=', False] in domain:
+            top_most = self.env['ir.config_parameter'].sudo().get_param('top.most.trending.product')
+            self.env.cr.execute('select product_id, count(product_id) as cnt from sale_order_line group by product_id order by cnt desc limit %s' % (top_most))
+            so_list = []
+            for rec in self.env.cr.fetchall():
+                sol_ids = self.env['sale.order.line'].search([('product_id', '=', rec[0]), ('order_id.state', 'not in', ['draft', 'sent', 'cancel'])])
+                so_list.extend(list(set([x.order_id.id for x in sol_ids])))
+            domain.extend([['id', 'in', so_list]])
+            domain.extend([['company_id', '=', self.env.user.company_id.id]])
+        return super(SaleOrder, self).search_read(domain=domain, fields=fields, offset=offset, limit=limit, order=order)

+ 42 - 0
models/stock.py

@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+from openerp import fields, models, api
+
+
+class StockQuant(models.Model):
+    _inherit = "stock.quant"
+    
+    @api.model
+    def read_group(self, domain, fields, groupby, offset=0, limit=None, orderby=False, lazy=True):
+        if ['id', '!=', False] in domain:
+            top_most = self.env['ir.config_parameter'].sudo().get_param('top.most.trending.product')
+            self.env.cr.execute('select product_id, count(product_id) as cnt from sale_order_line group by product_id order by cnt desc limit %s' % (top_most))
+            product_list = []
+            for rec in self.env.cr.fetchall():
+                product = self.env['product.product'].sudo().search([('id', '=', rec[0])])
+                product_list.append(rec[0])
+            domain.extend([['company_id', '=', self.env.user.company_id.id]])
+            id_domain = [x for x in domain if  x[0] == 'product_id' and x[1] == 'in']
+            if id_domain:
+                id_domain = id_domain[0]
+                domain.remove(id_domain)
+                id_domain[2] = list(set(id_domain[2]) & set(list(set(product_list))))
+                domain.extend([id_domain])
+            else:
+                domain.extend([['product_id', 'in', list(set(product_list))]])
+        if ['id', '!=', -1] in domain:
+            top_most = self.env['ir.config_parameter'].sudo().get_param('top.most.trending.product')
+            self.env.cr.execute('select product_id, count(product_id) as cnt from purchase_order_line group by product_id order by cnt desc limit %s' % (top_most))
+            product_list = []
+            for rec in self.env.cr.fetchall():
+                product = self.search([('product_id', '=', rec[0])])
+                product_list.append(rec[0])
+            domain.extend([['company_id', '=', self.env.user.company_id.id]])
+            id_domain = [x for x in domain if  x[0] == 'product_id' and x[1] == 'in']
+            if id_domain:
+                id_domain = id_domain[0]
+                domain.remove(id_domain)
+                id_domain[2] = list(set(id_domain[2]) & set(list(set(product_list))))
+                domain.extend([id_domain])
+            else:
+                domain.extend([['product_id', 'in', list(set(product_list))]])
+        return super(StockQuant, self).read_group(domain, fields, groupby, offset=offset, limit=limit, orderby=orderby, lazy=lazy)

BIN
static/description/10_sale_order_filter_top_trending_sold_product.png


BIN
static/description/11_purchase_order_filter_top_trending_product.png


BIN
static/description/12_inventory_valuation_by_top_trending_sold_product.png


BIN
static/description/13_inventory_valuation_by_top_trending_purchase_product.png


BIN
static/description/14_inventory_valuation_by_top_trending_sold_purchased_product.png


BIN
static/description/15_top_trending_count.png


BIN
static/description/1_top_trending_sold_product.png


BIN
static/description/2_top_trending_purchased_product.png


BIN
static/description/3_top_trending_sold_purchased_product.png


BIN
static/description/4_variant_top_trending_sold_product_variant.png


BIN
static/description/5_top_trending_purchased_product_variant.png


BIN
static/description/6_top_trending_variant_sold_purchased_product_variant.png


BIN
static/description/7_customer_filter_top_trending_purchased_product.png


BIN
static/description/8_customer_filter_top_trending_sold_product.png


BIN
static/description/9_customer_filter_top_trending_sold_purchased_product.png


BIN
static/description/contactus.jpg


BIN
static/description/icon.png


+ 211 - 0
static/description/index.html

@@ -0,0 +1,211 @@
+<h2 class="oe_slogan">Odoo Top Trending Products Filters</h2>
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <div class="oe_span4">
+            <div class="oe_demo oe_picture oe_screenshot">
+                    <img class="img-responsive" src="contactus.jpg">
+            </div>
+        </div>
+        <div class="oe_span8">
+            <h4 class="oe_slogan"><br>Kalpesh Gajera<br> Mobile :- +919033182384<br>Email :- kalpesh.gajera26@gmail.com<br> Website :-<a title="Kalpesh Gajera" href="http://www.visualcv.com/kalpesh-gajera" target="_blank">Kalpesh Gajera</a> <br></h4>
+        </div>
+    </div>
+</section>  
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <h2 class="oe_slogan">Key Features</h2>
+        <div class="oe_span6">
+            <ui>
+                <li>Top Trending Sold Product.</li>
+                <li>Top Trending Purchased Product.</li>
+                <li>Top Trending Sold & Purchased Product.</li>
+                <li>Top Trending Sold Product Variant.</li>
+                <li>Top Trending Purchased Product Variant.</li>
+                <li>Top Trending Sold & Purchased Product.</li>
+                <li>Filter Sale Quotation & Order Top Trending Sold Product.</li>
+                <li>Filter Purchase Quotation & Order Top Trending Purchased Product.</li>
+                <li>Filter Customer On Top Trending Sold Product.</li>
+                <li>Filter Supplier On Top Trending Purchased Product.</li>
+                <li>Filter Inventory Valuation On Top Trending Sold Product.</li>
+                <li>Filter Inventory Valuation On Top Trending Purchased Product.</li>
+                <li>Filter Inventory Valuation On Top Trending Sold & Purchased Product.</li>
+            </ui>
+        </div>
+        <div class="oe_span6">
+            <ui>
+                <li>Support To Both Odoo Enterprise & Odoo Community Editions.</li>
+                <li>Error Free.</li>
+                <li>Easy to configure and Flexible.</li>                                
+            </ui>
+        </div>
+    </div>
+</section> 
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <h2 class="oe_slogan">Top Trending Sold Product</h2>
+        <div class="oe_span10">
+            <div class="oe_demo oe_picture oe_screenshot">
+                <img class="img-responsive" src="1_top_trending_sold_product.png">
+            </div>
+        </div>
+    </div>
+</section>
+
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <h2 class="oe_slogan">Top Trending Purchased Product</h2>
+        <div class="oe_span10">
+            <div class="oe_demo oe_picture oe_screenshot">
+                <img class="img-responsive" src="2_top_trending_purchased_product.png">
+            </div>
+        </div>
+    </div>
+</section>
+
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <h2 class="oe_slogan">Top Trending Sold & Purchased Product</h2>
+        <div class="oe_span10">
+            <div class="oe_demo oe_picture oe_screenshot">
+                <img class="img-responsive" src="3_top_trending_sold_purchased_product.png" height="250px" width="350px">
+            </div>
+        </div>
+    </div>
+</section>
+
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <h2 class="oe_slogan">Top Trending Sold Product Variant</h2>
+        <div class="oe_span10">
+            <div class="oe_demo oe_picture oe_screenshot">
+                <img class="img-responsive" src="4_variant_top_trending_sold_product_variant.png" height="250px" width="350px">
+            </div>
+        </div>
+    </div>
+</section>
+
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <h2 class="oe_slogan">Top Trending Purchased Product Variant</h2>
+        <div class="oe_span10">
+            <div class="oe_demo oe_picture oe_screenshot">
+                <img class="img-responsive" src="5_top_trending_purchased_product_variant.png">
+            </div>
+        </div>
+    </div>
+</section>
+
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <h2 class="oe_slogan">Top Trending Sold & Purchased Product Variant</h2>
+        <div class="oe_span10">
+            <div class="oe_demo oe_picture oe_screenshot">
+                <img class="img-responsive" src="6_top_trending_variant_sold_purchased_product_variant.png">
+            </div>
+        </div>
+    </div>
+</section>
+
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <h2 class="oe_slogan">Customer Filter Based On Top Trending Sold Product</h2>
+        <div class="oe_span10">
+            <div class="oe_demo oe_picture oe_screenshot">
+                <img class="img-responsive" src="8_customer_filter_top_trending_sold_product.png">
+            </div>
+        </div>
+    </div>
+</section>
+
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <h2 class="oe_slogan">Supplier Filter Based On Top Trending Sold Product</h2>
+        <div class="oe_span10">
+            <div class="oe_demo oe_picture oe_screenshot">
+                <img class="img-responsive" src="7_customer_filter_top_trending_purchased_product.png">
+            </div>
+        </div>
+    </div>
+</section>
+
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <h2 class="oe_slogan">Sale Quotation & Order Filter Based On Top Trending Sold Product</h2>
+        <div class="oe_span10">
+            <div>
+                <img class="img-responsive" src="10_sale_order_filter_top_trending_sold_product.png">
+            </div>
+        </div>
+    </div>
+</section>
+
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <h2 class="oe_slogan">Purchase Quotation & Order Filter Based On Top Trending Purchased Product</h2>
+        <div class="oe_span10">
+            <div>
+                <img class="img-responsive" src="11_purchase_order_filter_top_trending_product.png">
+            </div>
+        </div>
+    </div>
+</section>
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <h2 class="oe_slogan">Inventory Valuation Based On Top Trending Sold Product</h2>
+        <div class="oe_span10">
+            <div>
+                <img class="img-responsive" src="12_inventory_valuation_by_top_trending_sold_product.png">
+            </div>
+        </div>
+    </div>
+</section>
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <h2 class="oe_slogan">Inventory Valuation Based On Top Trending Purchase Product</h2>
+        <div class="oe_span10">
+            <div>
+                <img class="img-responsive" src="13_inventory_valuation_by_top_trending_purchase_product.png">
+            </div>
+        </div>
+    </div>
+</section>
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <h2 class="oe_slogan">Inventory Valuation Based On Top Trending Sold & Purchase Product</h2>
+        <div class="oe_span10">
+            <div>
+                <img class="img-responsive" src="14_inventory_valuation_by_top_trending_sold_purchased_product.png">
+            </div>
+        </div>
+    </div>
+</section>
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <h2 class="oe_slogan">Top Trending Product Configuration </h2>
+        <div class="oe_span6">
+            <div>
+                <img class="img-responsive" src="15_top_trending_count.png">
+            </div>
+        </div>
+        <div class="oe_span6">
+            Settings >> Technical >> Parameters >> System Parameters
+            <br>
+            <br>
+            <p>Fox Ex.</p>
+            <p> Here we set 10, it takes top most 10 trending products.</p>
+            <p> Here we set 25, it takes top most 25 trending products.</p>
+        </div>
+    </div>
+</section>
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <div class="oe_span4">
+            <div class="oe_demo oe_picture oe_screenshot">
+                    <img class="img-responsive" src="contactus.jpg">
+            </div>
+        </div>
+        <div class="oe_span8">
+            <h4 class="oe_slogan"><br>Kalpesh Gajera<br> Mobile :- +919033182384<br>Email :- kalpesh.gajera26@gmail.com<br> Website :-<a title="Kalpesh Gajera" href="http://www.visualcv.com/kalpesh-gajera" target="_blank">Kalpesh Gajera</a> <br></h4>
+        </div>
+    </div>
+</section> 

+ 18 - 0
views/product_view.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record id="product_template_search_view_top25_product" model="ir.ui.view">
+            <field name="name">product.template.filter</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_search_view"/>
+            <field name="arch" type="xml">
+                <xpath expr="//search" position="inside">
+                    <separator/>
+                    <filter string="Top productos más vendidos" domain="[('id','!=',False)]" context="{'top_25': True}" />
+                    <separator/>
+                    <filter string="Top productos más comprados" domain="[('id', '!=', -1)]" context="{'top_25': True}" />
+                </xpath>
+            </field>
+        </record>
+    </data>
+</openerp>

+ 15 - 0
views/purchase_view.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record id="view_purchase_order_filter_top25_product" model="ir.ui.view">
+            <field name="name">purchase.order.filter</field>
+            <field name="model">purchase.order</field>
+            <field name="inherit_id" ref="purchase.view_purchase_order_filter"/>
+            <field name="arch" type="xml">
+                <xpath expr="//search" position="inside">
+                    <filter string="Top productos de mayor tendencia" domain="[('id','!=',False)]" context="{'top_25': True}"/>
+                </xpath>
+            </field>
+        </record>
+    </data>
+</openerp>

+ 18 - 0
views/res_partner_view.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record id="view_res_partner_filter_top25_product" model="ir.ui.view">
+            <field name="name">res.partner.filter</field>
+            <field name="model">res.partner</field>
+            <field name="inherit_id" ref="base.view_res_partner_filter"/>
+            <field name="arch" type="xml">
+                <xpath expr="//search" position="inside">
+                    <separator/>
+                    <filter string="Top productos más vendidos" domain="[('id','!=',False)]" context="{'top_25': True}" />
+                    <separator/>
+                    <filter string="Top productos más comprados" domain="[('id','!=',-1)]" context="{'top_25': True}" />
+                </xpath>
+            </field>
+        </record>
+    </data>
+</openerp>

+ 15 - 0
views/sale_view.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record id="view_sales_order_filter_top25_product" model="ir.ui.view">
+            <field name="name">sale.order.filter</field>
+            <field name="model">sale.order</field>
+            <field name="inherit_id" ref="sale.view_sales_order_filter"/>
+            <field name="arch" type="xml">
+                <xpath expr="//search" position="inside">
+                    <filter string="Top productos de mayor tendencia" domain="[('id','!=',False)]" context="{'top_25': True}"/>
+                </xpath>
+            </field>
+        </record>
+    </data>
+</openerp>

+ 18 - 0
views/stock_view.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record id="quant_search_view_top25_product" model="ir.ui.view">
+            <field name="name">stock.quant.filter</field>
+            <field name="model">stock.quant</field>
+            <field name="inherit_id" ref="stock.quant_search_view"/>
+            <field name="arch" type="xml">
+                <xpath expr="//search" position="inside">
+                    <separator/>
+                    <filter string="Top Productos más vendidos" domain="[('id','!=',False)]" context="{'top_25': True}" />
+                    <separator/>
+                    <filter string="Top Productos más comprados" domain="[('id','!=',-1)]" context="{'top_25': True}" />
+                </xpath>
+            </field>
+        </record>
+    </data>
+</openerp>