From 87a0d665d6fd5fed3c6904182866aeb12c93e39b Mon Sep 17 00:00:00 2001 From: David Date: Thu, 7 Nov 2024 11:39:53 +0100 Subject: [PATCH] [FIX] account_purchase_stock_report_non_billed: consider just done moves TT51626 --- account_purchase_stock_report_non_billed/models/stock_move.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/account_purchase_stock_report_non_billed/models/stock_move.py b/account_purchase_stock_report_non_billed/models/stock_move.py index f16af0be3c6..0e1e2bf0ef6 100644 --- a/account_purchase_stock_report_non_billed/models/stock_move.py +++ b/account_purchase_stock_report_non_billed/models/stock_move.py @@ -38,7 +38,8 @@ def get_quantity_invoiced(self, invoice_lines): date_end = self.env.context.get("moves_date_end") if date_start and date_end: moves = moves.filtered( - lambda ml: ml.date_done >= date_start and ml.date_done <= date_end + lambda ml: ml.state == "done" + and (ml.date_done >= date_start and ml.date_done <= date_end) ) total_qty = moves.get_total_devolution_moves() if qty_invoiced != total_qty: