Merge pull request #6305 from rohitwaghchaure/links_not_working_for_prepared_report

[Fix] Links are not working
This commit is contained in:
Prateeksha Singh 2018-10-29 11:35:19 +05:30 committed by GitHub
commit 2a6e16bed2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 3 deletions

View file

@ -1,5 +1,6 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
@ -270,6 +271,38 @@
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "columns",
"fieldtype": "Code",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Columns",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
}
],
"has_web_view": 0,
@ -282,7 +315,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-08-20 16:56:47.389629",
"modified": "2018-10-23 16:58:14.879417",
"modified_by": "Administrator",
"module": "Core",
"name": "Prepared Report",
@ -317,5 +350,6 @@
"sort_order": "DESC",
"title_field": "report_name",
"track_changes": 1,
"track_seen": 0
"track_seen": 0,
"track_views": 0
}

View file

@ -39,6 +39,7 @@ def run_background(instance):
create_csv_file(result['columns'], result['result'], 'Prepared Report', instance.name)
instance.status = "Completed"
instance.columns = json.dumps(result["columns"])
instance.report_end_time = frappe.utils.now()
instance.save()

View file

@ -193,7 +193,7 @@ def get_prepared_report_result(report, filters, dn=""):
data = read_csv_content_from_attached_file(doc)
if data:
latest_report_data = {
"columns": data[0],
"columns": json.loads(doc.columns) if doc.columns else data[0],
"result": data[1:]
}