From 3cf14a2db400d472af81b2b12bc479f46b47d2e0 Mon Sep 17 00:00:00 2001
From: remi_filament <remi@le-filament.com>
Date: Thu, 3 Aug 2017 15:59:41 +0200
Subject: [PATCH] Fix CCA with new table

---
 models/lefilament_tdb.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/models/lefilament_tdb.py b/models/lefilament_tdb.py
index 1c8e279..29f0387 100644
--- a/models/lefilament_tdb.py
+++ b/models/lefilament_tdb.py
@@ -130,7 +130,7 @@ class LeFilamentTdb(models.Model):
             	(select sum(amount) from account_bank_statement_line where amount > 0 and date >= date_trunc('year', current_date) ) as entree,
             	(select sum(amount) from account_bank_statement_line where amount < 0 and date >= date_trunc('year', current_date) ) as sortie,
             	(select sum(amount) from account_bank_statement_line where date >= date_trunc('year', current_date) ) as variation,
-            	(select sum(total_amount) from hr_expense where payment_mode='own_account' and state!='done' ) as cca,
+            	(select sum(total_amount) from hr_expense_sheet where payment_mode='own_account' and state!='done' ) as cca,
             	(select sum(price_subtotal-qty_invoiced*price_unit) from sale_order_line where invoice_status='to invoice') as commandes; """)
 		datas = self._cr.dictfetchall()
 
-- 
GitLab