Add patch to fix bug in party check vies function

This commit is contained in:
Bernat Brunet Torruella 2016-07-12 16:36:03 +02:00
parent 400eb82a92
commit b988a6358c
2 changed files with 19 additions and 0 deletions

18
party_check_vies.diff Normal file
View File

@ -0,0 +1,18 @@
diff -r 58883026cd88 party.py
--- a/trytond/trytond/modules/party/party.py Wed Dec 23 00:08:49 2015 +0100
+++ b/trytond/trytond/modules/party/party.py Tue Jul 12 16:30:39 2016 +0200
@@ -346,10 +346,11 @@
if identifier.type != 'eu_vat':
continue
try:
- if not vat.check_vies(identifier.code):
+ res = vat.check_vies(identifier.code)
+ if res and 'valid' in res and res['valid']:
+ parties_succeed.append(party.id)
+ else:
parties_failed.append(party.id)
- else:
- parties_succeed.append(party.id)
except Exception, e:
if hasattr(e, 'faultstring') \
and hasattr(e.faultstring, 'find'):

1
series
View File

@ -42,6 +42,7 @@ analytic_purchase.diff
tax_active_invisible.diff
account_product_rules.diff
issue5558.diff
party_check_vies.diff
# Ignore next patches
#incremental_wait_in_retries.diff