From 040e599e99ba7d4170aa2f0d8f86e09518c99f84 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 4 Mar 2013 15:47:42 +0530 Subject: [PATCH] fixed to timesheet patch --- patches/february_2013/p09_timesheets.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/patches/february_2013/p09_timesheets.py b/patches/february_2013/p09_timesheets.py index 9a9d42011ca..3378793cd07 100644 --- a/patches/february_2013/p09_timesheets.py +++ b/patches/february_2013/p09_timesheets.py @@ -10,7 +10,7 @@ def execute(): if not webnotes.conn.exists("Task", tsd.task_id): tsd.task_id = None - tl = webnotes.doc({ + tl = webnotes.bean({ "doctype": "Time Log", "status": "Draft", "from_time": ts.doc.timesheet_date + " " + tsd.act_start_time, @@ -22,4 +22,7 @@ def execute(): "file_list": ts.doc.file_list, "_user_tags": ts.doc._user_tags }) - tl.insert() \ No newline at end of file + tl.make_obj() + tl.controller.set_status() + tl.controller.calculate_total_hours() + tl.doc.insert()