From 31a8acf9356f1dc4fdc0fa2bcad8fc5222496e23 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Thu, 4 Sep 2025 09:08:41 +0200 Subject: [PATCH] Limit closed period assigned moves search --- modules/stock/period.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/stock/period.py b/modules/stock/period.py index 0cbe0ad7ac..76d37019aa 100644 --- a/modules/stock/period.py +++ b/modules/stock/period.py @@ -134,7 +134,8 @@ class Period(Workflow, ModelSQL, ModelView): ('planned_date', '<=', recent_date), ], ('effective_date', '<=', recent_date), - ]]): + ]], + limit=1): raise PeriodCloseError( gettext('stock.msg_period_close_assigned_move'))