copyDoc<T extends FrappeDocument> method
Returns a cloned doc, with a new local name.
Implementation
@override
T copyDoc<T extends FrappeDocument>(T doc) {
EmptyDoctypeError.verify(doc.doctype);
final clone = JSONAble.clone<T>(doc);
clone.name = getNewName(doc.doctype!);
clone.docStatus = FrappeDocStatus.Draft;
clone.isLocal = true;
clone.unsaved = true;
addToLocals(clone);
return clone;
}