changeset 94a4c9245492 in modules/stock:6.2
details: https://hg.tryton.org/modules/stock?cmd=changeset&node=94a4c9245492
description:
Join with a unique currency rate
issue11255
review435291004
(grafted from c2f056739e4856f2530b491653dfe8e5a8cb0461)
diffstat:
stock_reporting_margin.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r 351879fa7e6d -r 94a4c9245492 stock_reporting_margin.py
--- a/stock_reporting_margin.py Fri Jun 03 19:15:02 2022 +0200
+++ b/stock_reporting_margin.py Wed Jun 15 22:03:38 2022 +0200
@@ -91,7 +91,7 @@
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)
@@ -101,7 +101,7 @@
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))