From 3c58fd4d5e3384482cbca1c82a270397a00eb688 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 13 Apr 2021 12:05:10 +0530 Subject: [PATCH] fix(minor): fix dynamically changing grid properties --- erpnext/accounts/doctype/bank/bank.js | 4 +++- .../doctype/payment_reconciliation/payment_reconciliation.js | 2 +- erpnext/accounts/doctype/pos_settings/pos_settings.js | 4 +--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/bank/bank.js b/erpnext/accounts/doctype/bank/bank.js index 8c0abc2447..059e1d3158 100644 --- a/erpnext/accounts/doctype/bank/bank.js +++ b/erpnext/accounts/doctype/bank/bank.js @@ -42,7 +42,9 @@ let add_fields_to_mapping_table = function (frm) { }); }); - frm.fields_dict.bank_transaction_mapping.grid.update_docfield_property('frm.fields_dict.bank_transaction_mapping.grid', 'options', options); + frm.fields_dict.bank_transaction_mapping.grid.update_docfield_property( + 'bank_transaction_field', 'options', options + ); }; erpnext.integrations.refreshPlaidLink = class refreshPlaidLink { diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js index b693863fb2..a27659b8f7 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js @@ -235,7 +235,7 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext if (invoices) { this.frm.fields_dict.payment.grid.update_docfield_property( - 'invoice_number', options, "\n" + invoices.join("\n") + 'invoice_number', 'options', "\n" + invoices.join("\n") ) $.each(me.frm.doc.payments || [], function(i, p) { diff --git a/erpnext/accounts/doctype/pos_settings/pos_settings.js b/erpnext/accounts/doctype/pos_settings/pos_settings.js index 4037a927fa..3625393a80 100644 --- a/erpnext/accounts/doctype/pos_settings/pos_settings.js +++ b/erpnext/accounts/doctype/pos_settings/pos_settings.js @@ -17,9 +17,7 @@ frappe.ui.form.on('POS Settings', { }); frm.fields_dict.invoice_fields.grid.update_docfield_property( - 'fieldname', - 'options', - [""].concat(fields) + 'fieldname', 'options', [""].concat(fields) ); });