diff --git a/lefilament_projets.py b/lefilament_projets.py index bd1ecbd60b1ff983f0f3222a33e9cb817db51aef..45469a31223bc5e4c1aa7688da8995671dfeba29 100644 --- a/lefilament_projets.py +++ b/lefilament_projets.py @@ -5,7 +5,7 @@ import time from odoo import tools from odoo import models, fields, api, osv -class SapovalPartners(models.Model): +class FilamentProjet(models.Model): _name = 'project.project' _inherit = 'project.project' @@ -30,7 +30,7 @@ class SapovalPartners(models.Model): res = 0.0 account = self.analytic_account_id.id ############## Calcul couts annexes ################ - self.env.cr.execute("select sum(unit_amount) from account_analytic_line where is_timesheet=TRUE and account_id=%s;", (account, ) ) + self.env.cr.execute("select sum(unit_amount) from account_analytic_line where account_id=%s;", (account, ) ) heures_passees = self.env.cr.fetchone()[0] if heures_passees: self.lf_heures_passees = heures_passees @@ -49,7 +49,8 @@ class SapovalPartners(models.Model): def _couts_annexes(self): account = self.analytic_account_id.id ############## Calcul couts annexes ################ - self.env.cr.execute("select sum(amount) from account_analytic_line where amount<0 and is_timesheet=FALSE and account_id=%s;", (account, ) ) + ## self.env.cr.execute("select sum(amount) from account_analytic_line where amount<0 and is_timesheet=FALSE and account_id=%s;", (account, ) ) + self.env.cr.execute("select sum(amount) from account_analytic_line where amount<0 and account_id=%s;", (account, ) ) couts_annexes = self.env.cr.fetchone()[0] if couts_annexes: self.lf_couts_annexes = couts_annexes * (-1.0)