diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py index 301dc825e0d..be857b5580a 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.py +++ b/erpnext/crm/doctype/opportunity/opportunity.py @@ -245,3 +245,13 @@ def set_multiple_status(names, status): opp = frappe.get_doc("Opportunity", name) opp.status = status opp.save() + +def auto_close_opportunity(): + """ auto close the `Replied` Opportunities after 7 days """ + opportunities = frappe.db.sql(""" select name from tabOpportunity where status='Replied' and + modifiedmodified") \ No newline at end of file diff --git a/erpnext/public/js/utils/party.js b/erpnext/public/js/utils/party.js index a1d200f6efa..35d0b4203fe 100644 --- a/erpnext/public/js/utils/party.js +++ b/erpnext/public/js/utils/party.js @@ -129,7 +129,7 @@ erpnext.utils.get_contact_details = function(frm) { if(frm.doc["contact_person"]) { frappe.call({ - method: "erpnext.utilities.doctype.contact.contact.get_contact_details", + method: "frappe.email.doctype.contact.contact.get_contact_details", args: {contact: frm.doc.contact_person }, callback: function(r) { if(r.message)