projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e1258e7
)
[MERGE] base_vat: fix switzerland vat check for number having final csum == 0
author
Xavier ALT
<xal@openerp.com>
Fri, 29 Jun 2012 10:48:21 +0000
(12:48 +0200)
committer
Xavier ALT
<xal@openerp.com>
Fri, 29 Jun 2012 10:48:21 +0000
(12:48 +0200)
backport of trunk chs@openerp.com-
20120621143152
-1h8xvyoj5rw899ww
bzr revid: xal@openerp.com-
20120629104821
-27nzikgbdt4u5q9a
addons/base_vat/base_vat.py
patch
|
blob
|
history
diff --git
a/addons/base_vat/base_vat.py
b/addons/base_vat/base_vat.py
index
85abf2c
..
5726818
100644
(file)
--- a/
addons/base_vat/base_vat.py
+++ b/
addons/base_vat/base_vat.py
@@
-199,7
+199,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