[FIX] l10n_fr_fec: date

The FEC report fails to generate because of an incorrect variable type.

opw-1908541

closes odoo/odoo#28832
This commit is contained in:
Nicolas Martinelli
2018-11-20 10:49:47 +00:00
parent 49e78f46ee
commit 09a2ef2e7c
+3 -3
View File
@@ -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'