From c58fefb35947fbd4be9b9e40e7321160155fbe23 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 26 Oct 2023 13:12:44 +0530 Subject: [PATCH] feat(delivery): link to delivery notes list view from delivery trip (backport #37604) (#37695) feat(delivery): link to delivery notes list view from delivery trip (cherry picked from commit 85488cd0dcac2efe02478ced44349a0cadb3b064) Co-authored-by: David Arnold --- erpnext/stock/doctype/delivery_trip/delivery_trip.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/stock/doctype/delivery_trip/delivery_trip.js b/erpnext/stock/doctype/delivery_trip/delivery_trip.js index 45064d8fcb96..4ba5b32ca62c 100755 --- a/erpnext/stock/doctype/delivery_trip/delivery_trip.js +++ b/erpnext/stock/doctype/delivery_trip/delivery_trip.js @@ -64,6 +64,11 @@ frappe.ui.form.on('Delivery Trip', { }) }, __("Get stops from")); } + frm.add_custom_button(__("Delivery Notes"), function () { + frappe.set_route("List", "Delivery Note", + {'name': ["in", frm.doc.delivery_stops.map((stop) => {return stop.delivery_note;})]} + ); + }, __("View")); }, calculate_arrival_time: function (frm) {