fix: on primary action callback close msgprint

This commit is contained in:
vishdha 2020-06-15 17:17:17 +05:30 committed by Rohan Bansal
parent 69fc7812ae
commit 6bc71d47d2

View file

@ -167,6 +167,22 @@ frappe.msgprint = function(msg, title, is_minimizable) {
method: data.primary_action.server_action,
args: {
args: data.primary_action.args
},
freeze: true,
callback: (r) => {
frappe.run_serially([
() => {
if (data.primary_action.hide_on_success) {
frappe.hide_msgprint();
}
},
() => frappe.timeout(.1),
() => {
if (r && r.message) {
frappe.msgprint(r.message, title="Success");
}
}
]);
}
});
}