From 55b9c3229e58a35d56bb5afde241777218369a3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Bernardi?= Date: Fri, 25 Mar 2022 13:37:47 -0300 Subject: [PATCH] lims: do not use annulled reports as current --- lims/results_report.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lims/results_report.py b/lims/results_report.py index 9169f641..14ab41be 100644 --- a/lims/results_report.py +++ b/lims/results_report.py @@ -2330,6 +2330,7 @@ class GenerateReport(Wizard): existing_details = ResultsDetail.search([ ('laboratory', '=', laboratory_id), ('samples.notebook', '=', notebook.id), + ('state', '!=', 'annulled'), ]) if existing_details: existing_reports = [d.report_version.results_report.id @@ -2567,6 +2568,7 @@ class GenerateReport(Wizard): existing_details = ResultsDetail.search([ ('laboratory', '=', laboratory_id), ('samples.notebook', '=', samples[0]['notebook']), + ('state', '!=', 'annulled'), ]) if existing_details: current_reports = [d.report_version.results_report.id