Merge pull request #454 from NL66278/10.0-fix-unidecode-warning

[10.0][FIX] account_banking_pain_base. Only unidecode unicode objects.
This commit is contained in:
Pedro M. Baeza
2018-03-02 11:03:44 +01:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -7,7 +7,7 @@
{
'name': 'Account Banking PAIN Base Module',
'summary': 'Base module for PAIN file generation',
'version': '10.0.1.1.0',
'version': '10.0.1.1.1',
'license': 'AGPL-3',
'author': "Akretion, "
"Noviat, "

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 = [
'"', '#', '$', '%', '&', '*', ';', '<', '>', '=', '@',
'[', ']', '^', '_', '`', '{', '}', '|', '~', '\\', '!']