kalenislims/lims_instrument_generic_form/resultsimport.py

28 lines
844 B
Python
Raw Normal View History

2017-10-08 02:23:22 +02:00
# -*- coding: utf-8 -*-
# This file is part of lims_instrument_generic_form module for Tryton.
# The COPYRIGHT file at the top level of this repository contains
# the full copyright notices and license terms.
from trytond.pool import PoolMeta
2019-03-04 15:41:58 +01:00
from . import generic_form_xls
2017-10-08 02:23:22 +02:00
2019-03-04 15:41:58 +01:00
class ResultsImport(metaclass=PoolMeta):
2017-10-08 02:23:22 +02:00
__name__ = 'lims.resultsimport'
@classmethod
def __setup__(cls):
2020-08-06 19:52:36 +02:00
super().__setup__()
2017-10-08 02:23:22 +02:00
controllers = [
('generic_form_xls', 'Generic Form - XLS'),
]
for controller in controllers:
if controller not in cls.name.selection:
cls.name.selection.append(controller)
def loadController(self):
if self.name == 'generic_form_xls':
self.controller = generic_form_xls
else:
2020-08-06 19:52:36 +02:00
return super().loadController()