mirror of
https://github.com/frappe/books.git
synced 2025-02-02 20:18:26 +00:00
fix: prevent cancelled editable
This commit is contained in:
parent
d92641f181
commit
18d3bbf959
@ -184,14 +184,6 @@ export default {
|
||||
);
|
||||
},
|
||||
evaluateReadOnly(df) {
|
||||
if (df.fieldname === 'numberSeries' && !this.doc.notInserted) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this.submitted || this.doc.parentdoc?.isSubmitted) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return evaluateReadOnly(df, this.doc);
|
||||
},
|
||||
async onChange(df, value) {
|
||||
@ -317,9 +309,6 @@ export default {
|
||||
'grid-template-columns': templateColumns,
|
||||
};
|
||||
},
|
||||
submitted() {
|
||||
return this.doc.isSubmitted;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -6,6 +6,18 @@ export function evaluateReadOnly(field: Field, doc: Doc) {
|
||||
return field.readOnly;
|
||||
}
|
||||
|
||||
if (field.fieldname === 'numberSeries' && !doc.notInserted) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (doc.isSubmitted || doc.parentdoc?.isSubmitted) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (doc.isCancelled || doc.parentdoc?.isCancelled) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const readOnlyFunc = doc.readOnly[field.fieldname];
|
||||
if (readOnlyFunc !== undefined) {
|
||||
return readOnlyFunc();
|
||||
|
Loading…
x
Reference in New Issue
Block a user