diff options
| author | Florian da Costa <florian.dacosta@akretion.com> | 2017-02-17 15:42:59 +0100 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2017-02-27 17:00:28 +0100 |
| commit | 433f295b94f6efdf96ecebbffd7b593fadfa1504 (patch) | |
| tree | 06765d5a313057e5461ef8dfe417f3c99c209851 /addons | |
| parent | d612daae719ce3da86c3e44a91a6138a1733dcc2 (diff) | |
[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
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/l10n_fr_fec/wizard/fec.py | 8 |
1 files 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': |
