73 lines
1.9 KiB
Python
73 lines
1.9 KiB
Python
from trytond.pool import Pool, PoolMeta
|
|
from trytond.model import ModelView, ModelSql
|
|
from trytond.model import fields
|
|
|
|
__all__ = [Product]
|
|
|
|
_RISK = [(None, '')]
|
|
_USE = [(None, '')]
|
|
_BIOMEDICAL_CLASS = [(None, '')]
|
|
_MAIN_TECNOLOGY = [(None, '')]
|
|
|
|
class Product(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
|
|
|
|
|
|
|
|
|