A few explainations about the bug and the fix : the field ""Analytic Account" (account_id) is a hidden field in the hr.analytic.timesheet line (=work items). In the scenario which is working, the field account_id is set by the on_change on the field unit_amount, which is the function on_change_unit_amount. But this on_change only works when the task has been saved. I have made a small modification to this on_change to make it work even when the task is not saved yet, by adding an argument project_id, and reading it via parent.project_id in the view.
I have fixed the bug in the merge proposal https:/ /code.launchpad .net/~akretion- team/hr- timesheet/ 70-fix- timesheet- task-bug1316456 /+merge/ 218364
A few explainations about the bug and the fix : the field ""Analytic Account" (account_id) is a hidden field in the hr.analytic. timesheet line (=work items). In the scenario which is working, the field account_id is set by the on_change on the field unit_amount, which is the function on_change_ unit_amount. But this on_change only works when the task has been saved. I have made a small modification to this on_change to make it work even when the task is not saved yet, by adding an argument project_id, and reading it via parent.project_id in the view.