openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #08708
[Bug 949078] [NEW] timesheet don't get updated as I feed a task with new works
Public bug reported:
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")
** Affects: openobject-addons
Importance: Undecided
Status: New
--
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):
New
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
Follow ups
-
[Bug 949078] Re: timesheet don't get updated as I feed a task with new works
From: Lara (Therp), 2013-01-23
-
[Bug 949078] Re: timesheet don't get updated as I feed a task with new works
From: Lara Freeke (Therp), 2013-01-23
-
[Bug 949078] Re: timesheet don't get updated as I feed a task with new works
From: Stefan Rijnhart (Therp), 2013-01-08
-
[Bug 949078] Re: timesheet don't get updated as I feed a task with new works
From: Launchpad Bug Tracker, 2013-01-08
-
[Bug 949078] Re: timesheet don't get updated as I feed a task with new works
From: Stefan Rijnhart (Therp), 2013-01-07
-
[Bug 949078] Re: timesheet don't get updated as I feed a task with new works
From: Serpent Consulting Services, 2012-12-10
-
[Bug 949078] Re: timesheet don't get updated as I feed a task with new works
From: Bruno Monero, 2012-11-30
-
[Bug 949078] Re: timesheet don't get updated as I feed a task with new works
From: Bruno Monero, 2012-11-30
-
[Bug 949078] Re: timesheet don't get updated as I feed a task with new works
From: Jos De Graeve - http://www.apertoso.be/, 2012-10-30
-
[Bug 949078] Re: timesheet don't get updated as I feed a task with new works
From: Somesh Khare(OpenERP), 2012-03-28
-
[Bug 949078] Re: timesheet don't get updated as I feed a task with new works
From: Launchpad Bug Tracker, 2012-03-28
-
[Bug 949078] Re: timesheet don't get updated as I feed a task with new works
From: Somesh Khare(OpenERP), 2012-03-28
-
[Bug 949078] Re: timesheet don't get updated as I feed a task with new works
From: Naresh(OpenERP), 2012-03-23
-
[Bug 949078] Re: timesheet don't get updated as I feed a task with new works
From: Ravish(OpenERP), 2012-03-13
-
[Bug 949078] Re: timesheet don't get updated as I feed a task with new works
From: Valentin Lab, 2012-03-13
-
[Bug 949078] Re: timesheet don't get updated as I feed a task with new works
From: Ravish(OpenERP), 2012-03-12
-
[Bug 949078] [NEW] timesheet don't get updated as I feed a task with new works
From: Valentin Lab, 2012-03-07
References