[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])
|
||||
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))
|
||||
|
|
Loading…
Reference in New Issue