mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-18 06:22:12 +00:00
fix: creation of contact, customer, opportunity, quotation and prospect from lead --prettier
(cherry picked from commit 5844897c34)
# Conflicts:
# erpnext/crm/doctype/lead/lead.js
This commit is contained in:
@@ -28,6 +28,7 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller
|
|||||||
erpnext.toggle_naming_series();
|
erpnext.toggle_naming_series();
|
||||||
|
|
||||||
if (!this.frm.is_new() && doc.__onload && !doc.__onload.is_customer) {
|
if (!this.frm.is_new() && doc.__onload && !doc.__onload.is_customer) {
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
this.frm.add_custom_button(__("Customer"), this.make_customer, __("Create"));
|
this.frm.add_custom_button(__("Customer"), this.make_customer, __("Create"));
|
||||||
this.frm.add_custom_button(
|
this.frm.add_custom_button(
|
||||||
@@ -55,12 +56,13 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller
|
|||||||
__("Create")
|
__("Create")
|
||||||
);
|
);
|
||||||
>>>>>>> 8304d19e8b (fix: creation of contact, customer, opportunity, quotation and prospect from lead)
|
>>>>>>> 8304d19e8b (fix: creation of contact, customer, opportunity, quotation and prospect from lead)
|
||||||
|
=======
|
||||||
|
this.frm.add_custom_button(__("Customer"), this.make_customer.bind(this), __("Create"));
|
||||||
|
this.frm.add_custom_button(__("Opportunity"), this.make_opportunity.bind(this), __("Create"));
|
||||||
|
this.frm.add_custom_button(__("Quotation"), this.make_quotation.bind(this), __("Create"));
|
||||||
|
>>>>>>> 5844897c34 (fix: creation of contact, customer, opportunity, quotation and prospect from lead --prettier)
|
||||||
if (!doc.__onload.linked_prospects.length) {
|
if (!doc.__onload.linked_prospects.length) {
|
||||||
this.frm.add_custom_button(
|
this.frm.add_custom_button(__("Prospect"), this.make_prospect.bind(this), __("Create"));
|
||||||
__("Prospect"),
|
|
||||||
this.make_prospect.bind(this),
|
|
||||||
__("Create")
|
|
||||||
);
|
|
||||||
this.frm.add_custom_button(__("Add to Prospect"), this.add_lead_to_prospect, __("Action"));
|
this.frm.add_custom_button(__("Add to Prospect"), this.add_lead_to_prospect, __("Action"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -184,7 +186,7 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller
|
|||||||
const d = new frappe.ui.Dialog({
|
const d = new frappe.ui.Dialog({
|
||||||
title: __("Create Opportunity"),
|
title: __("Create Opportunity"),
|
||||||
fields: fields,
|
fields: fields,
|
||||||
primary_action: function(data) {
|
primary_action: function (data) {
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "create_prospect_and_contact",
|
method: "create_prospect_and_contact",
|
||||||
doc: frm.doc,
|
doc: frm.doc,
|
||||||
@@ -192,7 +194,7 @@ erpnext.LeadController = class LeadController extends frappe.ui.form.Controller
|
|||||||
data: data,
|
data: data,
|
||||||
},
|
},
|
||||||
freeze: true,
|
freeze: true,
|
||||||
callback: function(r) {
|
callback: function (r) {
|
||||||
if (!r.exc) {
|
if (!r.exc) {
|
||||||
frappe.model.open_mapped_doc({
|
frappe.model.open_mapped_doc({
|
||||||
method: "erpnext.crm.doctype.lead.lead.make_opportunity",
|
method: "erpnext.crm.doctype.lead.lead.make_opportunity",
|
||||||
|
|||||||
Reference in New Issue
Block a user