Merge pull request #7292 from deepeshgarg007/prepared-report-hotfix
fix: Custom column handling for prepared reports
This commit is contained in:
commit
ed9aa0410f
1 changed files with 9 additions and 0 deletions
|
|
@ -34,6 +34,15 @@ class PreparedReport(Document):
|
|||
|
||||
def run_background(instance):
|
||||
report = frappe.get_doc("Report", instance.ref_report_doctype)
|
||||
|
||||
report.custom_columns = []
|
||||
|
||||
if report.report_type == 'Custom Report':
|
||||
custom_report_doc = report
|
||||
reference_report = custom_report_doc.reference_report
|
||||
report = frappe.get_doc("Report", reference_report)
|
||||
report.custom_columns = custom_report_doc.json
|
||||
|
||||
result = generate_report_result(report, filters=instance.filters, user=instance.owner)
|
||||
create_json_gz_file(result['result'], 'Prepared Report', instance.name)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue