[production order] explict idx + test fix
This commit is contained in:
parent
99a41952a4
commit
750ceedbc1
@ -174,7 +174,7 @@ class ProductionOrder(Document):
|
||||
|
||||
self.set('operations', [])
|
||||
|
||||
operations = frappe.db.sql("""select operation, description, workstation,
|
||||
operations = frappe.db.sql("""select operation, description, workstation, idx,
|
||||
hour_rate, time_in_mins, operating_cost as "planned_operating_cost", "Pending" as status
|
||||
from `tabBOM Operation` where parent = %s order by idx""", self.bom_no, as_dict=1)
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import unittest
|
||||
import frappe
|
||||
from frappe.utils import flt, get_datetime, cstr, time_diff_in_hours
|
||||
from frappe.utils import flt, get_datetime, time_diff_in_hours
|
||||
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import set_perpetual_inventory
|
||||
from erpnext.manufacturing.doctype.production_order.production_order import make_stock_entry, make_time_log
|
||||
from erpnext.stock.doctype.stock_entry import test_stock_entry
|
||||
@ -78,7 +78,7 @@ class TestProductionOrder(unittest.TestCase):
|
||||
|
||||
d.completed_qty = flt(d.completed_qty)
|
||||
|
||||
time_log = make_time_log(prod_order.name, cstr(d.idx) + ". " + d.operation, \
|
||||
time_log = make_time_log(prod_order.name, d.operation, \
|
||||
d.planned_start_time, d.planned_end_time, prod_order.qty - d.completed_qty,
|
||||
operation_id=d.name)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user