87 lines
2.5 KiB
Python
87 lines
2.5 KiB
Python
#This file is part of Tryton. The COPYRIGHT file at the top level of
|
|
#txhis repository contains the full copyright notices and license terms
|
|
|
|
from trytond.pool import Pool, PoolMeta
|
|
from trytond.model import ModelView, ModelSQL
|
|
from trytond.model import fields
|
|
|
|
__all__ = ['Product']
|
|
|
|
_RISK = [('uno', 'I'),
|
|
('dosA', 'IIA'),
|
|
('dosB', 'IIB')]
|
|
|
|
_USE = [('medico', 'Médico'),
|
|
('basico', 'Basico'),
|
|
('apoyo', 'Apoyo')]
|
|
|
|
_BIOMEDICAL_CLASS = [('diagnostico', 'Diagnóstico'),
|
|
('rehabilitación', 'Rehabilitación')]
|
|
|
|
_MAIN_TECNOLOGY = [('mecanico', 'Mecánico'),
|
|
('electrico', 'Electrico'),
|
|
('electronico', 'Electrónico'),
|
|
('hidraulico', 'Hidraulico'),
|
|
('neumatico', 'Neumatico')]
|
|
|
|
class Product(ModelSQL, ModelView, metaclass=PoolMeta):
|
|
'Product'
|
|
__name__ = 'product.template'
|
|
|
|
machine = fields.Boolean('It is machine')
|
|
risk = fields.Selection(_RISK, 'Type risk')
|
|
use = fields.Selection(_USE, 'Use')
|
|
biomedical_class = fields.Selection(_BIOMEDICAL_CLASS,
|
|
'Biomedical Class')
|
|
main_tecnology = fields.Selection(_MAIN_TECNOLOGY,
|
|
'Main tecnology')
|
|
calibration = fields.Boolean("Apply calibration")
|
|
observation = fields.Text(size=None)
|
|
trade_mark = fields.Char("Trade Mark", size=None, required=True)
|
|
model = fields.Char("Model", size=None, required=True)
|
|
reference = fields.Char("Reference", size=None, required=True)
|
|
origin_country = fields.Many2One('country.country',"Origin Country")
|
|
software_version = fields.Char(
|
|
"Origin country", size=None, required=True)
|
|
useful_life = fields.Char(
|
|
"Useful life", size=None, required=True)
|
|
warranty = fields.Char(
|
|
"Warranty", size=None, required=True)
|
|
serial = fields.Char(
|
|
"Serial", size=None, required=True)
|
|
health_register = fields.Char(
|
|
"Serial", size=None, required=True)
|
|
refurbish = fields.Boolean('Refurbish')
|
|
|
|
@staticmethod
|
|
def default_machine():
|
|
return False
|
|
|
|
@staticmethod
|
|
def default_risk():
|
|
return None
|
|
|
|
@staticmethod
|
|
def default_use():
|
|
return None
|
|
|
|
@staticmethod
|
|
def default_biomedical_class():
|
|
return None
|
|
|
|
@staticmethod
|
|
def default_main_tecnology():
|
|
return None
|
|
|
|
@staticmethod
|
|
def default_calibration():
|
|
return False
|
|
|
|
@staticmethod
|
|
def default_refurbish():
|
|
return False
|
|
|
|
|
|
|
|
|