From 32368c132d9d27c7af2c3bcb2875b3ad5db5bcbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Bernardi?= Date: Wed, 19 May 2021 22:31:20 -0300 Subject: [PATCH] lims: results report: avoid user constraint --- lims/results_report.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lims/results_report.py b/lims/results_report.py index 5f4e9006..898cf9bb 100644 --- a/lims/results_report.py +++ b/lims/results_report.py @@ -401,9 +401,10 @@ class ResultsReportVersion(ModelSQL, ModelView): ResultsReport = pool.get('lims.results_report') Laboratory = pool.get('lims.laboratory') - results_reports = ResultsReport.search([ - ('id', '=', results_report_id), - ]) + with Transaction().set_user(0): + results_reports = ResultsReport.search([ + ('id', '=', results_report_id), + ]) report_number = results_reports[0].number laboratories = Laboratory.search([