Skip to content
Snippets Groups Projects
Commit c86201c5 authored by Denis Ledoux's avatar Denis Ledoux
Browse files

[FIX] mrp: fix BOM smart button for product variants

Do not force the `search_default_product_id`to the current
product variant, as the domain just above could return a
result, a BOM which is set for the template of this variant
but not for the variant istself, that this filter would hide.

This is following the revision
52cba1b5

Because of this, a product variant smart button could
display "1 BOM", but when clicking on it, none would be displayed,
which is not user-friendly at all.

opw-687912
parent ddcd2e77
Branches
Tags
No related merge requests found
......@@ -92,6 +92,6 @@ class product_product(osv.osv):
('product_id', '=', False),
('product_tmpl_id', 'in', list(products)),
]
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['context'] = "{'default_product_id': active_id, 'default_product_tmpl_id': %s}" % (len(products) and products.pop() or 'False')
result['domain'] = str(domain)
return result
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment