Join with a unique currency rate

issue11255
review435291004
(grafted from e076958f9f429733a0636d892fb505800bc99f85)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier committed 2022-06-15 22:03:38 +02:00
1 parent 5aa30de3d5
commit 0213ca7cc1
1 file changed
+2 -2
+2 -2
View File
@@ -84,14 +84,14 @@ class Abstract(ModelSQL):
condition=(sale.currency == currency_sale.currency)
& (currency_sale.start_date <= sale.sale_date)
& ((currency_sale.end_date == Null)
| (currency_sale.end_date >= sale.sale_date))
| (currency_sale.end_date > sale.sale_date))
)
.join(company, condition=sale.company == company.id)
.join(currency_company,
condition=(company.currency == currency_company.currency)
& (currency_company.start_date <= sale.sale_date)
& ((currency_company.end_date == Null)
| (currency_company.end_date >= sale.sale_date))
| (currency_company.end_date > sale.sale_date))
))
return from_item, tables, withs