fix(Report): group by reports not being saved

This commit is contained in:
prssanna 2020-01-14 13:22:10 +05:30
parent e67b0d2e22
commit 2004e2e4cf

View file

@ -81,7 +81,11 @@ frappe.ui.GroupBy = class {
}
apply_settings(settings) {
this.groupby_select.val(settings.group_by);
// Extract fieldname from `tabdoctype`.`fieldname`
let group_by_fieldname = settings.group_by.split('.')[1].slice(1, -1);
this.groupby_select.val(group_by_fieldname);
this.aggregate_function_select.val(settings.aggregate_function);
this.show_hide_aggregate_on();
this.aggregate_on_select.val(settings.aggregate_on);