<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2017 Eficent Business and IT Consulting Services S.L.
     License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
    <record id="view_purchase_order_form" model="ir.ui.view">
        <field name="name">purchase.order.form - purchase_date_planned_manual</field>
        <field name="model">purchase.order</field>
        <field name="inherit_id" ref="purchase.purchase_order_form" />
        <field name="arch" type="xml">
            <xpath expr="//field[@name='order_line']/tree" position="inside">
                <field name="predicted_arrival_late" invisible="1" />
                <button
                    title="Arriving late"
                    attrs="{'invisible': [('predicted_arrival_late', '=', False)]}"
                    name="action_delayed_line"
                    type="object"
                    icon="fa-exclamation-triangle"
                />
            </xpath>
            <xpath expr="//field[@name='order_line']/tree" position="attributes">
                <attribute
                    name="decoration-danger"
                >predicted_arrival_late == True</attribute>
            </xpath>
        </field>
    </record>

</odoo>
