[FIX] account_banking_pain_base. Only unidecode unicode objects.

This commit is contained in:
Ronald Portier
2018-02-28 16:09:24 +01:00
parent 956ebd6e8b
commit 35e31f1dbb

View File

@@ -92,7 +92,8 @@ class AccountPaymentOrder(models.Model):
# cf section 1.4 "Character set" of the SEPA Credit Transfer
# Scheme Customer-to-bank guidelines
if gen_args.get('convert_to_ascii'):
value = unidecode(value)
if isinstance(value, unicode):
value = unidecode(value)
unallowed_ascii_chars = [
'"', '#', '$', '%', '&', '*', ';', '<', '>', '=', '@',
'[', ']', '^', '_', '`', '{', '}', '|', '~', '\\', '!']