<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        #------------------模型类型------------------

        <record model="ir.ui.view" id="search_sf_model_type_view">
            <field name="name">search.sf.model.type</field>
            <field name="model">sf.model.type</field>
            <field name="arch" type="xml">
                <search string="模型类型">
                    <field name="name" string="模糊搜索"
                           filter_domain="[('name', 'ilike', self)]"/>
                </search>
            </field>
        </record>

        <record model="ir.ui.view" id="tree_sf_model_type_view">
            <field name="name">tree.sf.model.type</field>
            <field name="model">sf.model.type</field>
            <field name="arch" type="xml">
                <tree string="模型类型">
                    <field name="name"/>
                </tree>
            </field>
        </record>

        <record model="ir.ui.view" id="form_sf_model_type">
            <field name="name">form.sf.model.type</field>
            <field name="model">sf.model.type</field>
            <field name="arch" type="xml">
                <form string="模型类型">
                    <group>
                        <field name="name" required="1"/>
                        <field name="embryo_tolerance" required="1" string="坯料容余(mm)"/>
                    </group>
                    <group>
                        <field name='product_routing_tmpl_ids'>
                            <tree editable='bottom'>
                                <field name="sequence" widget="handle" string="序号"/>
                                <field name="route_workcenter_id" string="工序"/>
                                <field name="routing_type" string="类型"/>
                                <field name="is_repeat" string="重复"/>
                                <field name="workcenter_ids" string="工作中心" widget="many2many_tags"/>
                            </tree>
                        </field>
                    </group>
                    <group>
                        <field name='embryo_routing_tmpl_ids'>
                            <tree editable='bottom'>
                                <field name="sequence" widget="handle" string="序号"/>
                                <field name="route_workcenter_id" string="工序"/>
                                <field name="routing_type" string="类型"/>
                                <field name="is_repeat" string="重复"/>
                                <field name="workcenter_ids" string="工作中心" widget="many2many_tags"/>
                            </tree>
                        </field>
                    </group>
                     <group>
                        <field name='surface_technics_routing_tmpl_ids' style="white-space: pre-wrap;">
                            <tree editable='bottom'>
                                <field name="sequence" widget="handle" string="序号"/>
                                <field name="route_workcenter_id" string="工序"/>
                                <field name="routing_type" string="类型"/>
                                <field name="is_repeat" string="重复"/>
                                <field name="workcenter_ids" string="工作中心" widget="many2many_tags"/>
                            </tree>
                        </field>
                    </group>
                </form>
            </field>
        </record>

        <record id="action_sf_model_type" model="ir.actions.act_window">
            <field name="name">模型类型</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">sf.model.type</field>
            <field name="view_mode">tree,form</field>
            <field name="help" type="html">
                <p class="o_view_nocontent_smiling_face">
                    [模型类型] 还没有哦！点左上角的[创建]按钮，沙发归你了!
                </p>
                <p>
                </p>
            </field>
        </record>

        <menuitem
                id="menu_sf_model_type"
                name="模型类型"
                parent="mrp.menu_mrp_configuration"
                sequence="10"
                action="action_sf_model_type"
        />
    </data>
</odoo>