[FIX] project_timesheet: missing timesheet for tasks without project
authorDhs-odoo <dhs@openerp.com>
Mon, 10 Nov 2014 13:13:43 +0000 (14:13 +0100)
committerMartin Trigaux <mat@odoo.com>
Mon, 10 Nov 2014 13:13:43 +0000 (14:13 +0100)
commitc200ffd74e892492994fa66ac8f38b390bc2b8d9
tree3cb0de06ab302342cdbc23fab6d4de62f12aba9c
parentc6a5be0a195c71c7ded9cc863815d115259abfd9
[FIX] project_timesheet: missing timesheet for tasks without project

Timesheet activities (hr.analytic.timesheet) are generated when a work activity (project.task.work) is logged on a task.
These are updated if the project of the task is modified.
This patch applies the same behaviour for tasks without project, the timesheet activities are generated once a project is set on the task.
To avoid redundency in the code, extract the computation in a distinct method.
Fixes #701, opw 609481
addons/project_timesheet/project_timesheet.py