diff --git a/lims_analysis_sheet/__init__.py b/lims_analysis_sheet/__init__.py index ee9c0fb6..390c2020 100644 --- a/lims_analysis_sheet/__init__.py +++ b/lims_analysis_sheet/__init__.py @@ -50,6 +50,7 @@ def register(): notebook.InternalRelationsCalc, notebook.LineInternalRelationsCalc, notebook.ResultsVerification, + notebook.LineResultsVerification, notebook.EvaluateRules, module='lims_analysis_sheet', type_='wizard') Pool.register( diff --git a/lims_analysis_sheet/locale/es.po b/lims_analysis_sheet/locale/es.po index 9fd19375..2f4c8885 100644 --- a/lims_analysis_sheet/locale/es.po +++ b/lims_analysis_sheet/locale/es.po @@ -292,6 +292,10 @@ msgctxt "model:ir.action,name:wiz_analysis_sheet_data_repeat_analysis" msgid "Repeat Analysis" msgstr "02) Repetir análisis" +msgctxt "model:ir.action,name:wiz_analysis_sheet_data_results_verification" +msgid "Results Verification" +msgstr "04) Verificación de resultados" + msgctxt "model:ir.action,name:wiz_analysis_sheet_evaluate_rules" msgid "Evaluate Rules" msgstr "05) Evaluar Reglas de cuaderno" @@ -824,6 +828,16 @@ msgctxt "wizard_button:lims.analysis_sheet_data.repeat_analysis,start,repeat:" msgid "Repeat" msgstr "Repetir" +msgctxt "" +"wizard_button:lims.analysis_sheet_data.results_verification,start,end:" +msgid "Cancel" +msgstr "Cancelar" + +msgctxt "" +"wizard_button:lims.analysis_sheet_data.results_verification,start,verify:" +msgid "Ok" +msgstr "Aceptar" + msgctxt "wizard_button:lims.planification.search_analysis_sheet,next,add:" msgid "Add" msgstr "Añadir" diff --git a/lims_analysis_sheet/notebook.py b/lims_analysis_sheet/notebook.py index 06bb7088..fb32b741 100644 --- a/lims_analysis_sheet/notebook.py +++ b/lims_analysis_sheet/notebook.py @@ -16,7 +16,8 @@ from trytond.modules.lims.formula_parser import FormulaParser __all__ = ['NotebookLine', 'AddControlStart', 'AddControl', 'LineAddControl', 'RepeatAnalysisStart', 'RepeatAnalysisStartLine', 'RepeatAnalysis', 'LineRepeatAnalysis', 'InternalRelationsCalc', 'LineInternalRelationsCalc', - 'ResultsVerificationStart', 'ResultsVerification', 'EvaluateRules'] + 'ResultsVerificationStart', 'ResultsVerification', + 'LineResultsVerification', 'EvaluateRules'] class NotebookLine(metaclass=PoolMeta): @@ -913,11 +914,13 @@ class ResultsVerification(Wizard): ]) verify = StateTransition() - def transition_check(self): - pool = Pool() - AnalysisSheet = pool.get('lims.analysis_sheet') + def _get_analysis_sheet_id(self): + return Transaction().context['active_id'] - sheet_id = Transaction().context['active_id'] + def transition_check(self): + AnalysisSheet = Pool().get('lims.analysis_sheet') + + sheet_id = self._get_analysis_sheet_id() sheet = AnalysisSheet(sheet_id) if sheet.state in ('active', 'validated'): @@ -943,7 +946,7 @@ class ResultsVerification(Wizard): Field = pool.get('lims.interface.table.field') Data = pool.get('lims.interface.data') - sheet_id = Transaction().context['active_id'] + sheet_id = self._get_analysis_sheet_id() sheet = AnalysisSheet(sheet_id) nl_result_field, = ModelField.search([ @@ -1107,6 +1110,17 @@ class ResultsVerification(Wizard): return gettext('lims.msg_out') +class LineResultsVerification(ResultsVerification): + 'Results Verification' + __name__ = 'lims.analysis_sheet_data.results_verification' + + def _get_analysis_sheet_id(self): + return Transaction().context['lims_analysis_sheet'] + + def end(self): + return 'reload' + + class EvaluateRules(Wizard): 'Evaluate Rules' __name__ = 'lims.analysis_sheet.evaluate_rules' diff --git a/lims_analysis_sheet/notebook.xml b/lims_analysis_sheet/notebook.xml index 0a7fd89e..1739af1a 100644 --- a/lims_analysis_sheet/notebook.xml +++ b/lims_analysis_sheet/notebook.xml @@ -120,6 +120,18 @@ + + + + Results Verification + lims.analysis_sheet_data.results_verification + + + form_action + lims.interface.data,-1 + + +