From 0213ca7cc166d941d7e35764c1dd16962a0fc690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 15 Jun 2022 22:03:38 +0200 Subject: [PATCH] Join with a unique currency rate issue11255 review435291004 (grafted from e076958f9f429733a0636d892fb505800bc99f85) --HG-- branch : 6.0 --- sale_reporting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sale_reporting.py b/sale_reporting.py index aa99ad6218..8df510254f 100644 --- a/sale_reporting.py +++ b/sale_reporting.py @@ -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