lims: referral: avoid repetitions already planned

This commit is contained in:
Adrián Bernardi 2022-01-06 09:57:21 -03:00
parent 406a8ca1a5
commit e8f0d04be6
1 changed files with 1 additions and 0 deletions

View File

@ -6678,6 +6678,7 @@ class Referral(ModelSQL, ModelView):
details = [s for s in referral.services]
lines = NotebookLine.search([
('analysis_detail', 'in', details),
('end_date', '=', None),
])
NotebookLine.write(lines, {'start_date': referral.date})
EntryDetailAnalysis.write(details, {'state': 'referred'})