From 8e48eb625dcedb333137e4af59c4d5332ae5f4a3 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 26 Mar 2015 09:51:43 +0100 Subject: [PATCH] [FIX] mrp: ability to search BOM on BOM lines containing ... In BOM, when performing an advanced search on "BOM Lines" contains "a name" all lines were returned, whatever the lines content. This was due to the simple fact no field 'name' was set on the mrp.bom.line model. We set "product_id" as _rec_name, it seems the more logical choice. opw-631335 --- addons/mrp/mrp.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 3ca55e3efb0..fabeeca0fe3 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -367,6 +367,7 @@ class mrp_bom(osv.osv): class mrp_bom_line(osv.osv): _name = 'mrp.bom.line' _order = "sequence" + _rec_name = "product_id" def _get_child_bom_lines(self, cr, uid, ids, field_name, arg, context=None): """If the BOM line refers to a BOM, return the ids of the child BOM lines"""