fix: quotation link in the lead dashboard not working and filter from the dashboard was not applying
This commit is contained in:
@@ -4,6 +4,10 @@ from frappe import _
|
||||
def get_data():
|
||||
return {
|
||||
'fieldname': 'lead',
|
||||
'non_standard_fieldnames': {
|
||||
'Quotation': 'party_name',
|
||||
'Opportunity': 'party_name'
|
||||
},
|
||||
'transactions': [
|
||||
{
|
||||
'items': ['Opportunity', 'Quotation']
|
||||
|
||||
@@ -8,9 +8,10 @@ erpnext.utils.get_party_details = function(frm, method, args, callback) {
|
||||
method = "erpnext.accounts.party.get_party_details";
|
||||
}
|
||||
if(!args) {
|
||||
if(frm.doctype != "Purchase Order" && frm.doc.customer) {
|
||||
if((frm.doctype != "Purchase Order" && frm.doc.customer)
|
||||
|| (frm.doc.party_name && in_list(['Quotation', 'Opportunity'], frm.doc.doctype))) {
|
||||
args = {
|
||||
party: frm.doc.customer,
|
||||
party: frm.doc.customer || frm.doc.party_name,
|
||||
party_type: "Customer",
|
||||
price_list: frm.doc.selling_price_list
|
||||
};
|
||||
|
||||
@@ -42,6 +42,12 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
|
||||
this._super(doc, dt, dn);
|
||||
|
||||
},
|
||||
party_name: function() {
|
||||
var me = this;
|
||||
erpnext.utils.get_party_details(this.frm, null, null, function() {
|
||||
me.apply_price_list();
|
||||
});
|
||||
},
|
||||
refresh: function(doc, dt, dn) {
|
||||
this._super(doc, dt, dn);
|
||||
doctype = doc.quotation_to == 'Customer' ? 'Customer':'Lead';
|
||||
|
||||
@@ -169,8 +169,8 @@
|
||||
"in_filter": 0,
|
||||
"in_global_search": 1,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 1,
|
||||
"label": "Customer/Lead",
|
||||
"in_standard_filter": 0,
|
||||
"label": "Party",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "customer",
|
||||
@@ -3224,7 +3224,7 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 1,
|
||||
"menu_index": 0,
|
||||
"modified": "2019-05-07 12:42:51.125194",
|
||||
"modified": "2019-05-07 14:29:22.565474",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Selling",
|
||||
"name": "Quotation",
|
||||
|
||||
Reference in New Issue
Block a user