From 1e12f2764e09ec5c90f8d8add2637097148cd7e0 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 30 Jan 2025 17:29:31 +0530 Subject: [PATCH] fix: bind this to function --- erpnext/buying/doctype/purchase_order/purchase_order.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index 33c41c5bf4e..ac3547a4c9c 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -366,7 +366,11 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends ( } if (is_drop_ship && doc.status != "Delivered") { - this.frm.add_custom_button(__("Delivered"), this.delivered_by_supplier, __("Status")); + this.frm.add_custom_button( + __("Delivered"), + this.delivered_by_supplier.bind(this), + __("Status") + ); this.frm.page.set_inner_btn_group_as_primary(__("Status")); } -- GitLab