diff --git a/erpnext/patches/v7_0/convert_timelogbatch_to_timesheet.py b/erpnext/patches/v7_0/convert_timelogbatch_to_timesheet.py index 41364cabec..83c738ef07 100644 --- a/erpnext/patches/v7_0/convert_timelogbatch_to_timesheet.py +++ b/erpnext/patches/v7_0/convert_timelogbatch_to_timesheet.py @@ -6,7 +6,6 @@ def execute(): return from erpnext.manufacturing.doctype.work_order.work_order import add_timesheet_detail - from erpnext.patches.v7_0.convert_timelog_to_timesheet import get_timelog_data for tlb in frappe.get_all('Time Log Batch', fields=["*"], filters = [["docstatus", "<", "2"]]): @@ -25,6 +24,8 @@ def execute(): time_sheet.save(ignore_permissions=True) def get_timesheet_data(data): + from erpnext.patches.v7_0.convert_timelog_to_timesheet import get_timelog_data + time_log = frappe.get_all('Time Log', fields=["*"], filters = {'name': data.time_log}) if time_log: return get_timelog_data(time_log[0]) \ No newline at end of file diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index 8d2744becc..98f1ce148f 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -383,7 +383,7 @@ class TestPurchaseReceipt(unittest.TestCase): 'location_name': 'Test Location' }).insert() - set_perpetual_inventory(1, pr.company) + set_perpetual_inventory(1, "_Test Company") pr = make_purchase_receipt() stock_in_hand_account = get_inventory_account(pr.company, pr.get("items")[0].warehouse)