From 1607b1ddc7793f81d477e8d8c738bc7ebcfff162 Mon Sep 17 00:00:00 2001 From: "Purnendu Singh (OpenERP)" Date: Tue, 30 Oct 2012 18:17:27 +0530 Subject: [PATCH 1/2] [FIX] product_margin: Fix header translation issue lp bug: https://launchpad.net/bugs/937856 fixed bzr revid: psi@tinyerp.com-20121030124727-tm5vdpld7oiwpjlx --- addons/product_margin/wizard/product_margin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product_margin/wizard/product_margin.py b/addons/product_margin/wizard/product_margin.py index 61137a5e51e..8063e33707f 100644 --- a/addons/product_margin/wizard/product_margin.py +++ b/addons/product_margin/wizard/product_margin.py @@ -64,7 +64,7 @@ class product_margin(osv.osv_memory): #get the current product.margin object to obtain the values from it product_margin_obj = self.browse(cr, uid, ids, context=context)[0] - context = {'invoice_state' : product_margin_obj.invoice_state} + context.update({'invoice_state' : product_margin_obj.invoice_state}) if product_margin_obj.from_date: context.update({'date_from': product_margin_obj.from_date}) if product_margin_obj.to_date: From f82f13f44d648ea130485ee1bfea0c26f37c0b62 Mon Sep 17 00:00:00 2001 From: "Purnendu Singh (OpenERP)" Date: Tue, 30 Oct 2012 18:28:49 +0530 Subject: [PATCH 2/2] [IMP] product_margin: improve the code bzr revid: psi@tinyerp.com-20121030125849-q1rn3f5ish8gexf5 --- addons/product_margin/wizard/product_margin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/product_margin/wizard/product_margin.py b/addons/product_margin/wizard/product_margin.py index 8063e33707f..cdabc8f9964 100644 --- a/addons/product_margin/wizard/product_margin.py +++ b/addons/product_margin/wizard/product_margin.py @@ -64,11 +64,11 @@ class product_margin(osv.osv_memory): #get the current product.margin object to obtain the values from it product_margin_obj = self.browse(cr, uid, ids, context=context)[0] - context.update({'invoice_state' : product_margin_obj.invoice_state}) + context.update(invoice_state = product_margin_obj.invoice_state) if product_margin_obj.from_date: - context.update({'date_from': product_margin_obj.from_date}) + context.update(date_from = product_margin_obj.from_date) if product_margin_obj.to_date: - context.update({'date_to': product_margin_obj.to_date}) + context.update(date_to = product_margin_obj.to_date) return { 'name': _('Product Margins'), 'context': context,