[FIX] mrp: BOM state button from product.product

When clicking on the BOM state button from product.product, and clicking
on create afterward, it must open mrp.bom view with the product and product variant
already set(as with product.template).

opw:645045
This commit is contained in:
Goffin Simon 2015-07-24 07:49:09 +02:00
parent fe12c3453b
commit 52cba1b563
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ class product_product(osv.osv):
('product_id', '=', False),
('product_tmpl_id', 'in', list(products)),
]
result['context'] = "{}"
result['context'] = "{'default_product_id': active_id, 'search_default_product_id': active_id, 'default_product_tmpl_id': %s}" % (len(products) and products.pop() or 'False')
result['domain'] = str(domain)
return result