Merge pull request #17575 from deepeshgarg007/quotation-filter-fixes

fix: Standard filter and dashboard fixes in quotation and opportunity
This commit is contained in:
Deepesh Garg
2019-05-14 15:10:41 +05:30
committed by GitHub
6 changed files with 30 additions and 5 deletions

View File

@@ -8,6 +8,9 @@ def get_data():
'Quotation': 'party_name',
'Opportunity': 'party_name'
},
'dynamic_links': {
'party_name': ['Lead', 'quotation_to']
},
'transactions': [
{
'items': ['Opportunity', 'Quotation']

View File

@@ -136,7 +136,7 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Customer/Lead",
"label": "Party",
"length": 0,
"no_copy": 0,
"oldfieldname": "customer",
@@ -1468,7 +1468,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2019-04-25 18:55:43.874656",
"modified": "2019-05-11 19:22:33.533487",
"modified_by": "Administrator",
"module": "CRM",
"name": "Opportunity",

View File

@@ -17,5 +17,13 @@ frappe.listview_settings['Opportunity'] = {
listview.page.add_menu_item(__("Set as Closed"), function() {
listview.call_for_selected_items(method, {"status": "Closed"});
});
listview.page.fields_dict.opportunity_from.get_query = function() {
return {
"filters": {
"name": ["in", ["Customer", "Lead"]],
}
};
};
}
};

View File

@@ -10,6 +10,9 @@ def get_data():
'Quotation': 'party_name',
'Opportunity': 'party_name'
},
'dynamic_links': {
'party_name': ['Customer', 'quotation_to']
},
'transactions': [
{
'label': _('Pre Sales'),

View File

@@ -133,7 +133,7 @@
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"in_standard_filter": 1,
"label": "Quotation To",
"length": 0,
"no_copy": 0,
@@ -169,7 +169,7 @@
"in_filter": 0,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"in_standard_filter": 1,
"label": "Party",
"length": 0,
"no_copy": 0,
@@ -3224,7 +3224,7 @@
"istable": 0,
"max_attachments": 1,
"menu_index": 0,
"modified": "2019-05-07 14:29:22.565474",
"modified": "2019-05-11 19:26:50.735628",
"modified_by": "Administrator",
"module": "Selling",
"name": "Quotation",

View File

@@ -1,6 +1,17 @@
frappe.listview_settings['Quotation'] = {
add_fields: ["customer_name", "base_grand_total", "status",
"company", "currency", 'valid_till'],
onload: function(listview) {
listview.page.fields_dict.quotation_to.get_query = function() {
return {
"filters": {
"name": ["in", ["Customer", "Lead"]],
}
};
};
},
get_indicator: function(doc) {
if(doc.status==="Submitted") {
if (doc.valid_till && doc.valid_till < frappe.datetime.nowdate()) {