fix: set item uom as stock_uom if it isn't set (#27623)

* fix: set item uom as stock_uom if it isn't set
This commit is contained in:
Alan 2021-10-04 22:38:04 +05:30 committed by GitHub
parent 4159361d52
commit 5c372202d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -323,6 +323,12 @@ frappe.ui.form.on('Stock Entry', {
attach_bom_items(frm.doc.bom_no)
},
before_save: function(frm) {
frm.doc.items.forEach((item) => {
item.uom = item.uom || item.stock_uom;
})
},
stock_entry_type: function(frm){
frm.remove_custom_button('Bill of Materials', "Get Items From");
frm.events.show_bom_custom_button(frm);