lims_analysis_sheet: correct the state of details for analyzes added by notebook rules
This commit is contained in:
parent
aca2e3aefd
commit
0589a8b109
|
@ -116,6 +116,9 @@ class NotebookRule(metaclass=PoolMeta):
|
||||||
if analysis_detail:
|
if analysis_detail:
|
||||||
EntryDetailAnalysis.create_notebook_lines(analysis_detail,
|
EntryDetailAnalysis.create_notebook_lines(analysis_detail,
|
||||||
line.notebook_line.fraction)
|
line.notebook_line.fraction)
|
||||||
|
EntryDetailAnalysis.write(analysis_detail, {
|
||||||
|
'state': 'unplanned',
|
||||||
|
})
|
||||||
notebook_lines = NotebookLine.search([
|
notebook_lines = NotebookLine.search([
|
||||||
('analysis_detail', 'in', [d.id for d in analysis_detail])])
|
('analysis_detail', 'in', [d.id for d in analysis_detail])])
|
||||||
sheet = AnalysisSheet(Transaction().context.get(
|
sheet = AnalysisSheet(Transaction().context.get(
|
||||||
|
@ -124,6 +127,10 @@ class NotebookRule(metaclass=PoolMeta):
|
||||||
nl.get_analysis_sheet_template() == sheet.template.id]
|
nl.get_analysis_sheet_template() == sheet.template.id]
|
||||||
if notebook_lines:
|
if notebook_lines:
|
||||||
NotebookLine.write(notebook_lines, {'start_date': today})
|
NotebookLine.write(notebook_lines, {'start_date': today})
|
||||||
|
analysis_details = [nl.analysis_detail
|
||||||
|
for nl in notebook_lines]
|
||||||
|
EntryDetailAnalysis.write(analysis_details,
|
||||||
|
{'state': 'planned'})
|
||||||
sheet.create_lines(notebook_lines)
|
sheet.create_lines(notebook_lines)
|
||||||
|
|
||||||
def _exec_sheet_edit(self, line):
|
def _exec_sheet_edit(self, line):
|
||||||
|
|
Loading…
Reference in New Issue