Skip to content
Extraits de code Groupes Projets
Valider 68432367 rédigé par Remi's avatar Remi
Parcourir les fichiers

Change way of calculating real costs

parent ce4484b2
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -68,7 +68,7 @@ class FilamentProjet(models.Model): ...@@ -68,7 +68,7 @@ class FilamentProjet(models.Model):
def _couts_annexes(self): def _couts_annexes(self):
account = self.analytic_account_id.id account = self.analytic_account_id.id
############## Calcul couts annexes ################ ############## Calcul couts annexes ################
self.env.cr.execute("select sum(untaxed_amount) from hr_expense where analytic_account_id=%s;", (account, ) ) self.env.cr.execute("select -sum(amount) from account_analytic_line where account_id=%s and project_id is null and ref is not null;", (account, ) )
couts_annexes = self.env.cr.fetchone()[0] couts_annexes = self.env.cr.fetchone()[0]
if couts_annexes: if couts_annexes:
self.lf_couts_annexes = couts_annexes self.lf_couts_annexes = couts_annexes
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter