[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
52cba1b563
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user