[FIX] stock_account_valuation_report: exclude JE that are not posted

This commit is contained in:
AaronHForgeFlow
2022-08-03 10:28:19 +02:00
parent 18152442c6
commit 516aec6c97

View File

@@ -75,7 +75,9 @@ class ProductProduct(models.Model):
sum(aml.balance), sum(quantity),
array_agg(aml.id)
FROM account_move_line AS aml
INNER JOIN account_move AS am ON am.id = aml.move_id
WHERE aml.product_id IN %%s
AND am.state = 'posted'
AND aml.company_id=%%s %s
GROUP BY aml.product_id, aml.account_id"""
params = (