[IMP] account-fincnancial-report - remove extra spaces
parent
1ccf49083f
commit
c7c21a3c89
|
@ -48,14 +48,14 @@ class AccountUnicodeWriter(object):
|
||||||
def writerow(self, row):
|
def writerow(self, row):
|
||||||
#we ensure that we do not try to encode none or bool
|
#we ensure that we do not try to encode none or bool
|
||||||
row = [x or u'' for x in row]
|
row = [x or u'' for x in row]
|
||||||
|
|
||||||
encoded_row = []
|
encoded_row = []
|
||||||
for c in row:
|
for c in row:
|
||||||
if type(c) == unicode:
|
if type(c) == unicode:
|
||||||
encoded_row.append(c.encode("utf-8"))
|
encoded_row.append(c.encode("utf-8"))
|
||||||
else:
|
else:
|
||||||
encoded_row.append(c)
|
encoded_row.append(c)
|
||||||
|
|
||||||
self.writer.writerow(encoded_row)
|
self.writer.writerow(encoded_row)
|
||||||
# Fetch UTF-8 output from the queue ...
|
# Fetch UTF-8 output from the queue ...
|
||||||
data = self.queue.getvalue()
|
data = self.queue.getvalue()
|
||||||
|
@ -144,12 +144,12 @@ class AccountCSVExport(orm.TransientModel):
|
||||||
{'fiscalyear_id': fiscalyear_id,'company_id':company_id,'period_ids':tuple(period_range_ids)}
|
{'fiscalyear_id': fiscalyear_id,'company_id':company_id,'period_ids':tuple(period_range_ids)}
|
||||||
)
|
)
|
||||||
res = cr.fetchall()
|
res = cr.fetchall()
|
||||||
|
|
||||||
rows = []
|
rows = []
|
||||||
for line in res:
|
for line in res:
|
||||||
rows.append(list(line))
|
rows.append(list(line))
|
||||||
return rows
|
return rows
|
||||||
|
|
||||||
def action_manual_export_analytic(self, cr, uid, ids, context=None):
|
def action_manual_export_analytic(self, cr, uid, ids, context=None):
|
||||||
this = self.browse(cr, uid, ids)[0]
|
this = self.browse(cr, uid, ids)[0]
|
||||||
rows = self.get_data(cr, uid, ids,"analytic", context)
|
rows = self.get_data(cr, uid, ids,"analytic", context)
|
||||||
|
@ -172,7 +172,7 @@ class AccountCSVExport(orm.TransientModel):
|
||||||
'views': [(False, 'form')],
|
'views': [(False, 'form')],
|
||||||
'target': 'new',
|
'target': 'new',
|
||||||
}
|
}
|
||||||
|
|
||||||
def _get_header_analytic(self, cr, uid, ids, context=None):
|
def _get_header_analytic(self, cr, uid, ids, context=None):
|
||||||
return [_(u'ANALYTIC CODE'),
|
return [_(u'ANALYTIC CODE'),
|
||||||
_(u'ANALYTIC NAME'),
|
_(u'ANALYTIC NAME'),
|
||||||
|
@ -201,7 +201,7 @@ class AccountCSVExport(orm.TransientModel):
|
||||||
{'fiscalyear_id': fiscalyear_id,'company_id':company_id,'period_ids':tuple(period_range_ids)}
|
{'fiscalyear_id': fiscalyear_id,'company_id':company_id,'period_ids':tuple(period_range_ids)}
|
||||||
)
|
)
|
||||||
res = cr.fetchall()
|
res = cr.fetchall()
|
||||||
|
|
||||||
rows = []
|
rows = []
|
||||||
for line in res:
|
for line in res:
|
||||||
rows.append(list(line))
|
rows.append(list(line))
|
||||||
|
|
Loading…
Reference in New Issue