[FIX] stock: fix field name
authorQuentin (OpenERP) <qdp-launchpad@openerp.com>
Wed, 26 Jun 2013 14:14:01 +0000 (16:14 +0200)
committerQuentin (OpenERP) <qdp-launchpad@openerp.com>
Wed, 26 Jun 2013 14:14:01 +0000 (16:14 +0200)
bzr revid: qdp-launchpad@openerp.com-20130626141401-816utj7k6mop91ad

addons/stock/stock.py

index c2f0d16..e3ffd21 100644 (file)
@@ -1637,7 +1637,7 @@ class stock_picking(osv.osv):
         error_msg = ''
 
         #check if the barcode correspond to a product
-        matching_product_ids = product_obj.search(cr, uid, ['|', ('code', '=', barcode_str), ('ean', '=', barcode_str)], context=context)
+        matching_product_ids = product_obj.search(cr, uid, ['|', ('code', '=', barcode_str), ('ean13', '=', barcode_str)], context=context)
         if matching_product_ids:
             if len(matching_product_ids) > 1:
                 error_msg = _('Wrong bar code detected: more than one product matching the given barcode')