[FIX] base_vat: correct Switzerland VAT check

bzr revid: chs@openerp.com-20120621143152-1h8xvyoj5rw899ww
This commit is contained in:
Christophe Simonis 2012-06-21 16:31:52 +02:00
parent 2a31beee8b
commit 136589aafd
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2011 OpenERP SA (<http://openerp.com>)
# Copyright (C) 2004-2012 OpenERP SA (<http://openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -179,7 +179,7 @@ class res_partner(osv.osv):
num = filter(lambda s: s.isdigit(), match.group(1)) # get the digits only
factor = (5,4,3,2,7,6,5,4)
csum = sum([int(num[i]) * factor[i] for i in range(8)])
check = 11 - (csum % 11)
check = (11 - (csum % 11)) % 11
return check == int(num[8])
return False