39 lines
1.7 KiB
Python
39 lines
1.7 KiB
Python
from collections import defaultdict
|
|
from trytond.pool import Pool
|
|
from trytond.model import ModelSQL, ModelView, fields
|
|
from trytond.exceptions import UserError
|
|
|
|
class OpticalEquipment(ModelSQL, ModelView):
|
|
'Optical Equipment'
|
|
__name__ = 'optical_equipment.equipment'
|
|
|
|
company = fields.Many2One('company.company', "Company")
|
|
location = fields.Many2One('stock.location', "Location")
|
|
propietary = fields.Many2One('party.party', "Propietary")
|
|
propietary_address = fields.Many2One('party.address', "Propietary Address", required=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)
|
|
|
|
subscription_history = fields.Many2Many('sale.subscription-optical_equipment.equipment',
|
|
'equipment','subscription', "Subscriptions",
|
|
states={'readonly': True})
|
|
|
|
@staticmethod
|
|
def get_origin():
|
|
return None
|