summaryrefslogtreecommitdiff
path: root/addons/stock/static/src/xml/forecast_widget.xml
blob: 463e14d6cb70d977b835030b7abdd9e8a33dff26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<?xml version="1.0" encoding="utf-8"?>
<templates id="template" xml:space="preserve">
    <t t-name="stock.forecastWidget">
        <span t-if="['draft', 'partially_available', 'assigned', 'cancel', 'done'].includes(state)" t-esc="reserved_availability_str"/>
        <span t-elif="!forecast_expected_date_str and will_be_fulfilled" class="text-success">Available</span>
        <span t-elif="forecast_expected_date_str and will_be_fulfilled" t-att-class="forecast_is_late ? 'text-danger' : 'text-warning'">Exp <t t-esc="forecast_expected_date_str"/></span>
        <span t-else="" class="text-danger">Not Available</span>
        <button t-if="product_type == 'product'" t-att="id ? {} : {'disabled': ''}" class="o_forecast_report_button btn btn-link o_icon_button ml-2" title="Forecasted Report">
            <i t-attf-class="fa fa-fw fa-area-chart {{ state != 'draft' and (!will_be_fulfilled or forecast_is_late) ? 'text-danger' : '' }}"/>
        </button>
    </t>
</templates>