fix: checkbox triggers get_items and sub_assembly buttons (#28558)

This commit is contained in:
Noah Jacob 2021-11-26 11:53:35 +05:30 committed by GitHub
parent 87f2dcfb59
commit 73bfd59846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -238,6 +238,12 @@ frappe.ui.form.on('Production Plan', {
method: "get_items",
freeze: true,
doc: frm.doc,
callback: function() {
frm.refresh_field("po_items");
if (frm.doc.sub_assembly_items.length > 0) {
frm.trigger("get_sub_assembly_items");
}
}
});
},