44 lines
1.8 KiB
Python
44 lines
1.8 KiB
Python
from trytond.model import ModelSQL, ModelView, fields
|
|
|
|
|
|
class OpticalEquipment(ModelSQL, ModelView):
|
|
'Optical Equipment'
|
|
__name__ = "optical.equipment"
|
|
|
|
company = fields.Many2One('company.company', "Company")
|
|
location = fields.Many2One('stock.location', "Location")
|
|
party = fields.Many2One('party.party', "Party")
|
|
#equipment_party = fields.Many2Many('optical.equipment-party.party', 'party', 'equipment', "Equipments")
|
|
party_address = fields.Many2One('party.address', "Party Address")
|
|
#origin = fields.reference("Origin", selection='get_origin', select=True)
|
|
product = fields.Many2One('product.product', "Product")
|
|
refurbish = fields.Boolean("Refurbish")
|
|
equipment_type = fields.Char('type')
|
|
risk = fields.Char('Type risk')
|
|
use = fields.Char('Use')
|
|
biomedical_class = fields.Char('Biomedical Class')
|
|
main_tecnology = fields.Char('Main tecnology')
|
|
calibration = fields.Boolean("Apply calibration")
|
|
mark_category = fields.Many2One('product.category', 'Mark')
|
|
model_category = fields.Many2One('product.category', "Model")
|
|
reference = fields.Char("Reference", size=None)
|
|
origin_country = fields.Many2One('country.country',"Origin Country")
|
|
software_version = fields.Char("Software version", size=None)
|
|
useful_life = fields.Char("Useful life", size=None)
|
|
warranty = fields.Char("Warranty", size=None)
|
|
serial = fields.Char("Serial", size=None)
|
|
health_register = fields.Char("Health Register", size=None)
|
|
|
|
@staticmethod
|
|
def get_origin():
|
|
return None
|
|
"""
|
|
class OpticalEquipmentParty(ModelSQL):
|
|
'Optical Equipment - Party'
|
|
__name__ = 'optical.equipment-party.party'
|
|
_table = 'optical_equipment_party_party'
|
|
|
|
party = fields.Many2One('party.party', 'Party', select=True)
|
|
equipment = fields.Many2One('optical.equipment', 'Equipment', select=True)
|
|
"""
|