[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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user