diff --git a/src/components/TwoColumnForm.vue b/src/components/TwoColumnForm.vue index 6542473b..b9a4e5cb 100644 --- a/src/components/TwoColumnForm.vue +++ b/src/components/TwoColumnForm.vue @@ -181,6 +181,9 @@ let TwoColumnForm = { return this.doc.rename(value); } + this.onChangeCommon(df, value); + }, + onChangeCommon(df, value) { this.doc.set(df.fieldname, value).catch((e) => { // set error message for this field this.$set(this.errors, df.fieldname, getErrorMessage(e, this.doc)); @@ -214,7 +217,7 @@ let TwoColumnForm = { if (!this.doc[df.fieldname]) { this.inlineEditDoc = await frappe.getNewDoc(df.target); this.inlineEditDoc.once('afterInsert', () => { - this.onChange(df, this.inlineEditDoc.name); + this.onChangeCommon(df, this.inlineEditDoc.name); }); } else { this.inlineEditDoc = this.doc.getLink(df.fieldname);