projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8205b1
)
[FIX] product: name_search() should only look for exact product codes
author
Olivier Dony
<odo@openerp.com>
Tue, 1 Feb 2011 12:34:28 +0000
(13:34 +0100)
committer
Olivier Dony
<odo@openerp.com>
Tue, 1 Feb 2011 12:34:28 +0000
(13:34 +0100)
bzr revid: odo@openerp.com-
20110201123428
-jr2gqkci3s63rih9
addons/product/product.py
patch
|
blob
|
history
diff --git
a/addons/product/product.py
b/addons/product/product.py
index
ff18fad
..
801e647
100644
(file)
--- a/
addons/product/product.py
+++ b/
addons/product/product.py
@@
-567,7
+567,7
@@
class product_product(osv.osv):
ptrn=re.compile('(\[(.*?)\])')
res = ptrn.search(name)
if res:
- ids = self.search(cr, user, [('default_code','ilike',res.group(2))]+ args, limit=limit, context=context)
+ ids = self.search(cr, user, [('default_code','=', res.group(2))] + args, limit=limit, context=context)
else:
ids = self.search(cr, user, args, limit=limit, context=context)
result = self.name_get(cr, user, ids, context=context)