FIX stock_inventory_preparation_filter search EAN13 for scanned products

When using the feature 'allows to make an inventory based on scanned
products', users might expect they can use the EAN13 barcode for
scanning their products.
This commit is contained in:
Jos De Graeve
2016-05-11 16:55:00 +02:00
committed by Ivàn Todorovich
parent 00ec84b832
commit c001b6babf

View File

@@ -109,8 +109,10 @@ class StockInventory(models.Model):
tmp_lines[line.product_code] = line.product_qty
inventory.empty_line_ids.unlink()
for product_code in tmp_lines.keys():
products = product_obj.search(
[('default_code', '=', product_code)])
products = product_obj.search([
'|', ('default_code', '=', product_code),
('ean13', '=', product_code),
])
if products:
product = products[0]
fake_inventory = StockInventoryFake(