add traslations
This commit is contained in:
parent
9493d39b9f
commit
a3ef82f4d1
436
locale/es.po
436
locale/es.po
@ -674,3 +674,439 @@ msgstr "Técnico"
|
|||||||
msgctxt "field:optical_equipment_maintenance.service,state:"
|
msgctxt "field:optical_equipment_maintenance.service,state:"
|
||||||
msgid "State"
|
msgid "State"
|
||||||
msgstr "Estado"
|
msgstr "Estado"
|
||||||
|
|
||||||
|
msgctxt "field:party.party,client_type:"
|
||||||
|
msgid "Client type"
|
||||||
|
msgstr "Tipo de Cliente"
|
||||||
|
|
||||||
|
msgctxt "field:party.party,client_type:"
|
||||||
|
msgid "Client type"
|
||||||
|
msgstr "Tipo de Cliente"
|
||||||
|
|
||||||
|
msgctxt "field:product.template,software_required:"
|
||||||
|
msgid "Software Required"
|
||||||
|
msgstr "Software Requerido"
|
||||||
|
|
||||||
|
msgctxt "view:product.product:"
|
||||||
|
msgid "Calibration"
|
||||||
|
msgstr "Calibración"
|
||||||
|
|
||||||
|
msgctxt "view:product.product:"
|
||||||
|
msgid "Measurements of Equipment"
|
||||||
|
msgstr "Medidas del Equipo"
|
||||||
|
|
||||||
|
msgctxt "view:product.product:"
|
||||||
|
msgid "Enviromental Working Conditions"
|
||||||
|
msgstr "Condiciones Ambientales de Trabajo"
|
||||||
|
|
||||||
|
msgctxt "view:product.product:"
|
||||||
|
msgid "Electrical Conditions"
|
||||||
|
msgstr "Condiciones Electricas"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,equipment:"
|
||||||
|
msgid "It is equipment"
|
||||||
|
msgstr "Es equipo"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,electrical_equipment:"
|
||||||
|
msgid "Electrical Equipment"
|
||||||
|
msgstr "Equipo Eléctrico"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,maintenance_activity:"
|
||||||
|
msgid "Maintenance Activity"
|
||||||
|
msgstr "Actividad de Mantenimiento"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,replacement:"
|
||||||
|
msgid "Replacement"
|
||||||
|
msgstr "Repuesto"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,equipment_type:"
|
||||||
|
msgid "Equipment type"
|
||||||
|
msgstr "Tipo de Equipo"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,risk:"
|
||||||
|
msgid "Type risk"
|
||||||
|
msgstr "Tipo de riesgo"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,use:"
|
||||||
|
msgid "Use"
|
||||||
|
msgstr "Uso"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,biomedical_class:"
|
||||||
|
msgid "Biomedical Class"
|
||||||
|
msgstr "Clase Biomedica"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,main_tecnology:"
|
||||||
|
msgid "Main tecnology"
|
||||||
|
msgstr "Tecnología principal"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,calibration:"
|
||||||
|
msgid "Apply calibration"
|
||||||
|
msgstr "Aplica calibración"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,observation:"
|
||||||
|
msgid "Observation"
|
||||||
|
msgstr "Observación"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,mark_category:"
|
||||||
|
msgid "Mark"
|
||||||
|
msgstr "Marca"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,model_category:"
|
||||||
|
msgid "Model"
|
||||||
|
msgstr "Modelo"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,reference_category:"
|
||||||
|
msgid "Reference"
|
||||||
|
msgstr "Referencia"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,origin_country:"
|
||||||
|
msgid "Origin Country"
|
||||||
|
msgstr "País de origen"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,temperature_min:"
|
||||||
|
msgid "Temp Min"
|
||||||
|
msgstr "Temp Min"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,temperature_max:"
|
||||||
|
msgid "Temp Max"
|
||||||
|
msgstr "Temp Max"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,moisture_min:"
|
||||||
|
msgid "Moisture Min"
|
||||||
|
msgstr "Humedad Min"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,moisture_max:"
|
||||||
|
msgid "Moisture Max"
|
||||||
|
msgstr "Humedad Max"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,frequency:"
|
||||||
|
msgid "Frequency"
|
||||||
|
msgstr "Frecuencia"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,voltageAC:"
|
||||||
|
msgid "Voltage AC"
|
||||||
|
msgstr "Voltaje AC"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,voltageDC:"
|
||||||
|
msgid "Voltage DC"
|
||||||
|
msgstr "Voltaje DC"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,useful_life:"
|
||||||
|
msgid "Useful life"
|
||||||
|
msgstr "Vida útil"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,warranty:"
|
||||||
|
msgid "Warranty"
|
||||||
|
msgstr "Garantía"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,uncertainy_pattern:"
|
||||||
|
msgid "Uncertainy Pattern"
|
||||||
|
msgstr "Incertidumbre Patrón"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,k_pattern:"
|
||||||
|
msgid "K Pattern"
|
||||||
|
msgstr "Patrón K"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,resolution_type:"
|
||||||
|
msgid "Resolution Type"
|
||||||
|
msgstr "Tipo de Resolución"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,d_resolution:"
|
||||||
|
msgid "Resolution d"
|
||||||
|
msgstr "Resolución (d)"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,analog_resolution:"
|
||||||
|
msgid "Analog resolution"
|
||||||
|
msgstr "Resolución Analoga"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,a_factor_resolution:"
|
||||||
|
msgid "(a) Resolution"
|
||||||
|
msgstr "Factor a"
|
||||||
|
|
||||||
|
msgctxt "field:product.product,software_required:"
|
||||||
|
msgid "Software Required"
|
||||||
|
msgstr "Software Requerido"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.configuration,maintenance_sequence:"
|
||||||
|
msgid "Maintenance Sequence"
|
||||||
|
msgstr "Secuencia de Mantenimientos"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.configuration,agended_sequence:"
|
||||||
|
msgid "Agended Sequence"
|
||||||
|
msgstr "Secuencia de Agendas"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.configuration,contract_sequence:"
|
||||||
|
msgid "Contract Sequence"
|
||||||
|
msgstr "Secuencia de Contratos"
|
||||||
|
|
||||||
|
msgctxt "view:optical_equipment_maintenance.diary:"
|
||||||
|
msgid "Dates"
|
||||||
|
msgstr "Fechas"
|
||||||
|
|
||||||
|
msgctxt "model:ir.action,name:act_reassing_agended"
|
||||||
|
msgid "ReAssing Agended"
|
||||||
|
msgstr "Reagendar"
|
||||||
|
|
||||||
|
msgctxt "model:ir.action,name:act_assing_agended"
|
||||||
|
msgid "Assing Agended"
|
||||||
|
msgstr "Asignar Agenda"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment_maintenance.agended,maintenance_service:"
|
||||||
|
msgid "Maintenaince Service"
|
||||||
|
msgstr "Servicio de Mantenimiento"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment_maintenance.agended,estimated_agended:"
|
||||||
|
msgid "Date Maintenance"
|
||||||
|
msgstr "Fecha de Mantenimiento"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment_maintenance.agended,technical:"
|
||||||
|
msgid "Technical"
|
||||||
|
msgstr "Técnico"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment_maintenance.reagended,maintenance_service:"
|
||||||
|
msgid "Maintenaince Service"
|
||||||
|
msgstr "Servicio de Mantenimiento"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment_maintenance.reagended,estimated_agended:"
|
||||||
|
msgid "Date Maintenance"
|
||||||
|
msgstr "Fecha de Mantenimiento"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment_maintenance.reagended,technical:"
|
||||||
|
msgid "Technical"
|
||||||
|
msgstr "Técnico"
|
||||||
|
|
||||||
|
msgctxt "view:optical_equipment_maintenance.service:"
|
||||||
|
msgid "Lines Of Mantenaince"
|
||||||
|
msgstr "Líneas de Mantenimiento"
|
||||||
|
|
||||||
|
msgctxt "view:optical_equipment_maintenance.service:"
|
||||||
|
msgid "Agendes"
|
||||||
|
msgstr "Agendas"
|
||||||
|
|
||||||
|
msgctxt "view:optical_equipment_maintenance.service:"
|
||||||
|
msgid "Other Info"
|
||||||
|
msgstr "Otra Información"
|
||||||
|
|
||||||
|
msgctxt "selection:optical_equipment_maintenance.service,state:"
|
||||||
|
msgid "Draft"
|
||||||
|
msgstr "Borrador"
|
||||||
|
|
||||||
|
msgctxt "selection:optical_equipment_maintenance.service,state:"
|
||||||
|
msgid "Agended"
|
||||||
|
msgstr "Agendado"
|
||||||
|
|
||||||
|
msgctxt "selection:optical_equipment_maintenance.service,state:"
|
||||||
|
msgid "In Progress"
|
||||||
|
msgstr "En Proceso"
|
||||||
|
|
||||||
|
msgctxt "selection:optical_equipment_maintenance.service,state:"
|
||||||
|
msgid "Failed"
|
||||||
|
msgstr "Fallido"
|
||||||
|
|
||||||
|
msgctxt "selection:optical_equipment_maintenance.service,state:"
|
||||||
|
msgid "Finished"
|
||||||
|
msgstr "Finalizado"
|
||||||
|
|
||||||
|
msgctxt "selection:optical_equipment_maintenance.service,state_agended:"
|
||||||
|
msgid "No agenda"
|
||||||
|
msgstr "Sin Agenda"
|
||||||
|
|
||||||
|
msgctxt "selection:optical_equipment_maintenance.service,state_agended:"
|
||||||
|
msgid "Agended"
|
||||||
|
msgstr "Agendado"
|
||||||
|
|
||||||
|
msgctxt "selection:optical_equipment_maintenance.service,state_agended:"
|
||||||
|
msgid "In progress"
|
||||||
|
msgstr "En proceso"
|
||||||
|
|
||||||
|
msgctxt "selection:optical_equipment_maintenance.service,state_agended:"
|
||||||
|
msgid "Finish"
|
||||||
|
msgstr "Finalizado"
|
||||||
|
|
||||||
|
msgctxt "selection:optical_equipment_maintenance.service,state_agended:"
|
||||||
|
msgid "Failed"
|
||||||
|
msgstr "Fallido"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance,service_maintenance:"
|
||||||
|
msgid "Maintenance Service"
|
||||||
|
msgstr "Servicio de Mantenimiento"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance,code:"
|
||||||
|
msgid "Code"
|
||||||
|
msgstr "Código"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance,maintenance_type:"
|
||||||
|
msgid "Maintenance Type"
|
||||||
|
msgstr "Tipo de Mantenimiento"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance,state:"
|
||||||
|
msgid "State"
|
||||||
|
msgstr "Estado"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance,company:"
|
||||||
|
msgid "Company"
|
||||||
|
msgstr "Compañia"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance,propietary:"
|
||||||
|
msgid "Propietary"
|
||||||
|
msgstr "Propietario"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance,propietary_address:"
|
||||||
|
msgid "Propietary Address"
|
||||||
|
msgstr "Dirección del Propietario"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance,equipment:"
|
||||||
|
msgid "Equipment"
|
||||||
|
msgstr "Equipo"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance,maintenance_activity:"
|
||||||
|
msgid "Maintenance Activitys"
|
||||||
|
msgstr "Actividades de Mantenimiento"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance,patterns_equipments:"
|
||||||
|
msgid "K Pattern"
|
||||||
|
msgstr "Patron K"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance,lines_calibration:"
|
||||||
|
msgid "Lines of Calibration"
|
||||||
|
msgstr "Líneas de Calibración"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance,calibration_total:"
|
||||||
|
msgid "Calibration Total"
|
||||||
|
msgstr "Resultado Calibración"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance,maintenance_lines:"
|
||||||
|
msgid "Lines"
|
||||||
|
msgstr "Líneas"
|
||||||
|
|
||||||
|
msgctxt "view:optical_equipment.maintenance:"
|
||||||
|
msgid "Preventive"
|
||||||
|
msgstr "Preventivo"
|
||||||
|
|
||||||
|
msgctxt "view:optical_equipment.maintenance:"
|
||||||
|
msgid "Corrective"
|
||||||
|
msgstr "Correctivo"
|
||||||
|
|
||||||
|
msgctxt "view:optical_equipment.maintenance:"
|
||||||
|
msgid "Calibration"
|
||||||
|
msgstr "Calibración"
|
||||||
|
|
||||||
|
msgctxt "selection:optical_equipment.maintenance,state:"
|
||||||
|
msgid "Draft"
|
||||||
|
msgstr "Borrador"
|
||||||
|
|
||||||
|
msgctxt "selection:optical_equipment.maintenance,state:"
|
||||||
|
msgid "Finished"
|
||||||
|
msgstr "Finalizado"
|
||||||
|
|
||||||
|
msgctxt "model:ir.model.button,string:maintenance_service_draft_button"
|
||||||
|
msgid "Draft"
|
||||||
|
msgstr "Borrador"
|
||||||
|
|
||||||
|
msgctxt "model:ir.model.button,string:maintenance_service_in_progress_button"
|
||||||
|
msgid "In progress"
|
||||||
|
msgstr "En Proceso"
|
||||||
|
|
||||||
|
msgctxt "model:ir.model.button,string:maintenance_service_finished_button"
|
||||||
|
msgid "Finished"
|
||||||
|
msgstr "Finalizado"
|
||||||
|
|
||||||
|
msgctxt "model:ir.model.button,string:maintenance_finished_button"
|
||||||
|
msgid "Finished"
|
||||||
|
msgstr "Finalizado"
|
||||||
|
|
||||||
|
msgctxt "model:ir.model.button,string:maintenance_calibrate_button"
|
||||||
|
msgid "Calibrate"
|
||||||
|
msgstr "Calibrar"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration_sample,maintenance:"
|
||||||
|
msgid "Maintenance"
|
||||||
|
msgstr "Mantenimiento"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration_sample,number_sample:"
|
||||||
|
msgid "Sample #"
|
||||||
|
msgstr "Muestra #"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration_sample,value_patterns:"
|
||||||
|
msgid "Value Pattern"
|
||||||
|
msgstr "Patrón de valor"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration_sample,value_equipment:"
|
||||||
|
msgid "Value in Equipment"
|
||||||
|
msgstr "Valor del Equipo"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration_sample,mistake:"
|
||||||
|
msgid "Mistake"
|
||||||
|
msgstr "Error"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration_sample,mistake_rate:"
|
||||||
|
msgid "% Mistake"
|
||||||
|
msgstr "% de Error"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration,maintenance:"
|
||||||
|
msgid "Maintenance"
|
||||||
|
msgstr "Mantenimiento"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration,dev_std:"
|
||||||
|
msgid "Standart Desviation"
|
||||||
|
msgstr "Desviación Estándar"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration,uncertain_type_A:"
|
||||||
|
msgid "Uncertain Type A"
|
||||||
|
msgstr "Incierto Tipo A"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration,uncertain_pattern:"
|
||||||
|
msgid "Uncertain Pattern"
|
||||||
|
msgstr "Patrón incierto"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration,k_c_calibration:"
|
||||||
|
msgid "K Crt Calibration"
|
||||||
|
msgstr "Calibración K Crt"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration,uncertain_U_b1:"
|
||||||
|
msgid "U_b1"
|
||||||
|
msgstr "Incierto b1"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration,d_resolution:"
|
||||||
|
msgid "d_resolution"
|
||||||
|
msgstr "D Resolución"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration,uncertain_U_b2_dig:"
|
||||||
|
msgid "U_b2"
|
||||||
|
msgstr "Incierto b2 dig"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration,uncertain_U_b2_ana:"
|
||||||
|
msgid "U_b2"
|
||||||
|
msgstr "Incierto b2 ana"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration,uncertain_combinated:"
|
||||||
|
msgid "U_combinated"
|
||||||
|
msgstr "Incierto Combinado"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration,uncertain_eff:"
|
||||||
|
msgid "U eff"
|
||||||
|
msgstr "Incierto eff"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration,t_student:"
|
||||||
|
msgid "T Student"
|
||||||
|
msgstr "T Alumno"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration,uncertain_expanded:"
|
||||||
|
msgid "Uexpand"
|
||||||
|
msgstr "Expandir"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.maintenance.calibration,state:"
|
||||||
|
msgid "State"
|
||||||
|
msgstr "Estado"
|
||||||
|
|
||||||
|
msgctxt "model:ir.action.act_window.domain,name:act_maintenance_form_domain_draft"
|
||||||
|
msgid "Draft"
|
||||||
|
msgstr "Borrador"
|
||||||
|
|
||||||
|
msgctxt "model:ir.action.act_window.domain,name:act_maintenance_form_domain_finished"
|
||||||
|
msgid "Finished"
|
||||||
|
msgstr "Finalizado"
|
||||||
|
|
||||||
|
msgctxt "model:ir.action.act_window.domain,name:act_maintenance_form_domain_all"
|
||||||
|
msgid "All"
|
||||||
|
msgstr "Todo"
|
@ -61,6 +61,7 @@ class MaintenanceService(Workflow, ModelSQL, ModelView):
|
|||||||
('finished', "Finished")
|
('finished', "Finished")
|
||||||
], "State", required=True, readonly=True, sort=True)
|
], "State", required=True, readonly=True, sort=True)
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __setup__(cls):
|
def __setup__(cls):
|
||||||
super(MaintenanceService, cls).__setup__()
|
super(MaintenanceService, cls).__setup__()
|
||||||
@ -501,6 +502,7 @@ class AgendedInitial(ModelView):
|
|||||||
required=True, domain=[('state', '=', 'draft')])
|
required=True, domain=[('state', '=', 'draft')])
|
||||||
estimated_agended = fields.DateTime("Date Maintenance", required=True)
|
estimated_agended = fields.DateTime("Date Maintenance", required=True)
|
||||||
technical = fields.Many2One('company.employee', "Technical", required=True)
|
technical = fields.Many2One('company.employee', "Technical", required=True)
|
||||||
|
|
||||||
|
|
||||||
class AssingAgended(Wizard):
|
class AssingAgended(Wizard):
|
||||||
'Assing Agended'
|
'Assing Agended'
|
||||||
@ -597,15 +599,72 @@ class MaintenanceLine(ModelSQL, ModelView):
|
|||||||
'Maintenance Line'
|
'Maintenance Line'
|
||||||
__name__ = 'optical_equipment.maintenance.line'
|
__name__ = 'optical_equipment.maintenance.line'
|
||||||
|
|
||||||
product = fields.Many2One('product.product', 'Product',
|
|
||||||
ondelete='RESTRICT',domain=[
|
|
||||||
If(Eval('sale_state').in_(['draft']),
|
|
||||||
('maintenance_activity', '=', True),
|
|
||||||
()),
|
|
||||||
],)
|
|
||||||
maintenance = fields.Many2One('optical_equipment.maintenance', 'Maintenance', ondelete='CASCADE', select=True)
|
|
||||||
maintenance_activity = fields.Many2One('product.product', 'Maintenance activity')
|
|
||||||
|
|
||||||
|
line_replace = fields.Boolean("Replace", states={'readonly': If(Eval('line_maintenance_activity') == True, True)})
|
||||||
|
line_maintenance_activity = fields.Boolean("Maintenance Activity", states={'readonly': If(Eval('line_replace') == True, True)})
|
||||||
|
maintenance = fields.Many2One('optical_equipment.maintenance', 'Maintenance', ondelete='CASCADE', select=True)
|
||||||
|
replacement = fields.Many2One('product.product', 'Replacement', ondelete='RESTRICT',
|
||||||
|
domain=[('replacement', '=', True)],
|
||||||
|
states={'invisible': (If(Eval('line_maintenance_activity') == True, True)) | (If(Eval('line_replace') == False, True)),
|
||||||
|
'required': If(Eval('line_replace') == True, True)},
|
||||||
|
depends=['line_replace'])
|
||||||
|
maintenance_activity = fields.Many2One('product.product', 'Maintenance activity',
|
||||||
|
domain=[('maintenance_activity', '=', True)],
|
||||||
|
states={'invisible': If(Eval('line_replace') == True, True) | (If(Eval('line_maintenance_activity') == False, True)),
|
||||||
|
'required': If(Eval('line_maintenance_actitvity') == True, True)},
|
||||||
|
depends=['line_maintenance_activity'])
|
||||||
|
quantity = fields.Float("Quantity", digits='unit')
|
||||||
|
actual_quantity = fields.Float(
|
||||||
|
"Actual Quantity", digits='unit', readonly=True,
|
||||||
|
states={
|
||||||
|
'invisible': Eval('type') != 'line',
|
||||||
|
})
|
||||||
|
unit = fields.Many2One('product.uom', 'Unit', ondelete='RESTRICT',
|
||||||
|
states={
|
||||||
|
'readonly': Eval('_parent_maintenance.state') != 'draft',
|
||||||
|
},domain=[If(Bool(Eval('product_uom_category')),
|
||||||
|
('category', '=', Eval('product_uom_category')),
|
||||||
|
('category', '!=', -1)),
|
||||||
|
])
|
||||||
|
product_uom_category = fields.Function(fields.Many2One('product.uom.category', 'Product Uom Category'),
|
||||||
|
'on_change_with_product_uom_category')
|
||||||
|
company = fields.Function(fields.Many2One('company.company', "Company"),'on_change_with_company')
|
||||||
|
|
||||||
|
@fields.depends('maintenance', '_parent_maintenance.company')
|
||||||
|
def on_change_with_company(self, name=None):
|
||||||
|
if self.maintenance and self.maintenance.company:
|
||||||
|
return self.maintenance.company.id
|
||||||
|
|
||||||
|
@fields.depends('line_replace', 'replacement')
|
||||||
|
def on_change_line_replace(self, name=None):
|
||||||
|
if self.line_replace == False:
|
||||||
|
self.replacement = None
|
||||||
|
|
||||||
|
@fields.depends('line_maintenance_activity', 'maintenance_activity')
|
||||||
|
def on_change_line_maintenance_activity(self, name=None):
|
||||||
|
if self.line_maintenance_activity == False:
|
||||||
|
self.maintenance_activity = None
|
||||||
|
|
||||||
|
@fields.depends('replacement', 'maintenance', 'unit', 'maintenance')
|
||||||
|
def on_change_replacement(self):
|
||||||
|
if not self.replacement:
|
||||||
|
self.unit = None
|
||||||
|
return
|
||||||
|
|
||||||
|
if not self.unit or self.unit.category != category:
|
||||||
|
self.unit = self.replacement.sale_uom
|
||||||
|
|
||||||
|
@fields.depends('maintenance_activity',
|
||||||
|
'quantity', 'unit')
|
||||||
|
def on_change_maintenance_activity(self):
|
||||||
|
if not self.maintenance_activity:
|
||||||
|
self.quantity = None
|
||||||
|
self.unit = None
|
||||||
|
return
|
||||||
|
|
||||||
|
self.quantity = 1
|
||||||
|
if not self.unit or self.unit.category != category:
|
||||||
|
self.unit = self.maintenance_activity.sale_uom
|
||||||
|
|
||||||
class MaintenanceActivity(ModelView, ModelSQL):
|
class MaintenanceActivity(ModelView, ModelSQL):
|
||||||
'Maintenance Activitys'
|
'Maintenance Activitys'
|
||||||
|
@ -39,6 +39,5 @@ this repository contains the full copyright notices and license terms. -->
|
|||||||
<!--<button name="draft"/> -->
|
<!--<button name="draft"/> -->
|
||||||
<button name="cancelled"/>
|
<button name="cancelled"/>
|
||||||
<button name="running"/>
|
<button name="running"/>
|
||||||
-->
|
|
||||||
</group>
|
</group>
|
||||||
</form>
|
</form>
|
||||||
|
@ -34,8 +34,6 @@
|
|||||||
<field name="check_calibration"/>
|
<field name="check_calibration"/>
|
||||||
</page>
|
</page>
|
||||||
<page string="Corrective" id="corrective">
|
<page string="Corrective" id="corrective">
|
||||||
<label name="maintenance_lines"/>
|
|
||||||
<field name="maintenance_lines"/>
|
|
||||||
<field name="maintenance_lines"/>
|
<field name="maintenance_lines"/>
|
||||||
</page>
|
</page>
|
||||||
<page string="Calibration" id="calibration">
|
<page string="Calibration" id="calibration">
|
||||||
|
Loading…
Reference in New Issue
Block a user