mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
Form
For a new form, if there is an editable name field, then it should be set to blank from auto-generated name
This commit is contained in:
parent
a7ed751d48
commit
a8416dc4fe
@ -63,6 +63,13 @@ export default {
|
||||
this.doc.on('change', () => {
|
||||
this.isDirty = this.doc._dirty;
|
||||
});
|
||||
|
||||
if (this.doc._notInserted && this.meta.fields.map(df => df.fieldname).includes('name')) {
|
||||
// For a user editable name field,
|
||||
// it should be unset since it is autogenerated
|
||||
this.doc.set('name', '');
|
||||
}
|
||||
|
||||
this.docLoaded = true;
|
||||
} catch(e) {
|
||||
this.notFound = true;
|
||||
|
Loading…
Reference in New Issue
Block a user