<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <template id="sales_indent_view">
        <t t-call="web.html_container">
            <t t-call="web.external_layout">
                <t class="page">
                    <div class="oe_structure"/>
                    <center>
                        <b>
                            <h3>Product Sales Indent Report</h3>

                        </b>
                    </center>
                    <t t-if="start_date and end_date">
                        <center>
                            <span t-esc="start_date"/>
                            To
                            <span t-esc="end_date"/>
                        </center>
                    </t>
                    <t t-foreach="partner_id" t-as="partner">
                        <center>
                            <b>
                                <span t-esc="partner['name']" style="font-size:22px;"/>
                            </b>
                        </center>
                        <t t-foreach="categ_id" t-as="categ">
                            <center>
                                <b>
                                    <span t-esc="categ['name']" style="font-size:17px;"/>
                                </b>
                            </center>
                            <table class="table table-condensed">
                                <thead>
                                    <tr>
                                        <th>Product</th>
                                        <th>Quantity</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr t-foreach="form" t-as="order">
                                        <t t-if="order['category_id'] == categ['id'] and order['partner_id'] == partner['id']">
                                            <td>
                                                <span t-esc="order['product_id']"/>
                                            </td>
                                              <td>
                                                <span t-esc="order['quantity']"/>
                                            </td>
                                        </t>
                                    </tr>
                                </tbody>
                            </table>
                        </t>
                    </t>
                </t>
            </t>
        </t>
    </template>
</odoo>