<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
    <t t-name="pos_restaurant.OrderDisplay" t-inherit="point_of_sale.OrderDisplay" t-inherit-mode="extension">

        <xpath expr="(//t[@t-if='lines.length'])[1]" position="attributes" >
             <attribute name="t-if">lines.length or displayCourses</attribute>
        </xpath>

        <xpath expr="(//div[hasclass('order-container')]/t[@t-foreach='lines'])[1]" position="replace" >
            <t t-if="displayCourses">
                <t t-foreach="order.courses" t-as="course" t-key="course_index">
                    <OrderCourse course="course" course_index="course_index" t-slot-scope="course_scope">
                        <t t-if="props.slots.default" t-slot="default" line="course_scope.line"/>
                        <Orderline t-else="" line="course_scope.line" mode="this.props.mode"/>
                    </OrderCourse>
                </t>
            </t>
            <t t-else="">$0</t>
        </xpath>
    </t>
</templates>
