From d6170d762cda172a8887d474f65b3e3bb737d631 Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:07:10 +0530 Subject: [PATCH] refactor: homepage js (#222) (cherry picked from commit d77ae22ddeb33bd682262e7cbe7b92c16978aa71) --- webshop/public/js/override/homepage.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webshop/public/js/override/homepage.js b/webshop/public/js/override/homepage.js index 47407347e0..2f8734c934 100644 --- a/webshop/public/js/override/homepage.js +++ b/webshop/public/js/override/homepage.js @@ -1,10 +1,10 @@ frappe.ui.form.on('Homepage', { setup: function(frm) { - frm.fields_dict['products'].grid.get_field('item_code').get_query = function() { + frm.set_query('item_code', 'products', function() { return { filters: {'published': 1} - } - } + }; + }); }, });