fix: dont reset UOM in MR on every get_item_detail call (#30164) (#30165)

(cherry picked from commit 4126455975)

Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
mergify[bot]
2022-03-10 15:44:25 +05:30
committed by GitHub
parent e89c181179
commit a5b25db880

View File

@@ -214,6 +214,7 @@ frappe.ui.form.on('Material Request', {
material_request_type: frm.doc.material_request_type,
plc_conversion_rate: 1,
rate: item.rate,
uom: item.uom,
conversion_factor: item.conversion_factor
},
overwrite_warehouse: overwrite_warehouse
@@ -392,6 +393,7 @@ frappe.ui.form.on("Material Request Item", {
item_code: function(frm, doctype, name) {
const item = locals[doctype][name];
item.rate = 0;
item.uom = '';
set_schedule_date(frm);
frm.events.get_item_data(frm, item, true);
},