HACK: extend product.product name_search() for x_sysmo_barcode
This should be properly done in an extension, but was easier to add to the core product.product code right now :/
This commit is contained in:
parent
d07b59d4ba
commit
39180387a1
|
@ -1130,6 +1130,8 @@ class product_product(osv.osv):
|
||||||
ids = self.search(cr, user, [('default_code','=',name)]+ args, limit=limit, context=context)
|
ids = self.search(cr, user, [('default_code','=',name)]+ args, limit=limit, context=context)
|
||||||
if not ids:
|
if not ids:
|
||||||
ids = self.search(cr, user, [('ean13','=',name)]+ args, limit=limit, context=context)
|
ids = self.search(cr, user, [('ean13','=',name)]+ args, limit=limit, context=context)
|
||||||
|
if not ids:
|
||||||
|
ids = self.search(cr, user, [('x_sysmo_barcode','=',name)]+ args, limit=limit, context=context)
|
||||||
if not ids and operator not in expression.NEGATIVE_TERM_OPERATORS:
|
if not ids and operator not in expression.NEGATIVE_TERM_OPERATORS:
|
||||||
# Do not merge the 2 next lines into one single search, SQL search performance would be abysmal
|
# Do not merge the 2 next lines into one single search, SQL search performance would be abysmal
|
||||||
# on a database with thousands of matching products, due to the huge merge+unique needed for the
|
# on a database with thousands of matching products, due to the huge merge+unique needed for the
|
||||||
|
|
Loading…
Reference in New Issue