[IMP] product_margin: improve the code

bzr revid: psi@tinyerp.com-20121030125849-q1rn3f5ish8gexf5
This commit is contained in:
Purnendu Singh (OpenERP) 2012-10-30 18:28:49 +05:30
parent 1607b1ddc7
commit f82f13f44d
1 changed files with 3 additions and 3 deletions

View File

@ -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,