odoo/odoo — pull request #3290 by astirpe (2014-10-24 15:58:10+00:00)
Title: [FIX] Timesheet Analysis: avoid dirty results if timesheet is missing

See the `hr.timesheet.report` model (it's a PostgreSQL view).

In case you have deleted a timesheet but the related account.analytic.line record is still present, than you get an inconsistency: the PostgreSQL view (hr.timesheet.report) returns a record which field `id` is null
The traceback is already reported in issue #2621.

I don't know whether the inconsistency should be avoided in advance while deleting a timesheet, but I think this fix is useful anyway.

Fixes #2621