From 92c716229a2f5a6a0f2ed2bb195e5c11ef6296bf Mon Sep 17 00:00:00 2001 From: David Monjoie Date: Tue, 26 Jul 2016 17:55:10 +0200 Subject: [PATCH] [FIX] l10n_fr_fec: fix null values in aml balance The aml.balance in the sql request is null, so the string encoding fails with an error. This is a quick fix because the customer needs this report for tomorrow, but a proper fix is required ! --- addons/l10n_fr_fec/wizard/fec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_fr_fec/wizard/fec.py b/addons/l10n_fr_fec/wizard/fec.py index 45c0470a553..5500d4dd05b 100644 --- a/addons/l10n_fr_fec/wizard/fec.py +++ b/addons/l10n_fr_fec/wizard/fec.py @@ -197,7 +197,7 @@ class AccountFrFec(models.TransientModel): if unaffected_earnings_account: unaffected_earnings_results[4] = unaffected_earnings_account.code unaffected_earnings_results[5] = unaffected_earnings_account.name - w.writerow([s.encode("utf-8") for s in unaffected_earnings_results]) + w.writerow([(s if s else '0,00').encode("utf-8") for s in unaffected_earnings_results]) # LINES sql_query = '''