fix: to warehouse not set in the customer warehouse

This commit is contained in:
Rohit Waghchaure 2020-01-27 17:44:39 +05:30
parent 5987eef32a
commit 2dff28498f

View File

@ -92,6 +92,17 @@ frappe.ui.form.on("Delivery Note", {
}, __('Create'));
frm.page.set_inner_btn_group_as_primary(__('Create'));
}
},
to_warehouse: function(frm) {
if(frm.doc.to_warehouse) {
["items", "packed_items"].forEach(doctype => {
frm.doc[doctype].forEach(d => {
frappe.model.set_value(d.doctype, d.name,
"target_warehouse", frm.doc.to_warehouse);
});
});
}
}
});