<?xml version="1.0"?>
<t t-name="stock.report_reception_body">
        <div class="o_report_reception justify-content-between">
            <div class="o_report_reception_header my-4">
                <h3>
                    <t t-if="docs">
                        <t t-foreach="docs" t-as="doc">
                            <div>
                                <a href="#" t-att-res-model="doc_model" view-type="form" t-att-res-id="doc.id">
                                    <t t-esc="doc.display_name"/>
                                </a>
                                <span t-field="doc.state" t-attf-class="badge rounded-pill bg-opacity-50 #{'bg-success' if doc.state == 'done' else 'bg-info'}"/>
                            </div>
                        </t>
                    </t>
                    <t t-else="">
                        <span t-esc="reason"/>
                    </t>
                </h3>
            </div>
            <table t-if="sources_to_lines" class="o_report_reception_table table table-sm">
                <t t-foreach="sources_to_lines" t-as="source">
                    <thead t-if="any(line['is_assigned'] for line in sources_to_lines[source])">
                        <tr class="bg-light">
                            <th>
                                <i t-if="source[0].priority == '1'" class="o_priority o_priority_star fa fa-star"/>
                                <a name="source_link" href="#" t-att-res-model="source[0]._name" view-type="form" t-att-res-id="source[0].id" t-out="source[0].display_name"/>
                                <span t-if="len(source) &gt; 1">
                                    (<a name="origin_link" href="#" t-att-res-model="source[1]._name" view-type="form" t-att-res-id="source[1].id" t-out="source[1].display_name"/>)
                                </span>
                                <span t-if="source[0]._name == 'stock.picking' and source[0].partner_id">:
                                    <a name="source_link" href="#" t-att-res-model="source[0].partner_id._name" t-att-res-id="source[0].partner_id.id" view-type="form" t-out="source[0].partner_id.name"/>
                                </span>
                            </th>
                            <th>Expected Delivery: <t t-esc="sources_to_formatted_scheduled_date[source]"/></th>
                        </tr>
                    </thead>
                    <tbody>
                        <t t-set="possible_moves" t-value="sources_to_lines[source]"/>
                        <t t-foreach="possible_moves" t-as="line">
                            <!-- don't print non-assigned lines when printing pdf -->
                            <tr t-if="line['is_assigned']">
                                <td>
                                    <t t-esc="line['product']['display_name']"/>
                                </td>
                                <td>
                                    <t t-esc="line['quantity']"/>
                                    <t groups="uom.group_uom" t-esc="line['uom']"/>
                                </td>
                            </tr>
                        </t>
                    </tbody>
                </t>
            </table>
            <p t-else="">
                No allocation need found.
            </p>
        </div>
    </t>

    