<?xml version="1.0"?>
<t t-name="mrp.mo_overview_components">
        <t t-foreach="components" t-as="component">
            <t t-call="mrp.mo_overview_line">
                <t t-set="line" t-value="component['summary']"/>
            </t>
            <t t-if="component['summary']['index'] in data['unfolded_ids'] and component.get('replenishments', [])" t-foreach="component['replenishments']" t-as="replenishment">
                <t t-call="mrp.mo_overview_line">
                    <t t-set="line" t-value="replenishment['summary']"/>
                </t>
                <t t-if="replenishment['summary']['index'] in data['unfolded_ids'] and (replenishment.get('components', []) or replenishment.get('operations', {}).get('details', []))">
                    <t t-call="mrp.mo_overview_components">
                        <t t-set="components" t-value="replenishment.get('components', [])"/>
                        <t t-set="operations" t-value="replenishment.get('operations', {})"/>
                        <t t-set="byproducts" t-value="replenishment.get('byproducts', {})"/>
                    </t>
                </t>
            </t>
        </t>
        <t t-call="mrp.mo_overview_operations">
            <t t-set="summary" t-value="operations.get('summary', {})"/>
            <t t-set="operations" t-value="operations.get('details', [])"/>
        </t>
        <t t-call="mrp.mo_overview_byproducts">
            <t t-set="summary" t-value="byproducts.get('summary', {})"/>
            <t t-set="byproducts" t-value="byproducts.get('details', [])"/>
        </t>
    </t>

    