mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
fix: Patch to move customer and lead
This commit is contained in:
@@ -589,4 +589,5 @@ erpnext.patches.v11_0.remove_barcodes_field_from_copy_fields_to_variants
|
|||||||
erpnext.patches.v10_0.item_barcode_childtable_migrate # 16-02-2019
|
erpnext.patches.v10_0.item_barcode_childtable_migrate # 16-02-2019
|
||||||
erpnext.patches.v11_0.make_italian_localization_fields # 26-03-2019
|
erpnext.patches.v11_0.make_italian_localization_fields # 26-03-2019
|
||||||
erpnext.patches.v11_1.make_job_card_time_logs
|
erpnext.patches.v11_1.make_job_card_time_logs
|
||||||
erpnext.patches.v11_1.set_variant_based_on
|
erpnext.patches.v11_1.set_variant_based_on
|
||||||
|
erpnext.patches.v11_1.move_customer_lead_to_dynamic_column
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
|
||||||
|
frappe.db.dql(""" UPDATE `tabQuotation` set customer_lead = lead WHERE quotation_to = 'Lead' """)
|
||||||
|
frappe.db.dql(""" UPDATE `tabQuotation` set customer_lead = customer WHERE quotation_to = 'Customer' """)
|
||||||
@@ -39,16 +39,10 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
|
|||||||
onload: function(doc, dt, dn) {
|
onload: function(doc, dt, dn) {
|
||||||
var me = this;
|
var me = this;
|
||||||
this._super(doc, dt, dn);
|
this._super(doc, dt, dn);
|
||||||
// if(doc.customer && !doc.quotation_to)
|
|
||||||
// doc.quotation_to = "Customer";
|
|
||||||
// else if(doc.lead && !doc.quotation_to)
|
|
||||||
// doc.quotation_to = "Lead";
|
|
||||||
|
|
||||||
},
|
},
|
||||||
refresh: function(doc, dt, dn) {
|
refresh: function(doc, dt, dn) {
|
||||||
this._super(doc, dt, dn);
|
this._super(doc, dt, dn);
|
||||||
// doctype = doc.quotation_to == 'Customer' ? 'Customer':'Lead';
|
|
||||||
// frappe.dynamic_link = {doc: this.frm.doc, fieldname: doctype.toLowerCase(), doctype: doctype}
|
|
||||||
|
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
@@ -129,6 +123,7 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
|
|||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
// to overwrite the customer_filter trigger from queries.js
|
// to overwrite the customer_filter trigger from queries.js
|
||||||
|
this.frm.toggle_reqd("customer_lead", this.frm.doc.quotation_to);
|
||||||
this.frm.set_query('customer_address', erpnext.queries.address_query);
|
this.frm.set_query('customer_address', erpnext.queries.address_query);
|
||||||
this.frm.set_query('shipping_address_name', erpnext.queries.address_query);
|
this.frm.set_query('shipping_address_name', erpnext.queries.address_query);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -182,7 +182,7 @@
|
|||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 0,
|
||||||
"search_index": 1,
|
"search_index": 1,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
@@ -3224,7 +3224,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 1,
|
"max_attachments": 1,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2019-04-01 17:21:09.462834",
|
"modified": "2019-04-02 10:06:27.850280",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Quotation",
|
"name": "Quotation",
|
||||||
|
|||||||
Reference in New Issue
Block a user