维保计划新增确认维保计划和标记已完成按钮,处理自动生成维保计划的方法报错的bug

This commit is contained in:
qihao.gong@jikimo.com
2023-07-05 14:32:22 +08:00
parent e6060b9bab
commit 3e6130da15
3 changed files with 12 additions and 2 deletions

View File

@@ -7,6 +7,10 @@
<field name="model">maintenance.request</field>
<field name="inherit_id" ref="maintenance.hr_equipment_request_view_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='archive_equipment_request']" position="before">
<button name="confirm_maintenance" string="确认维保计划" type="object" class="btn-primary" attrs="{'invisible': [('stage_id', '!=', 1)]}" />
<button name="confirm_maintenance_done" string="标记已完成" type="object" class="btn-primary" attrs="{'invisible': [('stage_id', '!=', 2)]}" />
</xpath>
<xpath expr="//field[@name='maintenance_type']" position="replace">
<field name="sf_maintenance_type" widget="radio"/>
<field name="equipment_maintenance_id"/>
@@ -17,7 +21,7 @@
<notebook>
<page string="维保标准" attrs="{'invisible': [('equipment_maintenance_id', '=', False)]}">
<group>
<field name="maintenance_standards" widget="ony2many">
<field name="maintenance_standards" widget="ony2many">
<tree create="False" string="维保项目">
<field name="name"/>
<field name="maintenance_standards"/>