Merge pull request #41870 from frappe/mergify/bp/version-15-hotfix/pr-41867

fix: download materials request plan in PP (backport #41867)
This commit is contained in:
rohitwaghchaure
2024-06-12 15:22:33 +05:30
committed by GitHub

View File

@@ -400,13 +400,19 @@ frappe.ui.form.on("Production Plan", {
}, },
download_materials_required(frm) { download_materials_required(frm) {
const warehouses_data = [
{
warehouse: frm.doc.for_warehouse,
},
];
const fields = [ const fields = [
{ {
fieldname: "warehouses", fieldname: "warehouses",
fieldtype: "Table MultiSelect", fieldtype: "Table MultiSelect",
label: __("Warehouses"), label: __("Warehouses"),
default: frm.doc.from_warehouse, default: warehouses_data,
options: "Production Plan Material Request Warehouse", options: "Production Plan Material Request Warehouse",
reqd: 1,
get_query: function () { get_query: function () {
return { return {
filters: { filters: {