|  | <?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
    	<!-- 物料清单 -->
        <record id='wh_bom_list' model='ir.ui.view'>
            <field name='name'>wh.bom.list</field>
            <field name='model'>wh.bom</field>
            <field name='arch' type='xml'>
                <list string='物料清单'>
                    <field name='name' optional="show"/>
                    <field name='type' optional="show"/>
                    <field name='version_control_id' optional="show"/>
                    <field name='details' widget="html" optional="show"/>
                    <field name='active' optional="hide"/>
                </list>
            </field>
        </record>
        <record id='wh_bom_form' model='ir.ui.view'>
            <field name='name'>wh.bom.form</field>
            <field name='model'>wh.bom</field>
            <field name='arch' type='xml'>
                <form string='物料清单'>
                    <sheet>
                        <group>
                            <group>
                                <field name='name' required='1' />
                                <field name='version_control_id' context="{'default_type': 'bom_version'}" />
                            </group>
                            <group>
                                <field name='type' required='1' />
                            </group>
                        </group>
                        <group string='组合件'>
                            <field name='line_parent_ids' nolabel='1' colspan="2">
                                <list editable='bottom'>
                                    <field name='goods_id' required='1' />
                                    <field name='attribute_id' domain="[('goods_id', '=', goods_id)]" groups='goods.multi_attrs_groups'/>
                                    <field name='uos_id'/>
                                    <field name='goods_qty' required='1' />
                                    <field name='uom_id'/>
                                    <field name="last_cost" groups='goods.view_cost_groups' sum="合计"/>
                                </list>
                            </field>
                        </group>
                        <group string='子件'>
                            <field name='line_child_ids' nolabel='1' colspan="2">
                                <list editable='bottom'>
                                    <field name='goods_id' required='1' />
                                    <field name='attribute_id' domain="[('goods_id', '=', goods_id)]" groups='goods.multi_attrs_groups'/>
                                    <field name='uos_id'/>
                                    <field name='goods_qty' required='1' />
                                    <field name='uom_id'/>
                                    <field name="last_cost" groups='goods.view_cost_groups' sum="合计"/>
                                </list>
                            </field>
                        </group>
                    </sheet>
                    <chatter/>
                </form>
            </field>
        </record>
		<record id="wh_bom_search" model="ir.ui.view">
            <field name="name">wh.bom.search</field>
            <field name="model">wh.bom</field>
            <field name="arch" type="xml">
                <search string="物料清单">
                    <field name="name"/>
                    <field name="type"/>
                    <field name="goods_id"/>
                    <field name="line_child_ids" string="含部件" filter_domain="[('line_child_ids.goods_id','ilike',self)]"/>
                    <filter name="assembly" string="组装单" domain="[('type','=','assembly')]"/>
                    <filter name="disassembly" string="拆卸单" domain="[('type','=','disassembly')]"/>
                </search>
            </field>
        </record>
        <record id='wh_assembly_list' model='ir.ui.view'>
            <field name='name'>wh.assembly.list</field>
            <field name='model'>wh.assembly</field>
            <field name='arch' type='xml'>
                <list string='组装单' decoration-info='state == "draft"' decoration-muted= 'state == "cancel"' >
                    <field name='date' optional="show"/>
                    <field name='name' optional="show"/>
                    <field name='fee' optional="show"/>
                    <field name='goods_qty' optional="show"/>
                    <field name='details' widget="html" optional="show"/>
                    <field name='warehouse_id' string="材料扣料仓" optional="show"/>
                    <field name='warehouse_dest_id' string="成品入库仓" optional="show"/>
                    <field name='lot' string="入库批号" groups='goods.batch_groups' optional="show"/>
                    <field name='user_id' optional="show"/>
                    <field name='state' optional="show"/>
                </list>
            </field>
        </record>
        <record id='wh_assembly_form' model='ir.ui.view'>
            <field name='name'>wh.assembly.form</field>
            <field name='model'>wh.assembly</field>
            <field name='arch' type='xml'>
                <form string='组装单' >
                    <header>
                        <button name='approve_feeding' type='object' string='发料' class='oe_highlight'
                                invisible="state != 'draft'"/>
                        <button name='cancel_feeding' type='object' string='退料'
                                invisible="state != 'feeding'"/>
                        <button name='approve_order' type='object' string='成品入库' class='oe_highlight'
                                invisible="state != 'feeding'"/>
                        <button name='cancel_approved_order' type='object' string='撤销入库' invisible="state != 'done'" />
                        <button name='update_bom' type='object' string='存为物料清单' invisible="1"/>
                        <button name="action_cancel" invisible="state != 'draft'" string="作废" type="object"/>
                        <field name='state' widget='statusbar' statusbar_visible="draft,feeding,done"/>
                    </header>
                    <sheet>
                        <group>
                            <group>
                                <field name='date' required='1' readonly="state=='done'"/>
                                <field name='warehouse_id' string="材料扣料仓"/>
                                <field name='bom_id' options="{'no_create': 1}"
                                       readonly="state != 'draft' and state != 'feeding'"/>
                                <field name='goods_id' options="{'no_create': 1}" invisible="1"
                                       readonly="state != 'draft' and state != 'feeding'"/>
                                <field name='lot' string="入库批号"
                                       groups='goods.batch_groups'
                                       readonly="state != 'draft' and state != 'feeding'"/>
                                <field name='goods_qty' options="{'no_create': 1}"
                                       readonly="state != 'draft' and state != 'feeding'"/>
                                <field name='user_id'
                                       options="{'no_open': True, 'no_create': True}"/>
                            </group>
                            <group>
                                <field name='fee'/>
                                <field name='warehouse_dest_id' string="成品入库仓"/>
                                <field name='voucher_id' readonly='1'/>
                                <field name='out_voucher_id' readonly='1'/>
                                <field name='finance_category_id' invisible="1"/>
                                <field name='state' invisible='1'/>
                            </group>
                        </group>
                        <group>
                            <field name='line_ids'
                                   context="{'lot': True, 'default_warehouse_id': warehouse_id}"
                                   readonly="state=='done'">
                                <list string='库存调拨' editable='bottom' default_order="type desc" decoration-info="type=='out'">
                                    <field name='type' required='1' readonly="state=='done'" optional="show"/>
                                    <field name='goods_id' required='1' readonly="state=='done'" optional="show"/>
                                    <field name='attribute_id'
                                        domain="[('goods_id', '=', goods_id)]"
                                        required="using_attribute" readonly="not using_attribute or state=='done'"
                                        groups='goods.multi_attrs_groups'  optional="show"/>
                                    <field name="warehouse_id" column_invisible="1"/>
                                    <field name='lot_id' string="发料批号"
                                            groups='goods.batch_groups'
                                            readonly="not using_batch or state=='done' or type=='in'"
                                            required="using_batch and type=='out'"
                                                context="{'lot': True}"
                                                options="{'no_open': True, 'no_create': True, 'no_edit': True}"  optional="show"/>
                                    <field name='lot'
                                        groups='goods.batch_groups'
                                        readonly="not using_batch or state=='done' or type=='out'"
                                        required="using_batch and type=='in'"  optional="show"/>
                                    <field name='location_id' groups="warehouse.multi_location_groups" options="{'no_open': True, 'no_create': True}" optional="show"/>
                                    <field name='goods_uos_qty'
                                        groups='goods.auxiliary_unit_groups' sum='1'
                                        readonly="state=='done'" optional="show"/>
                                    <field name='uos_id' groups='goods.auxiliary_unit_groups'
                                        readonly="state=='done'" optional="show"/>
                                    <field name='goods_qty' readonly="force_batch_one or state=='done'" sum='1'  optional="show"/>
                                    <field name='uom_id' required='1' readonly="state=='done'" optional="show"/>
                                    <field name='cost_unit' string='入库单位成本' readonly='1'  optional="show"/>
                                    <field name='cost' string='入库金额' readonly='1' optional="show"/>
                                      <field name='expiration_date' groups='warehouse.group_expiration_date'  optional="show"/>
                                      <field name="scrap" optional="show"/>
                                    <field name='note' string='备注'  optional="show"/>
                                    <field name='using_batch' column_invisible='1'/>
                                    <field name='force_batch_one' column_invisible='1'/>
                                    <field name='using_attribute' column_invisible='1'/>
                                    <field name='type' column_invisible='1'/>
                                    <field name='state' column_invisible='1'/>
                                </list>
                            </field>
                        </group>
                        <group>
                            <field name='note' nolabel='1' colspan="2" placeholder='备注...' />
                        </group>
                        <group>
                            <group>
                                <field name='qc_result' widget='pdf_viewer'
                                       readonly="state!='draft'"
                                       groups='warehouse.group_qc'/>
                            </group>
                            <group>
                                <field name='qc_result_summary'
                                       readonly="state!='draft'"
                                       groups='warehouse.group_qc'/>
                            </group>
                        </group>
                        <group col='6'>
                            <group colspan='2'>
                                <field name='create_uid' string='制单人' readonly='1' />
                                <field name='create_date' string='录单时间' readonly='1' />
                            </group>
                            <group colspan='2'>
                                <field name='write_uid' string='最后修改人' readonly='1' />
                                <field name='write_date' string='最后修改时间' readonly='1' />
                            </group>
                            <group colspan='2'>
                                <field name='approve_uid' readonly='1' />
                                <field name='approve_date' readonly='1' />
                            </group>
                        </group>
                    </sheet>
                    <chatter/>
                </form>
            </field>
        </record>
		<record id="wh_assembly_search" model="ir.ui.view">
            <field name="name">wh.assembly.search</field>
            <field name="model">wh.assembly</field>
            <field name="arch" type="xml">
                <search string="组装单">
                    <field name="name"/>
                    <field name="line_in_ids" string="含成品" filter_domain="[('line_in_ids.goods_id','ilike',self)]"/>
                    <field name="line_out_ids" string="含部件" filter_domain="[('line_out_ids.goods_id','ilike',self)]"/>
                    <field name='warehouse_id'/>
                    <field name="state"/>
                    <group expand="0" string="分组">
                        <filter name="by_wh" string="调出仓库" domain="[]" context="{'group_by':'warehouse_id'}"/>
                        <filter name="by_day" string="单据日期" domain="[]" context="{'group_by':'date:day'}"/>
                    </group>
                </search>
            </field>
        </record>
        <record id='outsource_list' model='ir.ui.view'>
            <field name='name'>outsource.list</field>
            <field name='model'>outsource</field>
            <field name='arch' type='xml'>
                <list string='委外加工单' decoration-info='state == "draft"' decoration-muted= 'state == "cancel"' >
                    <field name="outsource_partner_id" optional="show"/>
                    <field name='date' optional="show"/>
                    <field name='name' optional="show"/>
                    <field name='outsource_fee' optional="show"/>
                    <field name='goods_qty' optional="show"/>
                    <field name='details' widget="html" optional="show"/>
                    <field name='warehouse_id' optional="show"/>
                    <field name='warehouse_dest_id' optional="show"/>
                    <field name='lot' string="入库批号" groups='goods.batch_groups' optional="show"/>
                    <field name='user_id' optional="show"/>
                    <field name='state' optional="show"/>
                </list>
            </field>
        </record>
        <record id='outsource_form' model='ir.ui.view'>
            <field name='name'>outsource.form</field>
            <field name='model'>outsource</field>
            <field name='arch' type='xml'>
                <form string='委外加工单'>
                    <header>
                        <button name='approve_feeding' type='object' string='发料' class='oe_highlight'
                                invisible="state != 'draft'"/>
                        <button name='cancel_feeding' type='object' string='退料'
                                invisible="state != 'feeding'"/>
                        <button name='approve_order' type='object' string='成品入库' class='oe_highlight'
                                invisible="state != 'feeding'"/>
                        <button name='cancel_approved_order' type='object' string='撤销入库' invisible="state != 'done'"/>
                        <button name="action_cancel" invisible="state != 'draft'" string="作废" type="object"/>
                        <field name='state' widget='statusbar' statusbar_visible="draft,feeding,done"/>
                    </header>
                    <sheet>
                        <group>
                            <group>
                                <field name='outsource_partner_id' domain="[('s_category_id', '!=', False)]" 
                                       context="{'form_view_ref': 'core.supplier_address_form'}"
                                       readonly="state != 'draft' and state != 'feeding'"/>
                                <field name='address_id' readonly="state=='done'"/>
                                <field name='date' required='1' readonly="state=='done'"/>
                                <field name='warehouse_id'/>
                                <field name='bom_id' options="{'no_create': 1}"/>
                                <field name='goods_id' options="{'no_create': 1}" invisible="1"/>
                                <field name='lot' string="入库批号"
                                       groups='goods.batch_groups'/>
                                <field name='goods_qty' options="{'no_create': 1}"/>
                                <field name='user_id'
                                       options="{'no_open': True, 'no_create': True}"/>
                            </group>
                            <group>
                                <field name='outsource_fee'
                                       readonly="state != 'draft' and state != 'feeding'"/>
                                <field name='tax_amount'
                                       readonly="state != 'draft' and state != 'feeding'"/>
                                <field name='wh_assembly_id' options="{'no_create': True}"
                                       readonly="state != 'draft' and state != 'feeding'"/>
                                <field name='warehouse_dest_id'/>
                                <field name='invoice_id' readonly='1' options="{'no_create': True}"/>
                                <field name='voucher_id' readonly='1'/>
                                <field name='out_voucher_id' readonly='1'/>
                                <field name='finance_category_id' invisible="1"/>
                                <field name='state' invisible='1'/>
                            </group>
                        </group>
                        <group string='产出成品和投入材料'>
                            <field nolabel='1' name='line_ids' colspan="2"
                                   context="{'lot': True, 'default_warehouse_id': warehouse_id}"
                                   readonly="state=='done'">
                                <list string='库存调拨' editable='bottom' default_order="type desc" decoration-info="type=='out'">
                                    <field name='type'
                                        required='1'
                                        readonly="state=='done'" optional="show"/>
                                    <field name='goods_id'
                                        required='1'
                                        readonly="state=='done'" optional="show"/>
                                    <field name='attribute_id'
                                        domain="[('goods_id', '=', goods_id)]"
                                        required="using_attribute" readonly="not using_attribute or state=='done'"
                                        groups='goods.multi_attrs_groups'  optional="show"/>
                                    <field name="warehouse_id" invisible="1"/>
                                    <field name='lot_id' string="发料批号"
                                            groups='goods.batch_groups'
                                            readonly="not using_batch or state=='done' or type=='in'"
                                            required="using_batch and type=='out'"
                                                context="{'lot': True}"
                                                options="{'no_open': True, 'no_create': True, 'no_edit': True}"  optional="show"/>
                                    <field name='lot'
                                        groups='goods.batch_groups'
                                        readonly="not using_batch or state=='done' or type=='out'"
                                        required="using_batch and type=='in'"  optional="show"/>
                                    <field name='goods_uos_qty'
                                        groups='goods.auxiliary_unit_groups'
                                        sum='1'
                                        readonly="state=='done'" optional="hide"/>
                                    <field name='uos_id'
                                        groups='goods.auxiliary_unit_groups'
                                        readonly="state=='done'" optional="hide"/>
                                    <field name='goods_qty'
                                        readonly="force_batch_one or state=='done'"
                                        sum='1' optional="show"/>
                                    <field name='uom_id'
                                        required='1'
                                        readonly="state=='done'" optional="show"/>
                                    <field name='price' string='加工单价(末税单价)'
                                        readonly="state=='done'" optional="show"/>
                                    <field name='tax_rate'
                                        readonly="state=='done'" optional="show"/>
                                    <field name='price_taxed'
                                        readonly="state=='done'" optional="show"/>
                                    <field name='cost_unit' string='入库单位成本' readonly='1' optional="show"/>
                                    <field name='cost' string='入库金额' readonly='1' sum='1' optional="show"/>
                                    <field name='expiration_date' groups='warehouse.group_expiration_date'  optional="hide"/>
                                    <field name="scrap" optional="show"/>
                                    <field name='note' string='备注' optional="show"/>
                                    <field name='using_batch' column_invisible='1'/>
                                    <field name='force_batch_one' column_invisible='1'/>
                                    <field name='using_attribute' column_invisible='1'/>
                                    <field name='type' column_invisible='1'/>
                                    <field name='state' column_invisible='1'/>
                                </list>
                            </field>
                        </group>
                        <group>
                            <field name='note' nolabel='1' colspan="2" placeholder='备注...' />
                        </group>
                        <group>
                            <group>
                                <field name='qc_result' widget='pdf_viewer'
                                       readonly="state!='draft'"
                                       groups='warehouse.group_qc'/>
                            </group>
                            <group>
                                <field name='qc_result_summary'
                                       readonly="state!='draft'"
                                       groups='warehouse.group_qc'/>
                            </group>
                        </group>
                        <group col='6'>
                            <group colspan='2'>
                                <field name='create_uid' string='制单人' readonly='1' />
                                <field name='create_date' string='录单时间' readonly='1' />
                            </group>
                            <group colspan='2'>
                                <field name='write_uid' string='最后修改人' readonly='1' />
                                <field name='write_date' string='最后修改时间' readonly='1' />
                            </group>
                            <group colspan='2'>
                                <field name='approve_uid' readonly='1' />
                                <field name='approve_date' readonly='1' />
                            </group>
                        </group>
                    </sheet>
                    <chatter/>
                </form>
            </field>
        </record>
        <record id="outsource_search" model="ir.ui.view">
            <field name="name">outsource.search</field>
            <field name="model">outsource</field>
            <field name="arch" type="xml">
                <search string="委外单">
                    <field name="name"/>
                    <field name="line_in_ids" string="含成品" filter_domain="[('line_in_ids.goods_id','ilike',self)]"/>
                    <field name="line_out_ids" string="含部件" filter_domain="[('line_out_ids.goods_id','ilike',self)]"/>
                    <field name='warehouse_id'/>
                    <field name="state"/>
                    <group expand="0" string="分组">
                        <filter name="by_wh" string="调出仓库" domain="[]" context="{'group_by':'warehouse_id'}"/>
                        <filter name="by_day" string="单据日期" domain="[]" context="{'group_by':'date:day'}"/>
                    </group>
                </search>
            </field>
        </record>
        <record id='wh_disassembly_list' model='ir.ui.view'>
            <field name='name'>wh.disassembly.list</field>
            <field name='model'>wh.disassembly</field>
            <field name='arch' type='xml'>
                <list string='拆卸单' decoration-info='state == "draft"' decoration-muted= 'state == "cancel"' >
                    <field name='date'  optional="show"/>
                    <field name='name'  optional="show"/>
                    <field name='fee'  optional="show"/>
                    <field name='goods_qty' optional="show"/>
                    <field name='details' widget="html" optional="show"/>
                    <field name='warehouse_id'  optional="show"/>
                    <field name='warehouse_dest_id'  optional="show"/>
                    <field name='lot_id' string="发料批号" groups='goods.batch_groups' optional="show"/>
                    <field name='user_id'  optional="show"/>
                    <field name='state'  optional="show"/>
                </list>
            </field>
        </record>
        <record id='wh_disassembly_form' model='ir.ui.view'>
            <field name='name'>wh.disassembly.form</field>
            <field name='model'>wh.disassembly</field>
            <field name='arch' type='xml'>
                <form string='拆卸单' >
                    <header>
                        <button name='approve_feeding' type='object' string='发料' class='oe_highlight'
                                invisible="state != 'draft'"/>
                        <button name='cancel_feeding' type='object' string='退料'
                                invisible="state != 'feeding'"/>
                        <button name='approve_order' type='object' string='成品入库' class='oe_highlight'
                                invisible="state != 'feeding'"/>
                        <button name='cancel_approved_order' type='object' string='撤销入库' invisible="state != 'done'" />
                        <button name='update_bom' type='object' string='存为物料清单' invisible="1"/>
                        <button name="action_cancel" invisible="state != 'draft'" string="作废" type="object"/>
                        <field name='state' widget='statusbar' statusbar_visible="draft,feeding,done"/>
                    </header>
                    <sheet>
                        <group>
                            <group>
                                <field name='date' required='1' readonly="state=='done'" />
                                <field name='warehouse_id' />
                                <field name='bom_id' options="{'no_create': 1}"
                                       readonly="state != 'draft' and state != 'feeding'"/>
                                <field name='goods_id' options="{'no_create': 1}" invisible="1"
                                       readonly="state != 'draft' and state != 'feeding'"/>
                                <field name='lot_id' string="发料批号"
                                       groups='goods.batch_groups'
                                       domain="[('goods_id', '=', goods_id), ('state', '=', 'done'),
                                       ('lot', '!=', False), ('qty_remaining', '>', 0), ('warehouse_dest_id', '=', warehouse_id)]"/>
                                <field name='goods_qty' options="{'no_create': 1}"
                                       readonly="state != 'draft' and state != 'feeding'"/>
                                <field name='user_id'
                                       options="{'no_open': True, 'no_create': True}"/>
                            </group>
                            <group>
                                <field name='fee' />
                                <field name='warehouse_dest_id'/>
                                <field name='voucher_id' readonly='1'/>
                                <field name='out_voucher_id' readonly='1'/>
                                <field name='finance_category_id' invisible="1"/>
                                <field name='state' invisible='1'/>
                            </group>
                        </group>
                        <group string='组合件和子件'>
                            <field nolabel='1' colspan="2" name='line_ids'
                                   context="{'lot': True, 'default_warehouse_id': warehouse_id}"
                                   readonly="state=='done'">
                                <list string='库存调拨' editable='bottom' default_order="type desc" decoration-info="type=='out'">
                                    <field name='type' required='1' readonly="state=='done'" optional="show"/>
                                    <field name='goods_id' required='1' readonly="state=='done'"  optional="show"/>
                                    <field name='attribute_id'
                                        domain="[('goods_id', '=', goods_id)]"
                                        required="using_attribute"
                                        readonly="not using_attribute or state=='done'"
                                        groups='goods.multi_attrs_groups' optional="show"/>
                                    <field name="warehouse_id" invisible="1"/>
                                    <field name='lot_id' string="发料批号"
                                            groups='goods.batch_groups'
                                            readonly="not using_batch or state=='done' or type=='in'"
                                            required="using_batch and type=='out'"
                                                context="{'lot': True}"
                                                options="{'no_open': True, 'no_create': True, 'no_edit': True}"  optional="show"/>
                                    <field name='lot'
                                        groups='goods.batch_groups'
                                        readonly="not using_batch or state=='done' or type=='out'"
                                        required="using_batch and type=='in'"  optional="show"/>
                                    <field name='goods_uos_qty'
                                        sum='1'
                                        readonly="state=='done'"
                                        groups='goods.auxiliary_unit_groups' optional="show"/>
                                    <field name='uos_id'
                                        groups='goods.auxiliary_unit_groups'
                                        readonly="state=='done'"   optional="show"/>
                                    <field name='goods_qty' sum='1'
                                        readonly="force_batch_one or state=='done'"  optional="show"/>
                                    <field name='uom_id'
                                        required='1'
                                        readonly="state=='done'"  optional="show"/>
                                    <field name='cost_unit' string='出库单位成本' readonly='1'  optional="show"/>
                                    <field name='cost' string='出库成本' readonly='1' sum='1'  optional="show"/>
                                    <field name='expiration_date'
                                           readonly='1'
                                           groups='warehouse.group_expiration_date'  optional="show"/>
                                    <field name='note' string='备注'  optional="show"/>
                                    <field name='using_attribute' column_invisible='1'/>
                                    <field name='using_batch' column_invisible='1'/>
                                    <field name='force_batch_one' column_invisible='1'/>
                                    <field name='lot_qty' column_invisible='1'/>
                                    <field name='lot_uos_qty' column_invisible='1'/>
                                    <field name='type' column_invisible='1'/>
                                    <field name='state' column_invisible='1'/>
                                    <field name="all_lack" optional="hide"/>
                                    <field name="wh_lack" optional="hide"/>
                                </list>
                            </field>
                        </group>
                        <group>
                            <field name='note' nolabel='1' colspan="2" placeholder='备注...' />
                        </group>
                        <group>
                            <group>
                                <field name='qc_result' widget='pdf_viewer'
                                       readonly="state!='draft'"
                                       groups='warehouse.group_qc'/>
                            </group>
                            <group>
                                <field name='qc_result_summary'
                                       readonly="state!='draft'"
                                       groups='warehouse.group_qc'/>
                            </group>
                        </group>
                        <group col='6'>
                            <group colspan='2'>
                                <field name='create_uid' string='制单人' readonly='1' />
                                <field name='create_date' string='录单时间' readonly='1' />
                            </group>
                            <group colspan='2'>
                                <field name='write_uid' string='最后修改人' readonly='1' />
                                <field name='write_date' string='最后修改时间' readonly='1' />
                            </group>
                            <group colspan='2'>
                                <field name='approve_uid' readonly='1' />
                                <field name='approve_date' readonly='1' />
                            </group>
                        </group>
                    </sheet>
                    <chatter/>
                </form>
            </field>
        </record>
		<record id="wh_disassembly_search" model="ir.ui.view">
            <field name="name">wh.disassembly.search</field>
            <field name="model">wh.disassembly</field>
            <field name="arch" type="xml">
                <search string="拆卸单">
                    <field name="name"/>
                    <field name="line_in_ids" string="含成品" filter_domain="[('line_in_ids.goods_id','ilike',self)]"/>
                    <field name="line_out_ids" string="含部件" filter_domain="[('line_out_ids.goods_id','ilike',self)]"/>
                    <field name='warehouse_id'/>
                    <field name="state"/>
                    <group expand="0" string="分组">
                        <filter name="by_wh" string="调出仓库" domain="[]" context="{'group_by':'warehouse_id'}"/>
                        <filter name="by_day" string="单据日期" domain="[]" context="{'group_by':'date:day'}"/>
                    </group>
                </search>
            </field>
        </record>
    </data>
</odoo>
 |