Track Operations removed and Global Switch added to disable capacity planning in manufacturing settings

This commit is contained in:
Neil Trini Lasrado
2015-07-21 18:11:43 +05:30
parent 75ebed815f
commit 2771b7d828
7 changed files with 18 additions and 45 deletions

View File

@@ -201,9 +201,7 @@ class StockEntry(StockController):
def check_if_operations_completed(self):
"""Check if Time Logs are completed against before manufacturing to capture operating costs."""
prod_order = frappe.get_doc("Production Order", self.production_order)
if not prod_order.track_operations:
return
for d in prod_order.get("operations"):
total_completed_qty = flt(self.fg_completed_qty) + flt(prod_order.produced_qty)
if total_completed_qty > flt(d.completed_qty):