Skip to content
Snippets Groups Projects
Commit b78de696 authored by Rémi - Le Filament's avatar Rémi - Le Filament
Browse files

Extend prospection to all tasks starting with this term

parent 4ca81893
Branches
No related tags found
No related merge requests found
...@@ -44,7 +44,7 @@ class FilamentProjet(models.Model): ...@@ -44,7 +44,7 @@ class FilamentProjet(models.Model):
self.lf_heures_prospection = 0.0 self.lf_heures_prospection = 0.0
## Calcul heures ## Calcul heures
if self.use_prospection: 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] heures_prospection = self.env.cr.fetchone()[0]
if heures_prospection: if heures_prospection:
self.lf_heures_prospection = heures_prospection self.lf_heures_prospection = heures_prospection
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment