* docstatus check before save * Submit changed to Update to be more precise
This commit is contained in:
parent
87a0b6213b
commit
46d6b46c0f
1 changed files with 2 additions and 2 deletions
|
|
@ -31,7 +31,7 @@ frappe.ui.form.ControlAttach = frappe.ui.form.ControlData.extend({
|
|||
me.frm.attachments.remove_attachment_by_filename(me.value, function() {
|
||||
me.parse_validate_and_set_in_model(null);
|
||||
me.refresh();
|
||||
me.frm.save();
|
||||
me.frm.doc.docstatus == 1 ? me.frm.save('Update') : me.frm.save();
|
||||
});
|
||||
} else {
|
||||
this.dataurl = null;
|
||||
|
|
@ -190,7 +190,7 @@ frappe.ui.form.ControlAttach = frappe.ui.form.ControlData.extend({
|
|||
this.parse_validate_and_set_in_model(attachment.file_url);
|
||||
this.refresh();
|
||||
this.frm.attachments.update_attachment(attachment);
|
||||
this.frm.save();
|
||||
this.frm.doc.docstatus == 1 ? this.frm.save('Update') : this.frm.save();
|
||||
} else {
|
||||
this.value = this.get_value();
|
||||
this.refresh();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue