timesheet don't get updated as I feed a task with new works
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Committed
|
Medium
|
OpenERP Publisher's Warranty Team | |||
OpenERP Community Backports (Addons) | Status tracked in 7.0 | |||||
7.0 |
New
|
Undecided
|
Unassigned | |||
Therp Backports (Deprecated) | Status tracked in Addons-6.1 | |||||
Addons-6.1 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I've installed 'hr_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_
- 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_
- 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")
Related branches
- Naresh(OpenERP): Pending requested
-
Diff: 12 lines (+1/-1)1 file modifiedhr_timesheet_sheet/hr_timesheet_sheet.py (+1/-1)
- Stefan Rijnhart (Opener) (community): Approve
-
Diff: 26 lines (+4/-2)2 files modifiedhr_timesheet_sheet/hr_timesheet_sheet.py (+1/-1)
project_timesheet/project_timesheet.py (+3/-1)
Changed in openobject-addons: | |
status: | Incomplete → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3) |
Changed in openobject-addons: | |
assignee: | OpenERP R&D Addons Team 3 (openerp-dev-addons3) → OpenERP Publisher's Warranty Team (openerp-opw) |
tags: | added: maintenance |
Changed in openobject-addons: | |
status: | Confirmed → In Progress |
Changed in openobject-addons: | |
status: | Fix Committed → Fix Released |
Changed in openobject-addons: | |
status: | Fix Released → Fix Committed |
Changed in therp-backports: | |
milestone: | none → 6.1-maintenance |
Changed in therp-backports: | |
status: | New → Fix Released |
Changed in therp-backports: | |
milestone: | 6.1-maintenance → 7.0-maintenance |
no longer affects: | therp-backports/addons-7.0 |
Hello Valentin,
I have checked your issue . According to your #comment 1:: "To be more specific": I'm expecting to see them in the one2many tree view of field 'timesheet_ids' of the "My timesheet" form.
It's working fine and collected correctly at my end.For your more reference ,I have attached video .Please take a look.
As you have ask in PROPOSITIONS Portion :: This is set at write time in "project.task.work" at line no 157 in write method .Due to this write method when you save time-sheet then and then you will see project. task.work (Task) in time sheet line.
Hope this will help you!!
Thanks!!