Join with a unique currency rate
issue11255 review435291004 (grafted from e076958f9f429733a0636d892fb505800bc99f85) --HG-- branch : 6.0
This commit is contained in:
1 parent
5aa30de3d5
commit
0213ca7cc1
1 file changed
+2
-2
+2
-2
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user