[FIX]PRODUCT: the ean13 check is incorrect for check digit 0

lp bug: https://launchpad.net/bugs/690763 fixed

bzr revid: ron@tinyerp.com-20101216124052-pqkbymrrlm0yr8ia
This commit is contained in:
ron@tinyerp.com 2010-12-16 18:10:52 +05:30
parent 754c921bd0
commit 2646ac2706
1 changed files with 4 additions and 4 deletions

View File

@ -53,7 +53,7 @@ def check_ean(eancode):
evensum += int(finalean[i])
total=(oddsum * 3) + evensum
check = int(10 - math.ceil(total % 10.0))
check = int(10 - math.ceil(total % 10.0)) %10
if check != int(eancode[-1]):
return False
@ -503,9 +503,9 @@ class product_product(osv.osv):
if sellers:
for s in sellers:
mydict = {
'id': product.id,
'name': s.product_name or product.name,
'default_code': s.product_code or product.default_code,
'id': product.id,
'name': s.product_name or product.name,
'default_code': s.product_code or product.default_code,
'variants': product.variants
}
result.append(_name_get(mydict))