fix: work order created message pops up if no items are selected (backport #41677) (#41682)

fix: work order created message pops up if no items are selected (#41677)

(cherry picked from commit 388ba7f945)

Co-authored-by: Nijith anil <83776819+nijithanil@users.noreply.github.com>
This commit is contained in:
mergify[bot]
2024-05-30 18:51:26 +05:30
committed by GitHub
parent 24775db97e
commit 4e9faf6ad6

View File

@@ -867,6 +867,9 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex
fields: fields,
primary_action: function () {
var data = { items: d.fields_dict.items.grid.get_selected_children() };
if (!data) {
frappe.throw(__("Please select items"));
}
me.frm.call({
method: "make_work_orders",
args: {