lims_diagnosis: add samples comparator wizard
This commit is contained in:
parent
017b94ad12
commit
c6fb61ec76
|
@ -933,7 +933,7 @@ class ResultsReportVersionDetailSample(ModelSQL, ModelView):
|
|||
version_detail = fields.Many2One('lims.results_report.version.detail',
|
||||
'Report Detail', required=True, ondelete='CASCADE', select=True)
|
||||
notebook = fields.Many2One('lims.notebook', 'Notebook', required=True,
|
||||
readonly=True)
|
||||
readonly=True)
|
||||
notebook_lines = fields.One2Many('lims.results_report.version.detail.line',
|
||||
'detail_sample', 'Analysis')
|
||||
product_type = fields.Function(fields.Many2One('lims.product.type',
|
||||
|
@ -941,6 +941,9 @@ class ResultsReportVersionDetailSample(ModelSQL, ModelView):
|
|||
matrix = fields.Function(fields.Many2One('lims.matrix', 'Matrix'),
|
||||
'get_notebook_field')
|
||||
|
||||
def get_rec_name(self, name):
|
||||
return self.notebook.rec_name
|
||||
|
||||
@classmethod
|
||||
def get_notebook_field(cls, samples, names):
|
||||
result = {}
|
||||
|
|
|
@ -29,6 +29,10 @@ def register():
|
|||
results_report.ResultsReportVersionDetailSample,
|
||||
results_report.ResultsReportVersionDetailLine,
|
||||
results_report.ChangeSampleDiagnosticianStart,
|
||||
results_report.OpenSamplesComparatorAsk,
|
||||
results_report.SamplesComparator,
|
||||
results_report.SamplesComparatorLine,
|
||||
results_report.Cron,
|
||||
notebook.Notebook,
|
||||
notebook.NotebookLine,
|
||||
notebook.NotebookLineRepeatAnalysisStart,
|
||||
|
@ -39,5 +43,6 @@ def register():
|
|||
Pool.register(
|
||||
sample.CreateSample,
|
||||
results_report.ChangeSampleDiagnostician,
|
||||
results_report.OpenSamplesComparator,
|
||||
notebook.NotebookLineRepeatAnalysis,
|
||||
module='lims_diagnosis', type_='wizard')
|
||||
|
|
|
@ -107,6 +107,90 @@ msgctxt "field:lims.sample,diagnostician:"
|
|||
msgid "Diagnostician"
|
||||
msgstr "Diagnosticador"
|
||||
|
||||
msgctxt "field:lims.samples_comparator,lines:"
|
||||
msgid "Lines"
|
||||
msgstr "Líneas"
|
||||
|
||||
msgctxt "field:lims.samples_comparator,notebook1:"
|
||||
msgid "Sample 1"
|
||||
msgstr "Muestra 1"
|
||||
|
||||
msgctxt "field:lims.samples_comparator,notebook1_diagnosis:"
|
||||
msgid "Diagnosis 1"
|
||||
msgstr "Diagnóstico 1"
|
||||
|
||||
msgctxt "field:lims.samples_comparator,notebook2:"
|
||||
msgid "Sample 2"
|
||||
msgstr "Muestra 2"
|
||||
|
||||
msgctxt "field:lims.samples_comparator,notebook2_diagnosis:"
|
||||
msgid "Diagnosis 2"
|
||||
msgstr "Diagnóstico 2"
|
||||
|
||||
msgctxt "field:lims.samples_comparator,notebook3:"
|
||||
msgid "Sample 3"
|
||||
msgstr "Muestra 3"
|
||||
|
||||
msgctxt "field:lims.samples_comparator,notebook3_diagnosis:"
|
||||
msgid "Diagnosis 3"
|
||||
msgstr "Diagnóstico 3"
|
||||
|
||||
msgctxt "field:lims.samples_comparator,notebook:"
|
||||
msgid "Sample"
|
||||
msgstr "Muestra"
|
||||
|
||||
msgctxt "field:lims.samples_comparator,notebook_diagnosis:"
|
||||
msgid "Diagnosis"
|
||||
msgstr "Diagnóstico"
|
||||
|
||||
msgctxt "field:lims.samples_comparator.ask,notebook:"
|
||||
msgid "Sample"
|
||||
msgstr "Muestra"
|
||||
|
||||
msgctxt "field:lims.samples_comparator.line,analysis:"
|
||||
msgid "Analysis"
|
||||
msgstr "Análisis"
|
||||
|
||||
msgctxt "field:lims.samples_comparator.line,converted_result:"
|
||||
msgid "Converted result"
|
||||
msgstr "Resultado convertido"
|
||||
|
||||
msgctxt "field:lims.samples_comparator.line,final_unit:"
|
||||
msgid "Final unit"
|
||||
msgstr "Unidad final"
|
||||
|
||||
msgctxt "field:lims.samples_comparator.line,initial_unit:"
|
||||
msgid "Initial unit"
|
||||
msgstr "Unidad inicial"
|
||||
|
||||
msgctxt "field:lims.samples_comparator.line,notebook1_result:"
|
||||
msgid "Sample 1"
|
||||
msgstr "Muestra 1"
|
||||
|
||||
msgctxt "field:lims.samples_comparator.line,notebook2_result:"
|
||||
msgid "Sample 2"
|
||||
msgstr "Muestra 2"
|
||||
|
||||
msgctxt "field:lims.samples_comparator.line,notebook3_result:"
|
||||
msgid "Sample 3"
|
||||
msgstr "Muestra 3"
|
||||
|
||||
msgctxt "field:lims.samples_comparator.line,notebook_line:"
|
||||
msgid "Notebook Line"
|
||||
msgstr "Línea de cuaderno"
|
||||
|
||||
msgctxt "field:lims.samples_comparator.line,repetition:"
|
||||
msgid "Repetition"
|
||||
msgstr "Repetición"
|
||||
|
||||
msgctxt "field:lims.samples_comparator.line,result:"
|
||||
msgid "Result"
|
||||
msgstr "Resultado"
|
||||
|
||||
msgctxt "field:lims.samples_comparator.line,sample:"
|
||||
msgid "Sample"
|
||||
msgstr "Muestra"
|
||||
|
||||
msgctxt "field:party.party,diagnostician:"
|
||||
msgid "Diagnostician"
|
||||
msgstr "Diagnosticador"
|
||||
|
@ -131,10 +215,18 @@ msgctxt "model:ir.action,name:act_html_diagnosis_template_list"
|
|||
msgid "Diagnosis Templates"
|
||||
msgstr "Plantillas de Diagnóstico"
|
||||
|
||||
msgctxt "model:ir.action,name:act_samples_comparator"
|
||||
msgid "Samples Comparator"
|
||||
msgstr "Comparador de muestras"
|
||||
|
||||
msgctxt "model:ir.action,name:wiz_notebook_change_diagnostician"
|
||||
msgid "Change Sample Diagnostician"
|
||||
msgstr "Cambiar Diagnosticador"
|
||||
|
||||
msgctxt "model:ir.action,name:wiz_open_samples_comparator"
|
||||
msgid "Samples Comparator"
|
||||
msgstr "Comparador de muestras"
|
||||
|
||||
msgctxt ""
|
||||
"model:ir.action.act_window.domain,name:act_lims_results_report_version_detail_domain_diagnosed"
|
||||
msgid "Diagnosed"
|
||||
|
@ -144,6 +236,10 @@ msgctxt "model:ir.message,text:lbl_line_acceptance"
|
|||
msgid "Notebook Line Acceptance"
|
||||
msgstr "Aceptación de Línea de cuaderno"
|
||||
|
||||
msgctxt "model:ir.ui.menu,name:lims_open_samples_comparator_menu"
|
||||
msgid "Samples Comparator"
|
||||
msgstr "Comparador de muestras"
|
||||
|
||||
msgctxt "model:ir.ui.menu,name:menu_diagnosis_state_list"
|
||||
msgid "Diagnosis States"
|
||||
msgstr "Estados de Diagnóstico"
|
||||
|
@ -176,6 +272,22 @@ msgctxt "model:lims.notebook.change_diagnostician.start,name:"
|
|||
msgid "Change Sample Diagnostician"
|
||||
msgstr "Cambiar Diagnosticador"
|
||||
|
||||
msgctxt "model:lims.samples_comparator,name:"
|
||||
msgid "Samples Comparator"
|
||||
msgstr "Comparador de muestras"
|
||||
|
||||
msgctxt "model:lims.samples_comparator.ask,name:"
|
||||
msgid "Samples Comparator"
|
||||
msgstr "Comparador de muestras"
|
||||
|
||||
msgctxt "model:lims.samples_comparator.line,name:"
|
||||
msgid "Samples Comparator Line"
|
||||
msgstr "Línea de Comparador de muestras"
|
||||
|
||||
msgctxt "selection:ir.cron,method:"
|
||||
msgid "Delete Samples comparison records"
|
||||
msgstr "Eliminar registros de Comparación de muestras"
|
||||
|
||||
msgctxt "selection:lims.results_report.version.detail,state:"
|
||||
msgid "Diagnosed"
|
||||
msgstr "Diagnosticado"
|
||||
|
@ -192,6 +304,10 @@ msgctxt "view:lims.results_report.version.detail:"
|
|||
msgid "Diagnosed"
|
||||
msgstr "Diagnosticado"
|
||||
|
||||
msgctxt "view:lims.samples_comparator:"
|
||||
msgid "Diagnostics"
|
||||
msgstr "Diagnósticos"
|
||||
|
||||
msgctxt "wizard_button:lims.notebook.change_diagnostician,start,change:"
|
||||
msgid "Change"
|
||||
msgstr "Cambiar"
|
||||
|
@ -199,3 +315,11 @@ msgstr "Cambiar"
|
|||
msgctxt "wizard_button:lims.notebook.change_diagnostician,start,end:"
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
msgctxt "wizard_button:lims.samples_comparator.open,ask,end:"
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
msgctxt "wizard_button:lims.samples_comparator.open,ask,open_:"
|
||||
msgid "Open"
|
||||
msgstr "Abrir"
|
||||
|
|
|
@ -2,15 +2,19 @@
|
|||
# The COPYRIGHT file at the top level of this repository contains
|
||||
# the full copyright notices and license terms.
|
||||
|
||||
from trytond.model import ModelView, fields
|
||||
from trytond.wizard import Wizard, StateTransition, StateView, Button
|
||||
from trytond.model import ModelView, ModelSQL, fields
|
||||
from trytond.wizard import Wizard, StateTransition, StateView, StateAction, \
|
||||
Button
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.pyson import Eval
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.i18n import gettext
|
||||
|
||||
__all__ = ['ResultsReportVersionDetail', 'ResultsReportVersionDetailSample',
|
||||
'ResultsReportVersionDetailLine', 'ChangeSampleDiagnosticianStart',
|
||||
'ChangeSampleDiagnostician']
|
||||
'ChangeSampleDiagnostician', 'OpenSamplesComparatorAsk',
|
||||
'OpenSamplesComparator', 'SamplesComparator', 'SamplesComparatorLine',
|
||||
'Cron']
|
||||
|
||||
|
||||
class ResultsReportVersionDetail(metaclass=PoolMeta):
|
||||
|
@ -181,3 +185,285 @@ class ChangeSampleDiagnostician(Wizard):
|
|||
samples = Sample.browse(list(samples_ids))
|
||||
Sample.write(samples, {'diagnostician': self.start.diagnostician.id})
|
||||
return 'end'
|
||||
|
||||
|
||||
class OpenSamplesComparatorAsk(ModelView):
|
||||
'Samples Comparator'
|
||||
__name__ = 'lims.samples_comparator.ask'
|
||||
|
||||
notebook = fields.Many2One('lims.notebook', 'Sample', required=True)
|
||||
|
||||
|
||||
class OpenSamplesComparator(Wizard):
|
||||
'Samples Comparator'
|
||||
__name__ = 'lims.samples_comparator.open'
|
||||
|
||||
start = StateTransition()
|
||||
ask = StateView('lims.samples_comparator.ask',
|
||||
'lims_diagnosis.samples_comparator_ask_form', [
|
||||
Button('Cancel', 'end', 'tryton-cancel'),
|
||||
Button('Open', 'open_', 'tryton-ok', default=True),
|
||||
])
|
||||
open_ = StateAction('lims_diagnosis.act_samples_comparator')
|
||||
|
||||
def transition_start(self):
|
||||
ResultsSample = Pool().get('lims.results_report.version.detail.sample')
|
||||
active_model = Transaction().context['active_model']
|
||||
if active_model == 'lims.results_report.version.detail.sample':
|
||||
sample = ResultsSample(Transaction().context['active_id'])
|
||||
self.ask.notebook = sample.notebook.id
|
||||
return 'open_'
|
||||
return 'ask'
|
||||
|
||||
def do_open_(self, action):
|
||||
SamplesComparator = Pool().get('lims.samples_comparator')
|
||||
notebook = self.ask.notebook
|
||||
lines = [{'notebook_line': l.id} for l in notebook.lines]
|
||||
comparison = SamplesComparator.create([{
|
||||
'notebook': notebook.id,
|
||||
'lines': [('create', lines)],
|
||||
}])[0]
|
||||
action['res_id'] = [comparison.id]
|
||||
return action, {}
|
||||
|
||||
def transition_open_(self):
|
||||
return 'end'
|
||||
|
||||
|
||||
class SamplesComparator(ModelSQL, ModelView):
|
||||
'Samples Comparator'
|
||||
__name__ = 'lims.samples_comparator'
|
||||
|
||||
lines = fields.One2Many('lims.samples_comparator.line', 'sample',
|
||||
'Lines', readonly=True)
|
||||
notebook = fields.Many2One('lims.notebook', 'Sample', required=True,
|
||||
readonly=True)
|
||||
notebook1 = fields.Many2One('lims.notebook', 'Sample 1')
|
||||
notebook2 = fields.Many2One('lims.notebook', 'Sample 2')
|
||||
notebook3 = fields.Many2One('lims.notebook', 'Sample 3')
|
||||
notebook_diagnosis = fields.Function(fields.Text(
|
||||
'Diagnosis'), 'on_change_with_notebook_diagnosis')
|
||||
notebook1_diagnosis = fields.Function(fields.Text(
|
||||
'Diagnosis 1'), 'on_change_with_notebook1_diagnosis')
|
||||
notebook2_diagnosis = fields.Function(fields.Text(
|
||||
'Diagnosis 2'), 'on_change_with_notebook2_diagnosis')
|
||||
notebook3_diagnosis = fields.Function(fields.Text(
|
||||
'Diagnosis 3'), 'on_change_with_notebook3_diagnosis')
|
||||
|
||||
@fields.depends('notebook')
|
||||
def on_change_with_notebook_diagnosis(self, name=None):
|
||||
if self.notebook:
|
||||
return self._get_notebook_diagnosis(self.notebook)
|
||||
return None
|
||||
|
||||
@fields.depends('notebook1')
|
||||
def on_change_with_notebook1_diagnosis(self, name=None):
|
||||
if self.notebook1:
|
||||
return self._get_notebook_diagnosis(self.notebook1)
|
||||
return None
|
||||
|
||||
@fields.depends('notebook2')
|
||||
def on_change_with_notebook2_diagnosis(self, name=None):
|
||||
if self.notebook2:
|
||||
return self._get_notebook_diagnosis(self.notebook2)
|
||||
return None
|
||||
|
||||
@fields.depends('notebook3')
|
||||
def on_change_with_notebook3_diagnosis(self, name=None):
|
||||
if self.notebook3:
|
||||
return self._get_notebook_diagnosis(self.notebook3)
|
||||
return None
|
||||
|
||||
def _get_notebook_diagnosis(self, notebook):
|
||||
ResultsSample = Pool().get('lims.results_report.version.detail.sample')
|
||||
samples = ResultsSample.search([
|
||||
('notebook', '=', notebook),
|
||||
])
|
||||
if not samples:
|
||||
return None
|
||||
return samples[0].diagnosis
|
||||
|
||||
@classmethod
|
||||
def clean_buffer(cls):
|
||||
comparisons = cls.search([])
|
||||
cls.delete(comparisons)
|
||||
|
||||
|
||||
class SamplesComparatorLine(ModelSQL, ModelView):
|
||||
'Samples Comparator Line'
|
||||
__name__ = 'lims.samples_comparator.line'
|
||||
|
||||
sample = fields.Many2One('lims.samples_comparator', 'Sample',
|
||||
required=True, ondelete='CASCADE', select=True)
|
||||
notebook_line = fields.Many2One('lims.notebook.line', 'Notebook Line',
|
||||
required=True, readonly=True, select=True)
|
||||
analysis = fields.Function(fields.Many2One('lims.analysis', 'Analysis'),
|
||||
'get_nline_field')
|
||||
repetition = fields.Function(fields.Integer('Repetition'),
|
||||
'get_nline_field')
|
||||
result = fields.Function(fields.Char('Result'), 'get_line_result')
|
||||
initial_unit = fields.Function(fields.Many2One('product.uom',
|
||||
'Initial unit'), 'get_nline_field')
|
||||
converted_result = fields.Function(fields.Char('Converted result'),
|
||||
'get_line_result')
|
||||
final_unit = fields.Function(fields.Many2One('product.uom',
|
||||
'Final unit'), 'get_nline_field')
|
||||
notebook1_result = fields.Function(fields.Char('Sample 1'),
|
||||
'get_comparison_result')
|
||||
notebook2_result = fields.Function(fields.Char('Sample 2'),
|
||||
'get_comparison_result')
|
||||
notebook3_result = fields.Function(fields.Char('Sample 3'),
|
||||
'get_comparison_result')
|
||||
|
||||
@classmethod
|
||||
def get_nline_field(cls, lines, names):
|
||||
result = {}
|
||||
for name in names:
|
||||
result[name] = {}
|
||||
if cls._fields[name]._type == 'many2one':
|
||||
for l in lines:
|
||||
field = getattr(l.notebook_line, name, None)
|
||||
result[name][l.id] = field.id if field else None
|
||||
else:
|
||||
for l in lines:
|
||||
result[name][l.id] = getattr(l.notebook_line, name, None)
|
||||
return result
|
||||
|
||||
@classmethod
|
||||
def get_line_result(cls, lines, names):
|
||||
result = {}
|
||||
for name in names:
|
||||
result[name] = {}
|
||||
if name == 'result':
|
||||
for l in lines:
|
||||
result[name][l.id] = cls._get_result(
|
||||
l.notebook_line)
|
||||
elif name == 'converted_result':
|
||||
for l in lines:
|
||||
result[name][l.id] = cls._get_converted_result(
|
||||
l.notebook_line)
|
||||
return result
|
||||
|
||||
@classmethod
|
||||
def _get_result(cls, notebook_line):
|
||||
literal_result = notebook_line.literal_result
|
||||
result = notebook_line.result
|
||||
decimals = notebook_line.decimals
|
||||
result_modifier = notebook_line.result_modifier
|
||||
|
||||
res = ''
|
||||
if literal_result:
|
||||
res = literal_result
|
||||
else:
|
||||
if result:
|
||||
res = round(float(result), decimals)
|
||||
if decimals == 0:
|
||||
res = int(res)
|
||||
res = str(res)
|
||||
else:
|
||||
res = ''
|
||||
|
||||
if result_modifier == 'eq':
|
||||
res = res
|
||||
elif result_modifier == 'low':
|
||||
res = gettext('lims.msg_quantification_limit', loq=res)
|
||||
elif result_modifier == 'd':
|
||||
res = gettext('lims.msg_d')
|
||||
elif result_modifier == 'nd':
|
||||
res = gettext('lims.msg_nd')
|
||||
elif result_modifier == 'ni':
|
||||
res = ''
|
||||
elif result_modifier == 'pos':
|
||||
res = gettext('lims.msg_pos')
|
||||
elif result_modifier == 'neg':
|
||||
res = gettext('lims.msg_neg')
|
||||
elif result_modifier == 'pre':
|
||||
res = gettext('lims.msg_pre')
|
||||
elif result_modifier == 'abs':
|
||||
res = gettext('lims.msg_abs')
|
||||
else:
|
||||
res = result_modifier
|
||||
return res
|
||||
|
||||
@classmethod
|
||||
def _get_converted_result(cls, notebook_line):
|
||||
result = notebook_line.converted_result
|
||||
decimals = notebook_line.decimals
|
||||
result_modifier = notebook_line.converted_result_modifier
|
||||
|
||||
res = ''
|
||||
if not notebook_line.literal_result:
|
||||
if result:
|
||||
res = round(float(result), decimals)
|
||||
if decimals == 0:
|
||||
res = int(res)
|
||||
res = str(res)
|
||||
else:
|
||||
res = ''
|
||||
|
||||
if result_modifier == 'eq':
|
||||
res = res
|
||||
elif result_modifier == 'low':
|
||||
res = gettext('lims.msg_quantification_limit', loq=res)
|
||||
elif result_modifier == 'd':
|
||||
res = gettext('lims.msg_d')
|
||||
elif result_modifier == 'nd':
|
||||
res = gettext('lims.msg_nd')
|
||||
elif result_modifier == 'ni':
|
||||
res = ''
|
||||
elif result_modifier == 'pos':
|
||||
res = gettext('lims.msg_pos')
|
||||
elif result_modifier == 'neg':
|
||||
res = gettext('lims.msg_neg')
|
||||
elif result_modifier == 'pre':
|
||||
res = gettext('lims.msg_pre')
|
||||
elif result_modifier == 'abs':
|
||||
res = gettext('lims.msg_abs')
|
||||
else:
|
||||
res = result_modifier
|
||||
return res
|
||||
|
||||
@classmethod
|
||||
def get_comparison_result(cls, lines, names):
|
||||
result = {}
|
||||
for name in names:
|
||||
result[name] = {}
|
||||
if name == 'notebook1_result':
|
||||
for l in lines:
|
||||
result[name][l.id] = cls._get_comparison_result(
|
||||
l.sample.notebook1, l)
|
||||
elif name == 'notebook2_result':
|
||||
for l in lines:
|
||||
result[name][l.id] = cls._get_comparison_result(
|
||||
l.sample.notebook2, l)
|
||||
elif name == 'notebook3_result':
|
||||
for l in lines:
|
||||
result[name][l.id] = cls._get_comparison_result(
|
||||
l.sample.notebook3, l)
|
||||
return result
|
||||
|
||||
@classmethod
|
||||
def _get_comparison_result(cls, notebook, line):
|
||||
NotebookLine = Pool().get('lims.notebook.line')
|
||||
if not notebook:
|
||||
return None
|
||||
notebook_line = NotebookLine.search([
|
||||
('notebook', '=', notebook),
|
||||
('analysis', '=', line.notebook_line.analysis),
|
||||
('accepted', '=', True),
|
||||
])
|
||||
if not notebook_line:
|
||||
return None
|
||||
return cls._get_result(notebook_line[0])
|
||||
|
||||
|
||||
class Cron(metaclass=PoolMeta):
|
||||
__name__ = 'ir.cron'
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super().__setup__()
|
||||
cls.method.selection.extend([
|
||||
('lims.samples_comparator|clean_buffer',
|
||||
'Delete Samples comparison records'),
|
||||
])
|
||||
|
|
|
@ -74,5 +74,65 @@
|
|||
<field name="action" ref="wiz_notebook_change_diagnostician"/>
|
||||
</record>
|
||||
|
||||
<!-- Wizard Open Samples Comparator -->
|
||||
|
||||
<record model="ir.ui.view" id="samples_comparator_ask_form">
|
||||
<field name="model">lims.samples_comparator.ask</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">samples_comparator_ask_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.wizard" id="wiz_open_samples_comparator">
|
||||
<field name="name">Samples Comparator</field>
|
||||
<field name="wiz_name">lims.samples_comparator.open</field>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="wiz_open_samples_comparator_keyword">
|
||||
<field name="keyword">form_action</field>
|
||||
<field name="model">lims.results_report.version.detail.sample,-1</field>
|
||||
<field name="action" ref="wiz_open_samples_comparator"/>
|
||||
</record>
|
||||
<menuitem action="wiz_open_samples_comparator"
|
||||
id="lims_open_samples_comparator_menu"
|
||||
parent="lims.lims_results_report_version_detail_menu" sequence="10"/>
|
||||
|
||||
<!-- Samples Comparator -->
|
||||
|
||||
<record model="ir.ui.view" id="samples_comparator_view_form">
|
||||
<field name="model">lims.samples_comparator</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">samples_comparator_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_samples_comparator">
|
||||
<field name="name">Samples Comparator</field>
|
||||
<field name="res_model">lims.samples_comparator</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_samples_comparator_view_form">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="samples_comparator_view_form"/>
|
||||
<field name="act_window" ref="act_samples_comparator"/>
|
||||
</record>
|
||||
|
||||
<!-- Samples Comparator Line -->
|
||||
|
||||
<record model="ir.ui.view" id="samples_comparator_line_view_list">
|
||||
<field name="model">lims.samples_comparator.line</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">samples_comparator_line_list</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="samples_comparator_line_view_form">
|
||||
<field name="model">lims.samples_comparator.line</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">samples_comparator_line_form</field>
|
||||
</record>
|
||||
|
||||
<!-- Cron -->
|
||||
|
||||
<record model="ir.cron" id="cron_samples_comparator_clean_records">
|
||||
<field name="interval_number" eval="1"/>
|
||||
<field name="interval_type">days</field>
|
||||
<field name="method">lims.samples_comparator|clean_buffer</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</tryton>
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<form>
|
||||
<label name="notebook"/>
|
||||
<field name="notebook"/>
|
||||
</form>
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0"?>
|
||||
<form>
|
||||
<label name="notebook"/>
|
||||
<field name="notebook"/>
|
||||
<label name="notebook1"/>
|
||||
<field name="notebook1"/>
|
||||
<label name="notebook2"/>
|
||||
<field name="notebook2"/>
|
||||
<label name="notebook3"/>
|
||||
<field name="notebook3"/>
|
||||
<notebook>
|
||||
<page name="lines">
|
||||
<field name="lines"/>
|
||||
</page>
|
||||
<page id="diagnostics" string="Diagnostics">
|
||||
<group id="diagnostics" colspan="4" col="2" yexpand="1" yfill="1">
|
||||
<separator name="notebook"/>
|
||||
<separator name="notebook1"/>
|
||||
<field name="notebook_diagnosis" widget="html"/>
|
||||
<field name="notebook1_diagnosis" widget="html"/>
|
||||
<separator name="notebook2"/>
|
||||
<separator name="notebook3"/>
|
||||
<field name="notebook2_diagnosis" widget="html"/>
|
||||
<field name="notebook3_diagnosis" widget="html"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0"?>
|
||||
<form>
|
||||
<label name="analysis"/>
|
||||
<field name="analysis"/>
|
||||
<label name="repetition"/>
|
||||
<field name="repetition"/>
|
||||
<label name="result"/>
|
||||
<field name="result"/>
|
||||
<label name="initial_unit"/>
|
||||
<field name="initial_unit"/>
|
||||
<label name="converted_result"/>
|
||||
<field name="converted_result"/>
|
||||
<label name="final_unit"/>
|
||||
<field name="final_unit"/>
|
||||
<label name="notebook1_result"/>
|
||||
<field name="notebook1_result"/>
|
||||
<label name="notebook2_result"/>
|
||||
<field name="notebook2_result"/>
|
||||
<label name="notebook3_result"/>
|
||||
<field name="notebook3_result"/>
|
||||
</form>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0"?>
|
||||
<tree>
|
||||
<field name="notebook_line" tree_invisible="1"/>
|
||||
<field name="analysis"/>
|
||||
<field name="repetition"/>
|
||||
<field name="result"/>
|
||||
<field name="initial_unit"/>
|
||||
<field name="converted_result"/>
|
||||
<field name="final_unit"/>
|
||||
<field name="notebook1_result"/>
|
||||
<field name="notebook2_result"/>
|
||||
<field name="notebook3_result"/>
|
||||
</tree>
|
Loading…
Reference in New Issue