[REF] stock, location_product wizard: context['active_id'] instead of context.get('active_id'). This syntax change is to emphasize the fact that active_id _is_ required in the context when reaching this line. So it's better to crash directly if it's not there. Courtesy from xmo

bzr revid: qdp-launchpad@openerp.com-20111121163336-2pn5hcub4qs3klx1
This commit is contained in:
Quentin (OpenERP) 2011-11-21 17:33:36 +01:00
parent fbbbf08bd0
commit 64ce2476c1
1 changed files with 9 additions and 9 deletions

View File

@ -43,15 +43,15 @@ class stock_location_product(osv.osv_memory):
location_products = self.read(cr, uid, ids, ['from_date', 'to_date'], context=context)
if location_products:
return {
'name': False,
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'product.product',
'type': 'ir.actions.act_window',
'context': {'location': context.get('active_id'),
'from_date': location_products[0]['from_date'],
'to_date': location_products[0]['to_date']},
'domain': [('type', '<>', 'service')],
'name': False,
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'product.product',
'type': 'ir.actions.act_window',
'context': {'location': context['active_id'],
'from_date': location_products[0]['from_date'],
'to_date': location_products[0]['to_date']},
'domain': [('type', '<>', 'service')],
}
stock_location_product()