fix: Default dimensions on fetching items from BOM (#33439)
(cherry picked from commit 0b75aa5390)
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
This commit is contained in:
@@ -112,6 +112,10 @@ frappe.ui.form.on('Stock Entry', {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
attach_bom_items(frm.doc.bom_no);
|
attach_bom_items(frm.doc.bom_no);
|
||||||
|
|
||||||
|
if(!check_should_not_attach_bom_items(frm.doc.bom_no)) {
|
||||||
|
erpnext.accounts.dimensions.update_dimension(frm, frm.doctype);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
setup_quality_inspection: function(frm) {
|
setup_quality_inspection: function(frm) {
|
||||||
@@ -326,7 +330,11 @@ frappe.ui.form.on('Stock Entry', {
|
|||||||
}
|
}
|
||||||
|
|
||||||
frm.trigger("setup_quality_inspection");
|
frm.trigger("setup_quality_inspection");
|
||||||
attach_bom_items(frm.doc.bom_no)
|
attach_bom_items(frm.doc.bom_no);
|
||||||
|
|
||||||
|
if(!check_should_not_attach_bom_items(frm.doc.bom_no)) {
|
||||||
|
erpnext.accounts.dimensions.update_dimension(frm, frm.doctype);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
before_save: function(frm) {
|
before_save: function(frm) {
|
||||||
@@ -939,7 +947,10 @@ erpnext.stock.StockEntry = class StockEntry extends erpnext.stock.StockControlle
|
|||||||
method: "get_items",
|
method: "get_items",
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if(!r.exc) refresh_field("items");
|
if(!r.exc) refresh_field("items");
|
||||||
if(me.frm.doc.bom_no) attach_bom_items(me.frm.doc.bom_no)
|
if(me.frm.doc.bom_no) {
|
||||||
|
attach_bom_items(me.frm.doc.bom_no);
|
||||||
|
erpnext.accounts.dimensions.update_dimension(me.frm, me.frm.doctype);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user