From a85b68ee77fa553f2a7ca57366922d2110f75bf3 Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Tue, 30 May 2017 15:55:00 +0530 Subject: [PATCH] link for timesheet, fix https://github.com/frappe/erpnext/issues/9042 (#9071) --- .../manufacturing/doctype/production_order/production_order.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/production_order/production_order.py b/erpnext/manufacturing/doctype/production_order/production_order.py index ff1082d0b81..68da3362502 100644 --- a/erpnext/manufacturing/doctype/production_order/production_order.py +++ b/erpnext/manufacturing/doctype/production_order/production_order.py @@ -20,6 +20,7 @@ from erpnext.manufacturing.doctype.manufacturing_settings.manufacturing_settings from erpnext.stock.stock_balance import get_planned_qty, update_bin_qty from erpnext.manufacturing.doctype.bom.bom import get_bom_items_as_dict from erpnext.stock.utils import get_bin +from frappe.utils.csvutils import getlink class OverProductionError(frappe.ValidationError): pass class StockOverProductionError(frappe.ValidationError): pass @@ -311,7 +312,7 @@ class ProductionOrder(Document): if timesheet and timesheet.get("time_logs"): timesheet.save() - timesheets.append(timesheet.name) + timesheets.append(getlink("Timesheet", timesheet.name)) self.planned_end_date = self.operations[-1].planned_end_time if timesheets: