From 433f295b94f6efdf96ecebbffd7b593fadfa1504 Mon Sep 17 00:00:00 2001 From: Florian da Costa Date: Fri, 17 Feb 2017 15:42:59 +0100 Subject: [PATCH] [FIX] l10n_fr_fec: unaffected earning sign and separator in FEC The separator in the debit/credit columns of the report must contains coma instead of dots for decimal separator (fr). All the other columns (cf SQL query) contains coma but not this one. Inverse the currency sign of the credit column. Otherwise the credit is negative and sum of the balance is wrong (sum credit != debit) Closes #15550 --- addons/l10n_fr_fec/wizard/fec.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/l10n_fr_fec/wizard/fec.py b/addons/l10n_fr_fec/wizard/fec.py index 3acc2e7e644..cb6eabd3b89 100644 --- a/addons/l10n_fr_fec/wizard/fec.py +++ b/addons/l10n_fr_fec/wizard/fec.py @@ -184,11 +184,11 @@ class AccountFrFec(models.TransientModel): unaffected_earnings_amount = float(unaffected_earnings_results[11].replace(',', '.')) - float(unaffected_earnings_results[12].replace(',', '.')) listrow_amount = current_amount + unaffected_earnings_amount if listrow_amount > 0: - listrow[11] = str(listrow_amount) - listrow[12] = '0.00' + listrow[11] = str(listrow_amount).replace('.', ',') + listrow[12] = '0,00' else: - listrow[11] = '0.00' - listrow[12] = str(listrow_amount) + listrow[11] = '0,00' + listrow[12] = str(-listrow_amount).replace('.', ',') w.writerow([s.encode("utf-8") for s in listrow]) #if the unaffected earnings account wasn't in the selection yet: add it manually if not unaffected_earnings_line and unaffected_earnings_results and unaffected_earnings_results[11] != '0,00' and unaffected_earnings_results[12] != '0,00':