From 5d9d5562a2ec32cc32664305ecdd508d12419262 Mon Sep 17 00:00:00 2001 From: "nch@tinyerp.com" <> Date: Tue, 29 Dec 2009 18:35:00 +0530 Subject: [PATCH] [ADD,FIX]:Group by customer and shop in sale order and a small bug in stock/product.py bzr revid: nch@tinyerp.com-20091229130500-b3crhavxmrkmni4q --- addons/sale/sale_view.xml | 52 +++++++++++++++++++++++++++++++++++++-- addons/stock/product.py | 2 ++ 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index a7535336982..83c847a4ef2 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -131,7 +131,7 @@ on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order, product_packaging, parent.fiscal_position)" domain="[('product_id','=',product_id)]" groups="base.group_extended"/> - + @@ -264,6 +264,54 @@ + + + sale.order.gp.tree + sale.order + tree + + + + + + + + + + + + + + + Sale Order Group By Customer + ir.actions.act_window + sale.order + {'group_by':'partner_id'} + tree + form,graph + + + + + Sale Order Group By Shop + ir.actions.act_window + sale.order + {'group_by':'shop_id'} + tree + form,graph + + + + + + + All Sales Order ir.actions.act_window @@ -415,7 +463,7 @@ - + diff --git a/addons/stock/product.py b/addons/stock/product.py index 5c42cdbdab2..544cc1b2789 100644 --- a/addons/stock/product.py +++ b/addons/stock/product.py @@ -175,6 +175,8 @@ class product_product(osv.osv): } def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): res = super(product_product,self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) + if context == None: + context = {} if ('location' in context) and context['location']: location_info = self.pool.get('stock.location').browse(cr, uid, context['location']) fields=res.get('fields',{})