I am creating an excel report for invoice line details in odoo 13,
Its all well when there is single invoice line but when it comes to multiple invoice line, I get an issue
Here I am pasting my code
for wizard in self:
heading = 'Sales VAT Summary Report'
worksheet.write_merge(0, 0, 0, 9, heading, easyxf(
'font:height 300; align: horiz center;pattern: pattern solid, fore_color black; font: color white; font:bold True;' "borders: top thin,bottom thin"))
invoice_objs = self.env['account.move'].search([('invoice_date', '>=', wizard.from_date),
('invoice_date', '<=', wizard.to_date)])
for invoice in invoice_objs:
invoice_date = invoice.invoice_date.strftime('%Y-%m-%d')
worksheet.write(row, 0, invoice_date)
worksheet.write(row, 1, invoice.name)
worksheet.write(row, 2, invoice.partner_id.name)
worksheet.write(row, 3, invoice.invoice_line_ids.product_id.name) --> invoice line
worksheet.write(row, 4, invoice.invoice_line_ids.tax_ids.name) --.> invoice line
I just want to use for loop and get the invoice details according to the number of lines in the invoice