From 30ca7b1143769ab9c970b90b7a9ee1baa45ad41e Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 21 Jan 2016 21:27:39 +0530 Subject: [PATCH] [hotfix] don't auto-sync standard fields of child values in frm.call --- frappe/public/js/legacy/clientscriptAPI.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frappe/public/js/legacy/clientscriptAPI.js b/frappe/public/js/legacy/clientscriptAPI.js index 39b5a5841e..c7e673bd42 100644 --- a/frappe/public/js/legacy/clientscriptAPI.js +++ b/frappe/public/js/legacy/clientscriptAPI.js @@ -283,7 +283,14 @@ _f.Frm.prototype.call = function(opts) { if(opts.child) { // update child doc opts.child = locals[opts.child.doctype][opts.child.name]; - $.extend(opts.child, r.message); + + var std_field_list = ["doctype"].concat(frappe.model.std_fields_list); + for (key in r.message) { + if (std_field_list.indexOf(key)===-1) { + opts.child[key] = r.message[key]; + } + } + me.fields_dict[opts.child.parentfield].refresh(); } else { // update parent doc