refactor: remove extraneous disabled filters (backport #37732) (#37748)

* refactor: remove extraneous disabled filters

(cherry picked from commit f276fbba4f)

# Conflicts:
#	erpnext/accounts/report/profitability_analysis/profitability_analysis.js
#	erpnext/public/js/controllers/accounts.js

* chore: `conflicts`

---------

Co-authored-by: Bernd Oliver Sünderhauf <46800703+bosue@users.noreply.github.com>
Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
This commit is contained in:
mergify[bot]
2023-10-30 10:10:16 +05:30
committed by GitHub
parent fabcfc1fce
commit b605b08ec1
8 changed files with 1 additions and 30 deletions

View File

@@ -33,13 +33,6 @@ frappe.require("assets/erpnext/js/financial_statements.js", function() {
"label": __("Accounting Dimension"), "label": __("Accounting Dimension"),
"fieldtype": "Link", "fieldtype": "Link",
"options": "Accounting Dimension", "options": "Accounting Dimension",
"get_query": () =>{
return {
filters: {
"disabled": 0
}
}
}
}, },
{ {
"fieldname": "fiscal_year", "fieldname": "fiscal_year",

View File

@@ -9,7 +9,6 @@ frappe.ui.form.on('Asset', {
frm.set_query("item_code", function() { frm.set_query("item_code", function() {
return { return {
"filters": { "filters": {
"disabled": 0,
"is_fixed_asset": 1, "is_fixed_asset": 1,
"is_stock_item": 0 "is_stock_item": 0
} }

View File

@@ -44,11 +44,6 @@ frappe.query_reports["Supplier Quotation Comparison"] = {
} }
} }
} }
else {
return {
filters: { "disabled": 0 }
}
}
} }
}, },
{ {

View File

@@ -12,7 +12,7 @@ frappe.query_reports["BOM Operations Time"] = {
"options": "Item", "options": "Item",
"get_query": () =>{ "get_query": () =>{
return { return {
filters: { "disabled": 0, "is_stock_item": 1 } filters: { "is_stock_item": 1 }
} }
} }
}, },

View File

@@ -28,7 +28,6 @@ frappe.ui.form.on(cur_frm.doctype, {
filters: { filters: {
"account_type": account_type, "account_type": account_type,
"company": doc.company, "company": doc.company,
"disabled": 0
} }
} }
}); });

View File

@@ -6,7 +6,6 @@ frappe.ui.form.on("Item Price", {
frm.set_query("item_code", function() { frm.set_query("item_code", function() {
return { return {
filters: { filters: {
"disabled": 0,
"has_variants": 0 "has_variants": 0
} }
}; };

View File

@@ -95,13 +95,6 @@ frappe.ui.form.on("Stock Reconciliation", {
fieldname: "item_code", fieldname: "item_code",
fieldtype: "Link", fieldtype: "Link",
options: "Item", options: "Item",
"get_query": function() {
return {
"filters": {
"disabled": 0,
}
};
}
}, },
{ {
label: __("Ignore Empty Stock"), label: __("Ignore Empty Stock"),

View File

@@ -1,13 +1,6 @@
frappe.ui.form.on("Issue", { frappe.ui.form.on("Issue", {
onload: function(frm) { onload: function(frm) {
frm.email_field = "raised_by"; frm.email_field = "raised_by";
frm.set_query("customer", function () {
return {
filters: {
"disabled": 0
}
};
});
frappe.db.get_value("Support Settings", {name: "Support Settings"}, frappe.db.get_value("Support Settings", {name: "Support Settings"},
["allow_resetting_service_level_agreement", "track_service_level_agreement"], (r) => { ["allow_resetting_service_level_agreement", "track_service_level_agreement"], (r) => {