[fix] create_new without metadata

This commit is contained in:
Rushabh Mehta 2016-05-20 12:54:21 +05:30
parent 0130d721c1
commit 0d5003546c

View file

@ -111,7 +111,8 @@ $.extend(frappe.model, {
},
create_mandatory_children: function(doc) {
if(frappe.get_meta(doc.doctype).istable) return;
var meta = frappe.get_meta(doc.doctype);
if(meta && meta.istable) return;
// create empty rows for mandatory table fields
frappe.meta.docfield_list[doc.doctype].forEach(function(df) {