From ceb45b58b7ee28bb6f330ab579b3d9c7599f9776 Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Mon, 4 Apr 2022 14:09:15 +0530 Subject: [PATCH] fix: set numberSeries as readOnly after insert --- frappe/model/document.js | 4 ++++ src/components/TwoColumnForm.vue | 10 +++++++--- src/pages/InvoiceForm.vue | 12 ++++++------ src/pages/JournalEntryForm.vue | 2 +- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/frappe/model/document.js b/frappe/model/document.js index 93a262a0..d91f983d 100644 --- a/frappe/model/document.js +++ b/frappe/model/document.js @@ -69,6 +69,10 @@ export default class Document extends Observable { return; } + if (fieldname === 'numberSeries' && !this._notInserted) { + return; + } + if (this[fieldname] !== value) { this._dirty = true; // if child is dirty, parent is dirty too diff --git a/src/components/TwoColumnForm.vue b/src/components/TwoColumnForm.vue index ff29ae5b..4a71558e 100644 --- a/src/components/TwoColumnForm.vue +++ b/src/components/TwoColumnForm.vue @@ -86,10 +86,10 @@