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 f16af0be..0e1e2bf0 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 @@ class StockMove(models.Model): 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: