parent
f2583323a9
commit
64f65ee8f6
|
@ -433,10 +433,13 @@ class product_template(osv.osv):
|
|||
products = self._get_products(cr, uid, ids, context=context)
|
||||
result = self._get_act_window_dict(cr, uid, 'stock.act_product_stock_move_open', context=context)
|
||||
if len(ids) == 1 and len(products) == 1:
|
||||
result['context'] = "{'default_product_id': " + str(products[0]) + ", 'search_default_product_id': " + str(products[0]) + "}"
|
||||
ctx = "{'tree_view_ref':'stock.view_move_tree', \
|
||||
'default_product_id': %s, 'search_default_product_id': %s}" \
|
||||
% (products[0], products[0])
|
||||
result['context'] = ctx
|
||||
else:
|
||||
result['domain'] = "[('product_id','in',[" + ','.join(map(str, products)) + "])]"
|
||||
result['context'] = "{}"
|
||||
result['context'] = "{'tree_view_ref':'stock.view_move_tree'}"
|
||||
return result
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue