← Back to team overview

openerp-india team mailing list archive

[Bug 949078] Re: timesheet don't get updated as I feed a task with new works

 

Hello Valentin,

it has been fixed in lp:~openerp-dev/openobject-
addons/6.1-opw-573090-skh with,

Revision ID: skh@xxxxxxxxxxx-20120328100925-zkmxpvbpenz0oez2
Rev-no: 6707

This branch is under the review of our experts and will be merged soon
with stable 6.1 branch.

Thanks


** Changed in: openobject-addons
       Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/949078

Title:
  timesheet don't get updated as I feed a task with new works

Status in OpenERP Addons (modules):
  Fix Committed

Bug description:
  I've installed 'hr_timesheet_sheet' and 'project_timesheet'.
  I am working with "6.1.0" and "6.1.1" revision of all three components (openerp-web, openobject-server, openobject-addons)

  Feeding a task (project.task) with work lines (project.task.work)
  won't update the "My timesheet" form view.

  I'm expecting to see these work lines to be displayed in the "My
  timesheet" as I add them in the "project.task" form.

  To be more specific: I'm expecting to see them in the one2many tree
  view of field 'timesheet_ids' of the "My timesheet" form.

  They seem to be collected correctly (and thus displayed in "My
  timesheet") at the timesheet creation time. But not after.

  A way to get them to be correctly gathered in "My timesheet" is to go
  in the "Timesheet lines" where they are displayed. Then edit the line
  that was not reported in "My timesheet", and force the "form" view,
  then use the calendar widget to select the same date. Then press on
  "save". The line of work will now be correctly gathered in the "My
  timesheet".

  MY DIAGNOSIS ATTEMPT:

  I've digged deeply to try to diagnose the issue. And these are my conclusions:
  - The table 'hr_analytic_timesheet' have a 'sheet_id' column which relates to the 'sheet_id' stored function declared in hr_timesheet_sheet/hr_timesheet_sheet.py
  - this function is not pre-calculated (and thus the 'sheet_id' value is not set) at 'project.task.work' creation time.
  - when rendering the "My timesheet" form view, a '.search' is performed to filter out lines from the 'hr_analytic_timesheet' based on the 'sheet_id' value (based on the sheet_id column table value...)
  - A '.read' is then performed on remaining ids, which will trigger the 'sheet_id' calculation, but only on lines that had already the correct 'sheet_id' valuated and stored.

  PROPOSITIONS:

  Solutions can be found, but they would be different depending on what behavior we'd like to get (of which i'm not aware):
  1 - should this be set at write time ? (ie: upon "create" of project.task.work)
  2 - should this be set at read time ? (ie: in "get()" of "one2many_mod")

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/949078/+subscriptions


References