From b78de696115bc6005fbfffe9f667c0f42f4aa085 Mon Sep 17 00:00:00 2001
From: remi_filament <remi@le-filament.com>
Date: Mon, 13 Nov 2017 12:10:05 +0100
Subject: [PATCH] Extend prospection to all tasks starting with this term

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

diff --git a/models/project.py b/models/project.py
index 99888ac..05aa71b 100644
--- a/models/project.py
+++ b/models/project.py
@@ -44,7 +44,7 @@ class FilamentProjet(models.Model):
 		self.lf_heures_prospection = 0.0
 		## Calcul heures   
 		if self.use_prospection:
-			self.env.cr.execute("select sum(aal.unit_amount) from account_analytic_line aal, project_task pt where aal.project_id=%s and pt.name like 'Prospection' and pt.id=aal.task_id;", (project, ) )
+			self.env.cr.execute("select sum(aal.unit_amount) from account_analytic_line aal, project_task pt where aal.project_id=%s and pt.name like %s and pt.id=aal.task_id;", (project, "Prospection%",) )
 			heures_prospection = self.env.cr.fetchone()[0]
 			if heures_prospection:
 				self.lf_heures_prospection = heures_prospection
-- 
GitLab