Join with a unique currency rate

issue11255
review435291004
This commit is contained in:
Cédric Krier
2022-06-15 22:03:38 +02:00
parent 71eebb6166
commit a3757b74ba
+2 -2
View File
@@ -90,7 +90,7 @@ class Abstract(ModelSQL, ModelView):
condition=(move.currency == currency_rate.currency)
& (currency_rate.start_date <= move.effective_date)
& ((currency_rate.end_date == Null)
| (currency_rate.end_date >= move.effective_date))
| (currency_rate.end_date > move.effective_date))
)
.join(company,
condition=move.company == company.id)
@@ -100,7 +100,7 @@ class Abstract(ModelSQL, ModelView):
condition=(company.currency == currency_rate_company.currency)
& (currency_rate_company.start_date <= move.effective_date)
& ((currency_rate_company.end_date == Null)
| (currency_rate_company.end_date >= move.effective_date))
| (currency_rate_company.end_date > move.effective_date))
)
.join(from_location,
condition=(move.from_location == from_location.id))