fix: bind this to function

(cherry picked from commit 41649cf52d)
This commit is contained in:
Mihir Kandoi
2025-01-30 17:29:31 +05:30
committed by Mergify
parent 83e676f128
commit c0b32c446b

View File

@@ -367,7 +367,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"));
}