Skip to content
Extraits de code Groupes Projets
Valider e5a40ec9 rédigé par Benjamin's avatar Benjamin
Parcourir les fichiers

add cca

parent 04b5bd01
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -190,12 +190,10 @@ class LeFilamentTdb(models.Model): ...@@ -190,12 +190,10 @@ class LeFilamentTdb(models.Model):
order by date_trunc('month', date);""") order by date_trunc('month', date);""")
tresorerie = self._cr.dictfetchall() 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 sum(es.total_amount) as cca
from hr_expense_sheet es, hr_expense e from hr_expense_sheet es, hr_expense e
where es.id = e.sheet_id and e.payment_mode='own_account' and es.state!='done' 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);""")
cca = self._cr.dictfetchall() cca = self._cr.dictfetchall()
return { 'tresorerie': tresorerie, 'cca': cca } return { 'tresorerie': tresorerie, 'cca': cca }
......
...@@ -69,7 +69,7 @@ odoo.define('lefilament_tdb.tresorerie', function (require) { ...@@ -69,7 +69,7 @@ odoo.define('lefilament_tdb.tresorerie', function (require) {
entree.push(this.values.tresorerie[i].entree); entree.push(this.values.tresorerie[i].entree);
sortie.push(this.values.tresorerie[i].sortie * (-1) ); sortie.push(this.values.tresorerie[i].sortie * (-1) );
variation.push(this.values.tresorerie[i].variation); 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')); labels.push(moment(this.values.tresorerie[i].mois).format('MMM YYYY'));
} }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter