diff --git a/core/doctype/doctype/doctype.py b/core/doctype/doctype/doctype.py index b0a1aebfbd..9ce5b630b2 100644 --- a/core/doctype/doctype/doctype.py +++ b/core/doctype/doctype/doctype.py @@ -111,7 +111,7 @@ class DocType: webnotes.conn.sql("delete from `tabProperty Setter` where doc_type = %s", self.doc.name) webnotes.conn.sql("delete from `tabSearch Criteria` where doc_type = %s", self.doc.name) - def on_rename(self, new, old): + def on_rename(self, new, old, merge=False): if self.doc.issingle: webnotes.conn.sql("""\ update tabSingles set doctype=%s diff --git a/core/doctype/profile/profile.py b/core/doctype/profile/profile.py index 725aa45d1c..fe6e1fca46 100644 --- a/core/doctype/profile/profile.py +++ b/core/doctype/profile/profile.py @@ -214,7 +214,7 @@ Thank you,
webnotes.conn.sql("""delete from `tabComment` where comment_doctype='Message' and (comment_docname=%s or owner=%s)""", (self.doc.name, self.doc.name)) - def on_rename(self,newdn,olddn): + def on_rename(self,newdn,olddn, merge=False): self.validate_rename(newdn, olddn) tables = webnotes.conn.sql("show tables") diff --git a/public/js/legacy/widgets/form/fields.js b/public/js/legacy/widgets/form/fields.js index a7ebd8b09f..4f801d7e77 100644 --- a/public/js/legacy/widgets/form/fields.js +++ b/public/js/legacy/widgets/form/fields.js @@ -1088,7 +1088,7 @@ SelectField.prototype.make_input = function() { padding-left: 6px; padding-right: 6px; margin-left: 6px;'>\ ") .click(function() { - cur_frm.attachments.new_attachment(); + cur_frm.attachments.new_attachment(me.df.fieldname); }) .appendTo(this.input_area); } diff --git a/public/js/wn/form/attachments.js b/public/js/wn/form/attachments.js index cb9788ac82..7c43151c70 100644 --- a/public/js/wn/form/attachments.js +++ b/public/js/wn/form/attachments.js @@ -62,11 +62,14 @@ wn.ui.form.Attachments = Class.extend({ var file_list = this.get_file_list(); var file_names = keys(file_list).sort(); - + // add attachment objects for(var i=0; i