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 :/production/rebase-20171130
parent
768d0fb9d3
commit
faa3ff46e2
|
@ -1132,6 +1132,8 @@ class product_product(osv.osv):
|
|||
ids = self.search(cr, user, [('default_code','=',name)]+ args, limit=limit, context=context)
|
||||
if not ids:
|
||||
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:
|
||||
# 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
|
||||
|
|
Loading…
Reference in New Issue