From 8b99f43c6158d4edbbdb7d69f2a5ac965b00403c Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 16 May 2022 12:14:07 +0530 Subject: [PATCH] fix: hide template items from sales/purchase order (cherry picked from commit 0e875f504928771b69c694a570abac667f6a8aaa) --- erpnext/public/js/controllers/buying.js | 2 +- erpnext/selling/sales_common.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/controllers/buying.js b/erpnext/public/js/controllers/buying.js index 93169d972e4..bf868e3a406 100644 --- a/erpnext/public/js/controllers/buying.js +++ b/erpnext/public/js/controllers/buying.js @@ -90,7 +90,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({ else { return{ query: "erpnext.controllers.queries.item_query", - filters: { 'supplier': me.frm.doc.supplier, 'is_purchase_item': 1 } + filters: { 'supplier': me.frm.doc.supplier, 'is_purchase_item': 1, 'has_variants': 0} } } }); diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js index 8ef71ca86a1..06537a74516 100644 --- a/erpnext/selling/sales_common.js +++ b/erpnext/selling/sales_common.js @@ -64,7 +64,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ this.frm.set_query("item_code", "items", function() { return { query: "erpnext.controllers.queries.item_query", - filters: {'is_sales_item': 1, 'customer': cur_frm.doc.customer} + filters: {'is_sales_item': 1, 'customer': cur_frm.doc.customer, 'has_variants': 0} } }); }