<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record id="view_machine_info_form_inherit_sf" model="ir.ui.view">
        <field name="name">machine.info.form.inherit.sf</field>
        <field name="model">mrp.workorder</field>
        <field name="inherit_id" ref="mrp.mrp_production_workorder_form_view_inherit"/>
        <field name="arch" type="xml">
            <xpath expr="//page[last()-3]" position="before">
                <page string="机床信息" attrs='{"invisible": [("routing_type","!=","CNC加工")]}'>
                    <group string="机床信息">
                        <group>
                            <field name="machine_tool_name"/>
                            <field name="machine_tool_type_id"/>
                        </group>
                        <group>
                            <field name="machine_tool_machine_ip"/>
                        </group>
                    </group>
                    <group string="运行信息">
                        <group>
                            <field name="machine_tool_timestamp"/>
                            <field name="machine_tool_status"/>
                            <field name="machine_tool_run_status"/>
                            <field name="machine_tool_time_on"/>
                            <field name="machine_tool_time_on_now"/>
                        </group>
                        <group>
                            <field name="machine_tool_tool_num"/>
                            <field name="machine_tool_program"/>
                            <field name="machine_tool_cut_status"/>
                            <field name="machine_tool_compensation_value_x"/>
                            <field name="machine_tool_compensation_value_y"/>
                        </group>
                    </group>
                </page>
            </xpath>
        </field>
    </record>
</odoo>