From 730c64abc47b0fd0b8f7b04c9cff613f89b1f34f Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 9 Jul 2012 10:19:00 +0530 Subject: [PATCH] on amend, retain the existing attachments --- js/legacy/widgets/form/form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/legacy/widgets/form/form.js b/js/legacy/widgets/form/form.js index fc9814a956..e7dbc9bf81 100644 --- a/js/legacy/widgets/form/form.js +++ b/js/legacy/widgets/form/form.js @@ -962,7 +962,7 @@ _f.Frm.prototype.copy_doc = function(onload, from_amend) { var newdoc = LocalDB.copy(this.doctype, dn, from_amend); // do not copy attachments - if(this.meta.allow_attach && newdoc.file_list) + if(this.meta.allow_attach && newdoc.file_list && !from_amend) newdoc.file_list = null; // copy chidren