Merge pull request #20445 from rohitwaghchaure/copy_to_warehouse_to_target_warehouse_in_delivery_note_item

fix: to warehouse not set in the customer warehouse
This commit is contained in:
rohitwaghchaure 2020-01-27 19:29:19 +05:30 committed by GitHub
commit 7fda3a12cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);
});
});
}
}
});