From a3757b74ba239a88dc22e0169760510a31cd72ff 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 --- stock_reporting_margin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stock_reporting_margin.py b/stock_reporting_margin.py index 8dbdbfcb02..a3e773e4cc 100644 --- a/stock_reporting_margin.py +++ b/stock_reporting_margin.py @@ -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))