I need to modify the invoice report like totally change the way it looks and i have read through the odoo qweb docs (https://www.odoo.com/documentation/16.0/developer/reference/backend/reports.html) and saw the Custom Reports section but i don't really understand how it works.
from odoo import api, models
class ParticularReport (models.AbstractModel):
_name = 'report.module.report_name'
def _get_report_values (self,docids,data= None ):
# get the report action back as we will need its data
report = self.env['ir.actions.report']._get_report_from_name('module.report_name')
# get the records selected for this rendering of the report
obj = self.env[report.model].browse(docids)
# return a custom rendering context
return {
'lines': docids.get_lines()
}