2 I set task work entry for Employee
4 !record {model: project.task.work, id: project_task_work1}:
5 date: !eval time.strftime('%Y-%m-%d %H:%M:%S')
6 name: Test Timesheet records
7 task_id: project.project_task_10
9 user_id: base.user_demo
10 company_id: base.main_company
12 I check Timesheet line for employee in current Timesheet
14 !python {model: hr.analytic.timesheet}: |
16 start = (datetime.date.today().strftime('%Y-%m-%d'))
17 task_work = self.search(cr, uid, [("name","=","Social network integration: Test Timesheet records")],context)[0]
18 task_ids = self.browse(cr, uid, task_work, context)
19 assert task_ids.user_id.id == ref("base.user_demo"), 'Error, The User in Timesheet is not Correct'
20 assert task_ids.date == start, 'Error, The Date in Timesheet is not ok'
21 assert task_ids.product_uom_id.name == "Hour(s)", 'Error, The Hour in Timesheet is not ok'