设备新需求(根据维保项目生成维保计划)
This commit is contained in:
@@ -47,6 +47,12 @@ class SfMaintenanceEquipment(models.Model):
|
||||
overhaul_id = fields.Many2one('equipment.maintenance.standards', string='设备检修标准',
|
||||
domain="[('maintenance_type','=','检修')]")
|
||||
|
||||
eq_maintenance_maintenance_standards_ids = fields.One2many('maintenance.standards', 'maintenance_request_id', string='保养标准项目',
|
||||
related='eq_maintenance_id.maintenance_standards_ids')
|
||||
|
||||
overhaul_maintenance_standards_ids = fields.One2many('maintenance.standards', 'maintenance_request_id', string='检修标准项目',
|
||||
related='overhaul_id.maintenance_standards_ids')
|
||||
|
||||
@api.onchange('eq_maintenance_id', 'overhaul_id')
|
||||
def _compute_equipment_maintenance_standards_ids(self):
|
||||
for record in self:
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
<field name="maintenance_standards_ids" widget="ony2many">
|
||||
<tree editable="top" create="true" string="维保项目">
|
||||
<field name="sequence"/>
|
||||
<field name="cycle"/>
|
||||
<field name="name"/>
|
||||
<field name="maintenance_standards"/>
|
||||
<field name="cycle"/>
|
||||
<field name="device_unit"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
@@ -115,8 +115,11 @@
|
||||
|
||||
<xpath expr="//div[@class='o_row'][field[@name='maintenance_duration']]" position="after">
|
||||
|
||||
<field name='overhaul_id'/>
|
||||
|
||||
|
||||
<field name='eq_maintenance_maintenance_standards_ids'/>
|
||||
<field name='overhaul_maintenance_standards_ids'/>
|
||||
<field name='overhaul_id'/>
|
||||
<field name="overhaul_date" string="下次预防检修"/>
|
||||
<label for="overhaul_period" string="预防检修频次"/>
|
||||
<div class="o_row">
|
||||
|
||||
Reference in New Issue
Block a user