<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record id="view_move_exclude_adu_form" model="ir.ui.view">
        <field name="name">stock.move.form</field>
        <field name="model">stock.move</field>
        <field name="inherit_id" ref="stock.view_move_form" />
        <field name="arch" type="xml">
            <field name="location_dest_id" position="after">
                <field name="exclude_from_adu" />
            </field>
        </field>
    </record>
    <record id="action_server_mrp_production_request_refresh" model="ir.actions.server">
        <field name="name">Exclude from ADU</field>
        <field name="model_id" ref="stock.model_stock_move" />
        <field name="binding_model_id" ref="stock.model_stock_move" />
        <field name="state">code</field>
        <field name="code">records._toggle_exclude_from_adu()</field>
    </record>
    <record id="view_move_tree" model="ir.ui.view">
        <field name="name">stock.move.tree - ddmrp_exclude_moves_adu_calc</field>
        <field name="model">stock.move</field>
        <field name="inherit_id" ref="stock.view_move_tree" />
        <field name="arch" type="xml">
            <xpath expr="//field[@name='product_id']" position="after">
                <field name="exclude_from_adu" invisible="1" />
            </xpath>
            <tree position="attributes">
                <attribute name="decoration-muted">exclude_from_adu == True</attribute>
            </tree>
        </field>
    </record>
    <record id="view_move_search" model="ir.ui.view">
        <field name="name">stock.move.search - ddmrp_exclude_moves_adu_calc</field>
        <field name="model">stock.move</field>
        <field name="inherit_id" ref="stock.view_move_search" />
        <field name="arch" type="xml">
            <xpath expr="//filter[@name='inventory']" position="after">
                <separator />
                <filter
                    string="Not Excluded from ADU"
                    name="not_excluded_from_adu"
                    domain="[('exclude_from_adu', '=', False)]"
                />
            </xpath>
        </field>
    </record>
</odoo>
