'This method generates and returns html version of a report.'

@api.model
def get_html(self, docids, report_name, data=None):

    report_model_name = ('report.%s' % report_name)
    report_model = self.env.get(report_model_name)
    if (report_model is not None):
        return report_model.render_html(docids, data=data)
    else:
        report = self._get_report_from_name(report_name)
        docs = self.env[report.model].browse(docids)
        docargs = {'doc_ids': docids, 'doc_model': report.model, 'docs': docs}
        return self.render(report.report_name, docargs)
