[FIX] sale: name_search of SO line with its own name

When searching a SO line, we want to search on its own
description in case of 2 product with the same name
are present on the SO. This help user to differenciate
them.
This commit is contained in:
jem-odoo
2017-11-28 11:44:59 +01:00
parent d66997dd39
commit ef2a3b1342
+1 -1
View File
@@ -1071,7 +1071,7 @@ class SaleOrderLine(models.Model):
if operator in ('ilike', 'like', '=', '=like', '=ilike'):
domain = expression.AND([
args or [],
['|', ('order_id.name', operator, name), ('product_id.name', operator, name)]
['|', ('order_id.name', operator, name), ('name', operator, name)]
])
return self.search(domain, limit=limit).name_get()
return super(SaleOrderLine, self).name_search(name, args, operator, limit)