2
0
mirror of https://github.com/frappe/books.git synced 2025-01-12 19:06:38 +00:00

fix: Set name as randomString in getNewDoc

This commit is contained in:
Faris Ansari 2019-12-02 17:51:18 +05:30
parent 16ad083426
commit cf1e38f59b

View File

@ -214,7 +214,7 @@ module.exports = {
async getNewDoc(doctype) {
let doc = this.newDoc({ doctype: doctype });
doc._notInserted = true;
await doc.setName();
doc.name = frappe.getRandomString();
this.addToCache(doc);
return doc;
},