From cd49bc54c1988a3ecaeeb95aba588b86a64da7b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Bernardi?= Date: Tue, 26 May 2020 10:38:19 -0300 Subject: [PATCH] lims_report_html: add fields to list of samples pending reporting --- lims_report_html/__init__.py | 2 ++ lims_report_html/locale/es.po | 8 ++++++++ lims_report_html/notebook.py | 17 +++++++++++++++++ lims_report_html/sample.xml | 13 +++++++++++++ .../view/samples_pending_reporting_form.xml | 9 +++++++++ .../view/samples_pending_reporting_list.xml | 6 ++++++ 6 files changed, 55 insertions(+) create mode 100644 lims_report_html/notebook.py create mode 100644 lims_report_html/view/samples_pending_reporting_form.xml create mode 100644 lims_report_html/view/samples_pending_reporting_list.xml diff --git a/lims_report_html/__init__.py b/lims_report_html/__init__.py index c1c5984..8721853 100644 --- a/lims_report_html/__init__.py +++ b/lims_report_html/__init__.py @@ -7,6 +7,7 @@ from . import action from . import html_template from . import sample from . import results_report +from . import notebook def register(): @@ -17,6 +18,7 @@ def register(): sample.Sample, sample.CreateSampleStart, results_report.ResultsReportVersionDetail, + notebook.Notebook, module='lims_report_html', type_='model') Pool.register( action.ReportTranslationSet, diff --git a/lims_report_html/locale/es.po b/lims_report_html/locale/es.po index 8f7bb05..d7f73f0 100644 --- a/lims_report_html/locale/es.po +++ b/lims_report_html/locale/es.po @@ -10,6 +10,14 @@ msgctxt "field:lims.create_sample.start,resultrange_origin:" msgid "Comparison range" msgstr "Rango de comparaciĆ³n" +msgctxt "field:lims.notebook,result_template:" +msgid "Report Template" +msgstr "Plantilla de Informe" + +msgctxt "field:lims.notebook,resultrange_origin:" +msgid "Comparison range" +msgstr "Rango de comparaciĆ³n" + msgctxt "field:lims.result_report.template,content:" msgid "Content" msgstr "Contenido" diff --git a/lims_report_html/notebook.py b/lims_report_html/notebook.py new file mode 100644 index 0000000..31db52f --- /dev/null +++ b/lims_report_html/notebook.py @@ -0,0 +1,17 @@ +# This file is part of lims_report_html module for Tryton. +# The COPYRIGHT file at the top level of this repository contains +# the full copyright notices and license terms. + +from trytond.model import fields +from trytond.pool import PoolMeta + +__all__ = ['Notebook'] + + +class Notebook(metaclass=PoolMeta): + __name__ = 'lims.notebook' + + result_template = fields.Function(fields.Many2One( + 'lims.result_report.template', 'Report Template'), 'get_sample_field') + resultrange_origin = fields.Function(fields.Many2One('lims.range.type', + 'Comparison range'), 'get_sample_field') diff --git a/lims_report_html/sample.xml b/lims_report_html/sample.xml index 9a388e6..e883806 100644 --- a/lims_report_html/sample.xml +++ b/lims_report_html/sample.xml @@ -18,5 +18,18 @@ create_sample_start_form + + + + lims.notebook + + samples_pending_reporting_list + + + lims.notebook + + samples_pending_reporting_form + + diff --git a/lims_report_html/view/samples_pending_reporting_form.xml b/lims_report_html/view/samples_pending_reporting_form.xml new file mode 100644 index 0000000..ef86381 --- /dev/null +++ b/lims_report_html/view/samples_pending_reporting_form.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/lims_report_html/view/samples_pending_reporting_list.xml b/lims_report_html/view/samples_pending_reporting_list.xml new file mode 100644 index 0000000..73dd54e --- /dev/null +++ b/lims_report_html/view/samples_pending_reporting_list.xml @@ -0,0 +1,6 @@ + + + + + +