Maintenance Activities add Template Product
This commit is contained in:
parent
ac426e48d6
commit
96ba378c57
@ -18,6 +18,10 @@ msgctxt "view:product.template:"
|
||||
msgid "Calibration"
|
||||
msgstr "Calibración"
|
||||
|
||||
msgctxt "view:product.template:"
|
||||
msgid "Maintenance Activities"
|
||||
msgstr "Actividades de Mantenimiento"
|
||||
|
||||
msgctxt "view:product.template:"
|
||||
msgid "Measurements of Equipment"
|
||||
msgstr "Medidas del Equipo"
|
||||
|
@ -245,12 +245,11 @@ class Maintenance(Workflow, ModelSQL, ModelView):
|
||||
#when the maintenance is in agended status
|
||||
diary = fields.One2Many('optical_equipment_maintenance.diary', 'diary')
|
||||
#Preventive maintenance
|
||||
initial_operation = fields.Boolean("Verificiación inicial de funcionamiento")
|
||||
initial_operation = fields.Boolean("Verificación inicial de funcionamiento")
|
||||
check_equipment = fields.Boolean("Revisión del Equipo")
|
||||
check_electric_system = fields.Boolean("Revisión del sistema electríco")
|
||||
clean_int_ext = fields.Boolean("Limpieza interior y exterior")
|
||||
clean_eyes = fields.Boolean("Limpieza de lentes y espejos")
|
||||
optical = fields.Boolean("Optical")
|
||||
check_calibration = fields.Boolean("Verificar Calibración")
|
||||
maintenance_activity = fields.One2Many('optical_equipment_maintenance.activity', 'maintenance', "Maintenance Activitys")
|
||||
#Calibration
|
||||
@ -331,35 +330,6 @@ class Maintenance(Workflow, ModelSQL, ModelView):
|
||||
def default_state_agended(cls):
|
||||
return 'no_agenda'
|
||||
|
||||
@classmethod
|
||||
def default_initial_operation(self):
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
def default_check_equipment(self):
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
def default_check_electric_system(self):
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
def default_clean_int_ext(self):
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
def default_clean_eyes(self):
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
def default_optical(self):
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
def default_check_calibration(self):
|
||||
return True
|
||||
|
||||
|
||||
@fields.depends('temperature_min', 'temperature_uom')
|
||||
def on_change_temperature_min(self):
|
||||
if self.temperature_min:
|
||||
@ -538,12 +508,24 @@ class Maintenance(Workflow, ModelSQL, ModelView):
|
||||
|
||||
@fields.depends('equipment', 'patterns_equipments')
|
||||
def on_change_equipment(self):
|
||||
if self.equipment and self.equipment.product.calibration:
|
||||
if self.equipment:
|
||||
self.patterns_equipments = self.equipment.product.k_pattern
|
||||
self.equipment_calibrate = self.equipment.product.calibration
|
||||
self.initial_operation = self.equipment.product.initial_operation
|
||||
self.check_equipment = self.equipment.product.check_equipment
|
||||
self.check_electric_system = self.equipment.product.check_electric_system
|
||||
self.clean_int_ext = self.equipment.product.clean_int_ext
|
||||
self.clean_eyes = self.equipment.product.clean_eyes
|
||||
self.check_calibration = self.equipment.product.check_calibration
|
||||
else:
|
||||
self.patterns_equipments = None
|
||||
self.equipment_calibrate = False
|
||||
self.initial_operation = False
|
||||
self.check_equipment = False
|
||||
self.check_electric_system = False
|
||||
self.clean_int_ext = False
|
||||
self.clean_eyes = False
|
||||
self.check_calibration = False
|
||||
|
||||
@classmethod
|
||||
@ModelView.button
|
||||
|
8
move.py
8
move.py
@ -164,7 +164,13 @@ class ShipmentOut(metaclass=PoolMeta):
|
||||
propietary=shipment.customer.id,
|
||||
equipment_calibrate= True if move.equipment.product.calibration else False,
|
||||
propietary_address=shipment.delivery_address.id,
|
||||
equipment=move.equipment.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)
|
||||
maintenance.save()
|
||||
shipment.service_maintenance_initial = True
|
||||
shipment.save()
|
||||
|
@ -187,6 +187,15 @@ class Template(metaclass=PoolMeta):
|
||||
states={'invisible': If(Eval('resolution_type') != 'analoga', True)},
|
||||
depends=['resolution_type'])
|
||||
Usubi = fields.Integer("Usub i",states={'required': Eval('calibration', False)},)
|
||||
|
||||
#maintenance activities
|
||||
initial_operation = fields.Boolean("Verificación inicial de funcionamiento")
|
||||
check_equipment = fields.Boolean("Revisión del Equipo")
|
||||
check_electric_system = fields.Boolean("Revisión del sistema electríco")
|
||||
clean_int_ext = fields.Boolean("Limpieza interior y exterior")
|
||||
clean_eyes = fields.Boolean("Limpieza de lentes y espejos")
|
||||
optical = fields.Boolean("Optical")
|
||||
check_calibration = fields.Boolean("Verificar Calibración")
|
||||
|
||||
|
||||
@classmethod
|
||||
|
@ -33,8 +33,6 @@
|
||||
<field name="clean_int_ext"/>
|
||||
<label name="clean_eyes"/>
|
||||
<field name="clean_eyes"/>
|
||||
<label name="optical"/>
|
||||
<field name="optical"/>
|
||||
<label name="check_calibration"/>
|
||||
<field name="check_calibration"/>
|
||||
</page>
|
||||
|
@ -84,6 +84,20 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<label name="Usubi"/>
|
||||
<field name="Usubi"/>
|
||||
</page>
|
||||
<page string="Maintenance Activities" id="maintenance_activities">
|
||||
<label name="initial_operation"/>
|
||||
<field name="initial_operation"/>
|
||||
<label name="check_equipment"/>
|
||||
<field name="check_equipment"/>
|
||||
<label name="check_electric_system"/>
|
||||
<field name="check_electric_system"/>
|
||||
<label name="clean_int_ext"/>
|
||||
<field name="clean_int_ext"/>
|
||||
<label name="clean_eyes"/>
|
||||
<field name="clean_eyes"/>
|
||||
<label name="check_calibration"/>
|
||||
<field name="check_calibration"/>
|
||||
</page>
|
||||
</xpath>
|
||||
<xpath expr="/form/notebook/page[@id='measurements']/label[@name='length']" position="before">
|
||||
<separator id="measurements_equipment" string="Measurements of Equipment" colspan="4"/>
|
||||
|
Loading…
Reference in New Issue
Block a user