[fix] Opportunity loading issue

This commit is contained in:
Nabin Hait 2016-11-14 12:32:00 +05:30
parent 0075c7e659
commit a5a733630f

View File

@ -60,9 +60,10 @@ erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({
this.frm.doc.enquiry_from = "Lead"; this.frm.doc.enquiry_from = "Lead";
if(!this.frm.doc.status) if(!this.frm.doc.status)
set_multiple(cdt, cdn, { status:'Draft' }); set_multiple(this.frm.doc.doctype, this.frm.doc.name, { status:'Open' });
if(!this.frm.doc.company && frappe.defaults.get_user_default("Company")) if(!this.frm.doc.company && frappe.defaults.get_user_default("Company"))
set_multiple(cdt, cdn, { company:frappe.defaults.get_user_default("Company") }); set_multiple(this.frm.doc.doctype, this.frm.doc.name,
{ company:frappe.defaults.get_user_default("Company") });
this.setup_queries(); this.setup_queries();
}, },