feat: remove check box for batch operation
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index 6925ed1..b17f209 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -578,7 +578,7 @@
for d in self.operations:
if not d.description:
d.description = frappe.db.get_value('Operation', d.operation, 'description')
- if not d.is_batch_operation:
+ if not d.batch_size > 0:
d.batch_size = 1
def get_list_context(context):
diff --git a/erpnext/manufacturing/doctype/bom_operation/bom_operation.json b/erpnext/manufacturing/doctype/bom_operation/bom_operation.json
index 298d097..fcce588 100644
--- a/erpnext/manufacturing/doctype/bom_operation/bom_operation.json
+++ b/erpnext/manufacturing/doctype/bom_operation/bom_operation.json
@@ -11,7 +11,6 @@
"col_break1",
"hour_rate",
"time_in_mins",
- "is_batch_operation",
"batch_size",
"operating_cost",
"base_hour_rate",
@@ -101,14 +100,7 @@
"label": "Image"
},
{
- "default": "0",
- "fieldname": "is_batch_operation",
- "fieldtype": "Check",
- "label": "Is Batch Operation"
- },
- {
"default": "1",
- "depends_on": "eval:doc.is_batch_operation==1;",
"fieldname": "batch_size",
"fieldtype": "Int",
"label": "Batch Size"
@@ -116,8 +108,8 @@
],
"idx": 1,
"istable": 1,
- "modified": "2019-06-29 03:35:32.213562",
- "modified_by": "Administrator",
+ "modified": "2019-07-14 22:35:55.374037",
+ "modified_by": "govindsmenokee@gmail.com",
"module": "Manufacturing",
"name": "BOM Operation",
"owner": "Administrator",
diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py
index 24eb4e6..a3309fe 100644
--- a/erpnext/manufacturing/doctype/work_order/work_order.py
+++ b/erpnext/manufacturing/doctype/work_order/work_order.py
@@ -350,10 +350,7 @@
bom_qty = frappe.db.get_value("BOM", self.bom_no, "quantity")
for d in self.get("operations"):
- if d.is_batch_operation:
- d.time_in_mins = flt(d.time_in_mins) / flt(bom_qty) * math.ceil(flt(self.qty)/flt(d.batch_size))
- else:
- d.time_in_mins = flt(d.time_in_mins) / flt(bom_qty) * flt(self.qty)
+ d.time_in_mins = flt(d.time_in_mins) / flt(bom_qty) * math.ceil(flt(self.qty) / flt(d.batch_size))
self.calculate_operating_cost()