From c50ddde0f1d3b15e2661f29803352b5884bc7b4f Mon Sep 17 00:00:00 2001 From: DavidJForgeFlow Date: Thu, 2 May 2024 12:19:45 +0200 Subject: [PATCH] [FIX] ddmrp_history: print correctly execution history. --- ddmrp_history/models/stock_buffer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ddmrp_history/models/stock_buffer.py b/ddmrp_history/models/stock_buffer.py index ab081dec9..5ccb8a57d 100644 --- a/ddmrp_history/models/stock_buffer.py +++ b/ddmrp_history/models/stock_buffer.py @@ -173,7 +173,9 @@ def stacked(df, categories): domain, order="on_hand_position desc", limit=1 ) history_tog = history_model.search( - domain, order="top_of_green desc", limit=1 + domain + [("top_of_green", "!=", False)], + order="top_of_green desc", + limit=1, ) finish_stack = max(history_oh.on_hand_position, history_tog.top_of_green)