working hours timesheet entree incorrectly passes ID to _on_change_ methods when creating a new line
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Web Client |
Fix Released
|
Medium
|
Amit Mendapara |
Bug Description
In HR / Working Hours when adding a new line for timesheet entree using the web client, the last ID of table hr_analytic_line is passed to the on_change_ methods of the object. Consequently code in on_change_ methods that depends on the IDS parameter to be empty when creating a new line doesn't execute correctly.
consider the code below from my inherited hr.analytic.
def on_change_
# Get the values for the linked project: project code and description
if not nTaskId:
nTaskId = 0
# Get stored task_id
nTaskIdOld = 0
context = {}
if len(oTimeSheetLine) > 0:
if tplTaskIdOld :
if not nTaskIdOld :
# Update project fields if task_id has changed
if nTaskId <> nTaskIdOld :
The last line incorrectly returns true because nTaskIdOld contains an incorrect value.
Related branches
Changed in openobject-client-web: | |
assignee: | nobody → ame (Tiny) (ame-tiny) |
importance: | Undecided → Medium |
milestone: | none → 5.0.7 |
status: | Incomplete → Confirmed |
Changed in openobject-client-web: | |
status: | Fix Committed → Fix Released |
may be duplicate of bug lp:439438