Here this report the category name are repeating But I want to show category name once and its product. How can I do that please help.
xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="item_template_id">
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id">t>
t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company">t>
t>
<div class="header">
<div class="row">
<div class="col-md-12 justify-content-center">
<center>
<b>
<h3 style="font-family: 'Helvetica';" t-field="company.name"/>
<h4>Item Wise Sales Reporth4>
<b>
<span t-esc="data['start_date']"/>
b>
To
<b>
<span t-esc="data['end_date']"/>
b>
b>
center>
div>
div>
div>
<t t-call="web.html_container">
<t t-call="web.external_layout">
<style>
.table {
border: 1px solid black;
}
.table th{
font-family: 'Helvetica';
font-size: 18px;
border:1px solid black;
}
.table td{
font-family: 'Helvetica';
font-size: 18px;
border-left:1px solid black;
border-right:1px solid black;
}
style>
<div class="page">
<table class="table">
<tr>
<th>
Product Category with Item Name
th>
<th>
Qty
th>
<th>
Unit
th>
<th>
Net Sale
th>
tr>
<t t-set="total_sale" t-value="0"/>
<t t-set="grand_sale" t-value="0"/>
<t t-foreach="invoice_line_items" t-as="invoice_line_item">
<tr>
<td>
<div>
<u>
<b>
<span t-esc="invoice_line_item['product_category_item']"/>
b>
u>
div>
td>
<td style="font-family: 'Helvetica';font-size: 18px;border-left:1px solid black;border-right:1px solid black;">td>
<td style="font-family: 'Helvetica';font-size: 18px;border-left:1px solid black;border-right:1px solid black;">td>
<td style="font-family: 'Helvetica';font-size: 18px;border-left:1px solid black;border-right:1px solid black;">td>
tr>
<t t-if="request.env['product.category'].search([('name', '=', invoice_line_item['product_category_item'])])">
<tr>
<td>
<span t-esc="invoice_line_item['product_name']"/>
td>
<td style="text-align: right;">
<t t-esc="invoice_line_item['quantity']"/>
td>
<td style="text-align: right;">
<t t-esc="invoice_line_item['uom']"/>
td>
<td style="text-align: right;">
<t t-esc="'{:,.2f}'.format(invoice_line_item['net_sale'])"/>
<t t-set="total_sale" t-value="total_sale + invoice_line_item['net_sale']"/>
td>
tr>
<tr>
<td style="text-align: right;">
<b>Category Totalb>
td>
<td>td>
<td>td>
<td style="border-top:1px solid black;text-align: right;">
<b>
<span t-esc="'{:,.2f}'.format(total_sale)"/>
b>
td>
tr>
t>
t>
<tr>
<td style="text-align: left;">
<b>Grand Totalb>
td>
<td>td>
<td>td>
<td style="border-top:1px solid black;text-align: right;">
<u>
<b>
<t t-set="grand_sale" t-value="grand_sale + total_sale"/>
<span t-esc="'{:,.2f}'.format(grand_sale)"/>
b>
u>
td>
tr>
<div class="footer" style="text-align: right;margin-top: 2px;">
<span class="page"/>
div>
table>
div>
t>
t>
template>
data>
odoo>