Files
jikimo_sf/sf_maintenance/views/maintenance_request_views.xml

68 lines
2.7 KiB
XML

<?xml version="1.0"?>
<odoo>
<!-- equiment.request : actions -->
<record model="ir.ui.view" id="sf_hr_equipment_request_view_form">
<field name="name">sf.equipment.request.form</field>
<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"/>
</xpath>
<sheet>
<notebook>
<page string="维保标准" attrs="{'invisible': [('equipment_maintenance_id', '=', False)]}">
<group>
<field name="maintenance_standards" widget="ony2many">
<tree create="False" string="维保项目">
<field name="name"/>
<field name="maintenance_standards"/>
</tree>
</field>
</group>
</page>
</notebook>
</sheet>
</field>
</record>
<record id="hr_equipment_request_action" model="ir.actions.act_window">
<field name="name">维保计划</field>
<field name="res_model">maintenance.request</field>
<field name="view_mode">kanban,tree,form,pivot,graph,calendar</field>
<field name="view_id" ref="maintenance.hr_equipment_request_view_kanban"/>
<field name="context">{'default_user_id': uid}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Add a new maintenance request
</p>
<p>
Follow the process of the request and communicate with the collaborator.
</p>
</field>
</record>
<menuitem
id="menu_m_request_form"
name="维保计划"
parent="maintenance.menu_m_request"
action="hr_equipment_request_action"
groups="maintenance.group_equipment_manager,base.group_user"
sequence="1"/>
</odoo>