[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:
parent
754c921bd0
commit
2646ac2706
|
@ -53,7 +53,7 @@ def check_ean(eancode):
|
||||||
evensum += int(finalean[i])
|
evensum += int(finalean[i])
|
||||||
total=(oddsum * 3) + evensum
|
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]):
|
if check != int(eancode[-1]):
|
||||||
return False
|
return False
|
||||||
|
@ -503,9 +503,9 @@ class product_product(osv.osv):
|
||||||
if sellers:
|
if sellers:
|
||||||
for s in sellers:
|
for s in sellers:
|
||||||
mydict = {
|
mydict = {
|
||||||
'id': product.id,
|
'id': product.id,
|
||||||
'name': s.product_name or product.name,
|
'name': s.product_name or product.name,
|
||||||
'default_code': s.product_code or product.default_code,
|
'default_code': s.product_code or product.default_code,
|
||||||
'variants': product.variants
|
'variants': product.variants
|
||||||
}
|
}
|
||||||
result.append(_name_get(mydict))
|
result.append(_name_get(mydict))
|
||||||
|
|
Loading…
Reference in New Issue