fix(minor): opportunity_from may not be selected (#19063)

This commit is contained in:
Rushabh Mehta 2019-09-16 14:47:43 +05:30 committed by Nabin Hait
parent a2a9b39794
commit 72dcb51177

View File

@ -18,12 +18,14 @@ frappe.listview_settings['Opportunity'] = {
listview.call_for_selected_items(method, {"status": "Closed"});
});
listview.page.fields_dict.opportunity_from.get_query = function() {
return {
"filters": {
"name": ["in", ["Customer", "Lead"]],
}
if(listview.page.fields_dict.opportunity_from) {
listview.page.fields_dict.opportunity_from.get_query = function() {
return {
"filters": {
"name": ["in", ["Customer", "Lead"]],
}
};
};
};
}
}
};