From cc07b482fe8786d27410d2a34a694c8509650cd2 Mon Sep 17 00:00:00 2001 From: Haresh Shyara Date: Wed, 23 Aug 2017 11:16:34 +0530 Subject: [PATCH] [IMP] stock: improve stock quant list view - Added new field 'reserved_quantity'. - Added new filter Reservations('reserved_quantity'). - Removed 'Transit Location' default filter and keep only 'Internal Location'. - Added graph view in stock quant. - Added Product Template in search view. --- addons/stock/models/stock_quant.py | 4 ++++ addons/stock/views/stock_quant_views.xml | 26 ++++++++++++++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/addons/stock/models/stock_quant.py b/addons/stock/models/stock_quant.py index 582d24d1033..7a247fa1fea 100644 --- a/addons/stock/models/stock_quant.py +++ b/addons/stock/models/stock_quant.py @@ -15,6 +15,10 @@ class StockQuant(models.Model): product_id = fields.Many2one( 'product.product', 'Product', ondelete='restrict', readonly=True, required=True) + # so user can filter on template in webclient + product_tmpl_id = fields.Many2one( + 'product.template', string='Product Template', + related='product_id.product_tmpl_id') product_uom_id = fields.Many2one( 'product.uom', 'Unit of Measure', readonly=True, related='product_id.uom_id') diff --git a/addons/stock/views/stock_quant_views.xml b/addons/stock/views/stock_quant_views.xml index e92515f6037..750fdbe5b56 100644 --- a/addons/stock/views/stock_quant_views.xml +++ b/addons/stock/views/stock_quant_views.xml @@ -18,6 +18,7 @@ + @@ -62,12 +63,13 @@ - - - + + + + @@ -79,18 +81,30 @@ stock.quant - + + + + stock.quant.graph + stock.quant + + + + + + + + Inventory stock.quant form - tree,form,pivot - {'search_default_internal_loc': 1, 'search_default_transit_loc': 1} + tree,form,pivot,graph + {'search_default_internal_loc': 1,} This analysis gives you a fast overview on the current stock level of your products and their current inventory value.