Skip to content
Snippets Groups Projects
Commit e5a40ec9 authored by Benjamin's avatar Benjamin
Browse files

add cca

parent 04b5bd01
Branches
No related tags found
No related merge requests found
......@@ -190,12 +190,10 @@ class LeFilamentTdb(models.Model):
order by date_trunc('month', date);""")
tresorerie = self._cr.dictfetchall()
self._cr.execute("""SELECT to_char(date_trunc('month', e.date),'YYYY-MM') as mois,
self._cr.execute("""SELECT
sum(es.total_amount) as cca
from hr_expense_sheet es, hr_expense e
where es.id = e.sheet_id and e.payment_mode='own_account' and es.state!='done'
group by date_trunc('month', e.date)
order by date_trunc('month', e.date);""")
where es.id = e.sheet_id and e.payment_mode='own_account' and es.state!='done';""")
cca = self._cr.dictfetchall()
return { 'tresorerie': tresorerie, 'cca': cca }
......
......@@ -69,7 +69,7 @@ odoo.define('lefilament_tdb.tresorerie', function (require) {
entree.push(this.values.tresorerie[i].entree);
sortie.push(this.values.tresorerie[i].sortie * (-1) );
variation.push(this.values.tresorerie[i].variation);
cca.push(this.values.cca[i].cca);
cca.push(this.values.cca.cca);
labels.push(moment(this.values.tresorerie[i].mois).format('MMM YYYY'));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment