Predetermined environmental conditions in maintenance service
This commit is contained in:
parent
d0ff946f8e
commit
1a13fbfa98
@ -18,3 +18,13 @@ class Configuration(ModelSingleton, ModelSQL, ModelView):
|
|||||||
contract_sequence = fields.Many2One('ir.sequence', "Contract Sequence",
|
contract_sequence = fields.Many2One('ir.sequence', "Contract Sequence",
|
||||||
domain=[('sequence_type', '=', Id('optical_equipment', 'sequence_type_contract'))
|
domain=[('sequence_type', '=', Id('optical_equipment', 'sequence_type_contract'))
|
||||||
])
|
])
|
||||||
|
temperature_min = fields.Float("Temp Min")
|
||||||
|
temperature_max = fields.Float("Temp Max")
|
||||||
|
temperature_uom = fields.Many2One('product.uom', 'Temperature UOM',
|
||||||
|
domain=[('category', '=', Id('optical_equipment', "uom_cat_temperature"))],
|
||||||
|
depends=['itemperature_min'])
|
||||||
|
moisture_min = fields.Float("Moisture Min")
|
||||||
|
moisture_max = fields.Float("Moisture Max")
|
||||||
|
moisture_uom = fields.Many2One('product.uom', "Moisture UOM",
|
||||||
|
domain=[('category', '=', Id('optical_equipment', 'uom_cat_relative_humedity'))],
|
||||||
|
depends=['moisture_min'])
|
||||||
|
48
locale/es.po
48
locale/es.po
@ -754,6 +754,30 @@ msgctxt "field:optical_equipment_maintenance.service,state:"
|
|||||||
msgid "State"
|
msgid "State"
|
||||||
msgstr "Estado"
|
msgstr "Estado"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment_maintenance.service,temperature_min:"
|
||||||
|
msgid "Temp Min"
|
||||||
|
msgstr "Temp Mínima"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment_maintenance.service,temperature_max:"
|
||||||
|
msgid "Temp Max"
|
||||||
|
msgstr "Temp Máxima"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment_maintenance.service,temperature_uom:"
|
||||||
|
msgid "Temperature UOM"
|
||||||
|
msgstr "Temperatura UOM"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment_maintenance.service,moisture_min:"
|
||||||
|
msgid "Moisture Min"
|
||||||
|
msgstr "Humedad Mínima"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment_maintenance.service,moisture_max:"
|
||||||
|
msgid "Moisture Max"
|
||||||
|
msgstr "Humedad Máxima"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment_maintenance.service,moisture_uom:"
|
||||||
|
msgid "Moisture UOM"
|
||||||
|
msgstr "Humedad UOM"
|
||||||
|
|
||||||
msgctxt "field:party.party,client_type:"
|
msgctxt "field:party.party,client_type:"
|
||||||
msgid "Client type"
|
msgid "Client type"
|
||||||
msgstr "Tipo de Cliente"
|
msgstr "Tipo de Cliente"
|
||||||
@ -918,6 +942,30 @@ msgctxt "field:optical_equipment.configuration,contract_sequence:"
|
|||||||
msgid "Contract Sequence"
|
msgid "Contract Sequence"
|
||||||
msgstr "Secuencia de Contratos"
|
msgstr "Secuencia de Contratos"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.configuration,temperature_min:"
|
||||||
|
msgid "Temp Min"
|
||||||
|
msgstr "Temp Mínima"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.configuration,temperature_max:"
|
||||||
|
msgid "Temp Max"
|
||||||
|
msgstr "Temp Máxima"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.configuration,temperature_uom:"
|
||||||
|
msgid "Temperature UOM"
|
||||||
|
msgstr "Temperatura UOM"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.configuration,moisture_min:"
|
||||||
|
msgid "Moisture Min"
|
||||||
|
msgstr "Humedad Mínima"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.configuration,moisture_max:"
|
||||||
|
msgid "Moisture Max"
|
||||||
|
msgstr "Humedad Máxima"
|
||||||
|
|
||||||
|
msgctxt "field:optical_equipment.configuration,moisture_uom:"
|
||||||
|
msgid "Moisture UOM"
|
||||||
|
msgstr "Humedad UOM"
|
||||||
|
|
||||||
msgctxt "view:optical_equipment_maintenance.diary:"
|
msgctxt "view:optical_equipment_maintenance.diary:"
|
||||||
msgid "Dates"
|
msgid "Dates"
|
||||||
msgstr "Fechas"
|
msgstr "Fechas"
|
||||||
|
@ -121,6 +121,38 @@ class MaintenanceService(Workflow, ModelSQL, ModelView):
|
|||||||
def default_company():
|
def default_company():
|
||||||
return Transaction().context.get('company')
|
return Transaction().context.get('company')
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def default_temperature_min():
|
||||||
|
pool = Pool()
|
||||||
|
Config = pool.get('optical_equipment.configuration')
|
||||||
|
config = Config(1)
|
||||||
|
temperature_min = config.temperature_min
|
||||||
|
return temperature_min
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def default_temperature_max():
|
||||||
|
pool = Pool()
|
||||||
|
Config = pool.get('optical_equipment.configuration')
|
||||||
|
config = Config(1)
|
||||||
|
temperature_max = config.temperature_max
|
||||||
|
return temperature_max
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def default_moisture_min():
|
||||||
|
pool = Pool()
|
||||||
|
Config = pool.get('optical_equipment.configuration')
|
||||||
|
config = Config(1)
|
||||||
|
moisture_min = config.moisture_min
|
||||||
|
return moisture_min
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def default_moisture_max():
|
||||||
|
pool = Pool()
|
||||||
|
Config = pool.get('optical_equipment.configuration')
|
||||||
|
config = Config(1)
|
||||||
|
moisture_max = config.moisture_max
|
||||||
|
return moisture_max
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def default_maintenance_type(self):
|
def default_maintenance_type(self):
|
||||||
return 'preventive'
|
return 'preventive'
|
||||||
|
@ -15,5 +15,24 @@ this repository contains the full copyright notices and license terms. -->
|
|||||||
<newline/>
|
<newline/>
|
||||||
<label name="contract_sequence"/>
|
<label name="contract_sequence"/>
|
||||||
<field name="contract_sequence"/>
|
<field name="contract_sequence"/>
|
||||||
|
<newline/>
|
||||||
|
<separator id="environmental_conditions" string="Environmental Conditions" colspan="4"/>
|
||||||
|
<label name="temperature_min"/>
|
||||||
|
<field name="temperature_min"/>
|
||||||
|
<newline/>
|
||||||
|
<label name="temperature_max"/>
|
||||||
|
<field name="temperature_max"/>
|
||||||
|
<newline/>
|
||||||
|
<label name="temperature_uom"/>
|
||||||
|
<field name="temperature_uom"/>
|
||||||
|
<newline/>
|
||||||
|
<label name="moisture_min"/>
|
||||||
|
<field name="moisture_min"/>
|
||||||
|
<newline/>
|
||||||
|
<label name="moisture_max"/>
|
||||||
|
<field name="moisture_max"/>
|
||||||
|
<newline/>
|
||||||
|
<label name="moisture_uom"/>
|
||||||
|
<field name="moisture_uom"/>
|
||||||
|
<newline/>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user