Use left join on currency rate for margin report

issue11711
review421731003
This commit is contained in:
Maxime Richez committed 2022-09-28 09:47:03 +02:00
1 parent 90c3426330
commit 03ecc8544f
1 file changed
+1 -1
+1 -1
View File
@@ -86,7 +86,7 @@ class Abstract(ModelSQL, ModelView):
query=Currency.currency_rate_sql())
from_item = (move
.join(currency_rate,
.join(currency_rate, type_='LEFT',
condition=(move.currency == currency_rate.currency)
& (currency_rate.start_date <= move.effective_date)
& ((currency_rate.end_date == Null)