@@ -40,28 +40,26 @@ class FilamentProjet(models.Model):
@api.one
def_total_heures_prospection(self):
res=0.0
project=self.id
self.lf_heures_prospection=0.0
## Calcul heures
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='Prospection' and pt.id=aal.task_id;",(project,))
ifself.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,))
heures_prospection=self.env.cr.fetchone()[0]
ifheures_prospection:
self.lf_heures_prospection=heures_prospection
else:
self.lf_heures_prospection=0.0
@api.one
def_total_heures_passees(self):
res=0.0
project=self.id
self.lf_heures_passees=0.0
## Calcul heures
self.env.cr.execute("select sum(unit_amount) from account_analytic_line where project_id=%s;",(project,))