Skip to content

Commit

Permalink
fix: unchecking the "With Operations" in BOM clears operations table …
Browse files Browse the repository at this point in the history
…(backport #28446) (#28447)

* fix: unchecking the "With Operations" in BOM clears operations table #28446

(cherry picked from commit 488d34a)

# Conflicts:
#	erpnext/manufacturing/doctype/bom/bom.js

* fix: resolve conflict

Co-authored-by: Sagar Sharma <63660334+s-aga-r@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
  • Loading branch information
3 people committed Nov 18, 2021
1 parent 3359c54 commit a60c648
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 0 additions & 5 deletions erpnext/manufacturing/doctype/bom/bom.js
Original file line number Diff line number Diff line change
Expand Up @@ -680,11 +680,6 @@ frappe.ui.form.on("BOM Item", "items_remove", function(frm) {
erpnext.bom.calculate_total(frm.doc);
});

frappe.ui.form.on("BOM", "with_operations", function(frm) {
if(!cint(frm.doc.with_operations)) {
frm.set_value("operations", []);
}
});

frappe.ui.form.on("BOM Scrap Item", {
item_code(frm, cdt, cdn) {
Expand Down
3 changes: 2 additions & 1 deletion erpnext/manufacturing/doctype/bom/bom.json
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@
"options": "Price List"
},
{
"depends_on": "with_operations",
"fieldname": "operations_section",
"fieldtype": "Section Break",
"hide_border": 1,
Expand Down Expand Up @@ -539,7 +540,7 @@
"image_field": "image",
"is_submittable": 1,
"links": [],
"modified": "2021-10-27 14:52:04.500251",
"modified": "2021-11-18 13:04:16.271975",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "BOM",
Expand Down

0 comments on commit a60c648

Please sign in to comment.