brotherton-erpnext/erpnext/patches/v5_0/update_time_log_title.py

13 lines
416 B
Python
Raw Normal View History

2015-03-04 06:38:28 +00:00
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and Contributors
2015-03-02 07:31:39 +00:00
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doctype("Time Log")
for d in frappe.get_all("Time Log"):
time_log = frappe.get_doc("Time Log", d.name)
time_log.set_title()
frappe.db.set_value("Time Log", time_log.name, "title", time_log.title)