Skip to content
Extraits de code Groupes Projets
Valider 393b7e7c rédigé par Benjamin's avatar Benjamin
Parcourir les fichiers

fix erreurs requetes _cash_flow

parent 0cf13cb8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -201,9 +201,9 @@ class FilamentProjet(models.Model):
## Cash Flow Request
self.env.cr.execute("""
SELECT date, sum(sum(amount)) over (order by date) as Total,
sum(sum(case when is_timesheet then amount else 0 end)) over (order by date) as Timesheet,
sum(sum(case when is_timesheet = False and amount < 0 then amount else 0 end)) over (order by date) as Fournisseurs,
sum(sum(case when is_timesheet = False and amount > 0 then amount else 0 end)) over (order by date) as Clients
sum(sum(case when product_uom_id = 5 then amount else 0 end)) over (order by date) as Timesheet,
sum(sum(case when (product_uom_id = 1 or product_uom_id is null) and amount < 0 then amount else 0 end)) over (order by date) as Fournisseurs,
sum(sum(case when product_uom_id = 1 and amount > 0 then amount else 0 end)) over (order by date) as Clients
FROM account_analytic_line
WHERE account_id=%s
group by date;
......
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