Merge pull request #25531 from noahjacob/fix_mr_filter

fix: updated item filters for material request
This commit is contained in:
rohitwaghchaure 2021-05-03 18:36:25 +05:30 committed by GitHub
commit 1f4df80565
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -433,13 +433,21 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
if (doc.material_request_type == "Customer Provided") {
return{
query: "erpnext.controllers.queries.item_query",
filters:{ 'customer': me.frm.doc.customer }
filters:{
'customer': me.frm.doc.customer,
'is_stock_item':1
}
}
} else if (doc.material_request_type != "Manufacture") {
} else if (doc.material_request_type == "Purchase") {
return{
query: "erpnext.controllers.queries.item_query",
filters: {'is_purchase_item': 1}
}
} else {
return{
query: "erpnext.controllers.queries.item_query",
filters: {'is_stock_item': 1}
}
}
});
},