From 5f82a5387d075eca1f190332e627315f72c2d776 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 6 Jul 2016 15:34:53 +0530 Subject: [PATCH] Query for warehouse and editable fields in grid --- .../stock_reconciliation/stock_reconciliation.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js index ead110ca74..61e36e62ec 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js @@ -15,6 +15,12 @@ frappe.ui.form.on("Stock Reconciliation", { } } }); + + if (frm.doc.company) { + erpnext.queries.setup_queries(frm, "Warehouse", function() { + return erpnext.queries.warehouse(frm.doc); + }); + } }, refresh: function(frm) { @@ -132,6 +138,13 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({ } } } + + this.frm.get_field('items').grid.editable_fields = [ + {fieldname: 'item_code', columns: 3}, + {fieldname: 'warehouse', columns: 3}, + {fieldname: 'qty', columns: 2}, + {fieldname: 'valuation_rate', columns: 3} + ]; }, refresh: function() {