diff --git a/models/project.py b/models/project.py index 99888ac09a95f56fce3cbee2ac7e038d5d5804f2..05aa71bea4caf7cbe857260fd3a475399741a771 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