From da7879638cc5fb5086943c8ae9941386bf73283b Mon Sep 17 00:00:00 2001 From: Chris Biersbach Date: Tue, 25 Sep 2012 09:27:37 +0200 Subject: [PATCH] [FIX] changed an unsafe dictionary access into a get() call, this caused a test to fail bzr revid: cbi@openerp.com-20120925072737-bspeduh88b1zash3 --- addons/stock/report/product_stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/report/product_stock.py b/addons/stock/report/product_stock.py index 59c60676895..be390fbf02a 100644 --- a/addons/stock/report/product_stock.py +++ b/addons/stock/report/product_stock.py @@ -102,7 +102,7 @@ class report_stock(report_int): qty = 0 io = StringIO.StringIO() - gt = stock_graph.stock_graph(io, context['lang'], cr) + gt = stock_graph.stock_graph(io, context.get('lang', 'en_US'), cr) for prod_id in products: gt.add(prod_id, names.get(prod_id, 'Unknown'), products[prod_id]) gt.draw()