activities maintenance in button maintenance_initial
This commit is contained in:
parent
f9b4cf621d
commit
56b90c5d22
@ -127,6 +127,7 @@ class MaintenanceService(Workflow, ModelSQL, ModelView):
|
||||
Config = pool.get('optical_equipment.configuration')
|
||||
config = Config(1)
|
||||
temperature_min = config.temperature_min
|
||||
|
||||
return temperature_min
|
||||
|
||||
@staticmethod
|
||||
@ -135,6 +136,7 @@ class MaintenanceService(Workflow, ModelSQL, ModelView):
|
||||
Config = pool.get('optical_equipment.configuration')
|
||||
config = Config(1)
|
||||
temperature_max = config.temperature_max
|
||||
|
||||
return temperature_max
|
||||
|
||||
@staticmethod
|
||||
@ -143,6 +145,7 @@ class MaintenanceService(Workflow, ModelSQL, ModelView):
|
||||
Config = pool.get('optical_equipment.configuration')
|
||||
config = Config(1)
|
||||
moisture_min = config.moisture_min
|
||||
|
||||
return moisture_min
|
||||
|
||||
@staticmethod
|
||||
@ -151,6 +154,7 @@ class MaintenanceService(Workflow, ModelSQL, ModelView):
|
||||
Config = pool.get('optical_equipment.configuration')
|
||||
config = Config(1)
|
||||
temperature_uom = config.temperature_uom.id
|
||||
|
||||
return temperature_uom
|
||||
|
||||
@staticmethod
|
||||
@ -159,6 +163,7 @@ class MaintenanceService(Workflow, ModelSQL, ModelView):
|
||||
Config = pool.get('optical_equipment.configuration')
|
||||
config = Config(1)
|
||||
moisture_uom = config.moisture_uom.id
|
||||
|
||||
return moisture_uom
|
||||
|
||||
@staticmethod
|
||||
@ -167,6 +172,7 @@ class MaintenanceService(Workflow, ModelSQL, ModelView):
|
||||
Config = pool.get('optical_equipment.configuration')
|
||||
config = Config(1)
|
||||
moisture_max = config.moisture_max
|
||||
|
||||
return moisture_max
|
||||
|
||||
@classmethod
|
||||
@ -202,6 +208,7 @@ class MaintenanceService(Workflow, ModelSQL, ModelView):
|
||||
'Return list of Model names for origin Reference'
|
||||
pool = Pool()
|
||||
Contract = pool.get('optical_equipment.contract')
|
||||
|
||||
return [Contract.__name__]
|
||||
|
||||
|
||||
@ -210,6 +217,7 @@ class MaintenanceService(Workflow, ModelSQL, ModelView):
|
||||
Model = Pool().get('ir.model')
|
||||
get_name = Model.get_name
|
||||
models = cls._get_origin_contract()
|
||||
|
||||
return [(None, '')] + [(m, get_name(m)) for m in models]
|
||||
|
||||
@classmethod
|
||||
|
10
move.py
10
move.py
@ -166,11 +166,11 @@ class ShipmentOut(metaclass=PoolMeta):
|
||||
propietary_address=shipment.delivery_address.id,
|
||||
equipment=move.equipment.id,
|
||||
initial_operation = move.equipment.product.initial_operation,
|
||||
check_equipment = move.equipment.product.check_equipment,
|
||||
check_electric_system = move.equipment.product.check_electric_system,
|
||||
clean_int_ext = move.equipment.product.clean_int_ext,
|
||||
clean_eyes = move.equipment.product.clean_eyes,
|
||||
check_calibration = move.equipment.product.check_calibration,
|
||||
check_equipment = move.equipment.product.template.check_equipment,
|
||||
check_electric_system = move.equipment.product.template.check_electric_system,
|
||||
clean_int_ext = move.equipment.product.template.clean_int_ext,
|
||||
clean_eyes = move.equipment.product.template.clean_eyes,
|
||||
check_calibration = move.equipment.product.template.check_calibration,
|
||||
temperature_min = maintenanceService.temperature_min,
|
||||
temperature_max = maintenanceService.temperature_max,
|
||||
temperature_uom = maintenanceService.temperature_uom.id,
|
||||
|
Loading…
Reference in New Issue
Block a user