From 09a2ef2e7c967a757c578eaa37c3e8bab80993f3 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 20 Nov 2018 10:49:47 +0000 Subject: [PATCH] [FIX] l10n_fr_fec: date The FEC report fails to generate because of an incorrect variable type. opw-1908541 closes odoo/odoo#28832 --- addons/l10n_fr_fec/wizard/account_fr_fec.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/l10n_fr_fec/wizard/account_fr_fec.py b/addons/l10n_fr_fec/wizard/account_fr_fec.py index b18518cffe0..be79824967a 100644 --- a/addons/l10n_fr_fec/wizard/account_fr_fec.py +++ b/addons/l10n_fr_fec/wizard/account_fr_fec.py @@ -66,7 +66,7 @@ class AccountFrFec(models.TransientModel): AND am.state = 'posted' ''' company = self.env.user.company_id - formatted_date_from = self.date_from.replace('-', '') + formatted_date_from = fields.Date.to_string(self.date_from).replace('-', '') date_from = self.date_from formatted_date_year = date_from.year self._cr.execute( @@ -172,7 +172,7 @@ class AccountFrFec(models.TransientModel): HAVING sum(aml.balance) != 0 AND aat.type not in ('receivable', 'payable') ''' - formatted_date_from = self.date_from.replace('-', '') + formatted_date_from = fields.Date.to_string(self.date_from).replace('-', '') date_from = self.date_from formatted_date_year = date_from.year self._cr.execute( @@ -332,7 +332,7 @@ class AccountFrFec(models.TransientModel): w.writerow(list(row)) siren = company.vat[4:13] - end_date = self.date_to.replace('-', '') + end_date = fields.Date.to_string(self.date_to).replace('-', '') suffix = '' if self.export_type == "nonofficial": suffix = '-NONOFFICIAL'