<?xml version="1.0" encoding="utf-8"?>
<templates id="template">
    <t t-name="mrp.ForecastedDetails" owl="1" t-inherit="stock.ForecastedDetails" t-inherit-mode="extension">
        <xpath expr="//tr[@name='draft_picking_in']" position="after">
            <tr t-if="props.docs.draft_production_qty.in" name="draft_mo_in">
                <td colspan="2">Production of Draft MO</td>
                <td t-esc="_formatFloat(props.docs.draft_production_qty.in)" class="text-end"/>
            </tr>
        </xpath>
        <xpath expr="//tr[@name='draft_picking_out']" position="after">
            <tr t-if="props.docs.draft_production_qty.out" name="draft_mo_out">
                <td colspan="2">Component of Draft MO</td>
                <td t-esc="_formatFloat(-props.docs.draft_production_qty.out)" class="text-end"/>
            </tr>
        </xpath>
        <xpath expr="//button[@name='unreserve_link']" position="after">
            <button t-if="line.move_out and line.move_out.raw_material_production_id and line.move_out.raw_material_production_id.unreserve_visible"
                class="btn btn-sm btn-primary o_report_replenish_unreserve"
                t-on-click="() => this._unreserve('mrp.production', line.move_out.raw_material_production_id.id)">
                Unreserve
            </button>
        </xpath>
        <xpath expr="//button[@name='reserve_link']" position="after">
            <button t-if="line.move_out and line.move_out.raw_material_production_id and line.move_out.raw_material_production_id.reserve_visible"
                class="btn btn-sm btn-primary o_report_replenish_reserve"
                t-on-click="() => this._reserve('mrp.production', line.move_out.raw_material_production_id.id)">
                Reserve
            </button>
        </xpath>
        <xpath expr="//button[@name='change_priority_link']" position="after">
            <button t-if="line.move_out and line.move_out.raw_material_production_id"
                t-attf-class="o_priority o_priority_star o_report_replenish_change_priority fa fa-star#{line.move_out.raw_material_production_id.priority=='1' ? ' one' : '-o zero'}"
                t-on-click="() => this._onClickChangePriority('mrp.production', line.move_out.raw_material_production_id)"/>
        </xpath>
    </t>
</templates>
