[FIX]base_vat: ensure country_code is alphabetic
bzr revid: dle@openerp.com-20130521134231-fpsny6w54g3isg82
This commit is contained in:
parent
39e99c1ce5
commit
0faa40aefb
|
@ -83,6 +83,8 @@ class res_partner(osv.osv):
|
||||||
Check the VAT number depending of the country.
|
Check the VAT number depending of the country.
|
||||||
http://sima-pc.com/nif.php
|
http://sima-pc.com/nif.php
|
||||||
'''
|
'''
|
||||||
|
if not ustr(country_code).encode('utf-8').isalpha():
|
||||||
|
return False
|
||||||
check_func_name = 'check_vat_' + country_code
|
check_func_name = 'check_vat_' + country_code
|
||||||
check_func = getattr(self, check_func_name, None) or \
|
check_func = getattr(self, check_func_name, None) or \
|
||||||
getattr(vatnumber, check_func_name, None)
|
getattr(vatnumber, check_func_name, None)
|
||||||
|
|
Loading…
Reference in New Issue