[project_timesheet] has reference to unassigned variable 'result'
Bug #653032 reported by
James Jesudason
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical OpenERP |
Fix Released
|
High
|
Dhruti Shastri(OpenERP) | ||
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Undecided
|
Dhruti Shastri(OpenERP) |
Bug Description
The project_timesheet module references a dictionary called 'result', which will be unassigned in certain circumstances. If a user_id is not passed into the write method e.g. when the number of hours are changed on a timesheet line. In the standard screens the error does not occur because the whole record is passed into the write method. However, we're working on a module to simplify timesheet entry, and that exposes the bug in the code.
bzr revno: 4977
Related branches
lp:~jamesj/openobject-addons/project_timesheet201001
Rejected
for merging
into
lp:openobject-addons
- James Jesudason (community): Disapprove
- OpenERP Core Team: Pending requested
-
Diff: 20 lines (+7/-3)1 file modifiedproject_timesheet/project_timesheet.py (+7/-3)
summary: |
- project_timesheet has reference to unassigned variable 'result' + [project_timesheet] has reference to unassigned variable 'result' |
Changed in canonical-openerp: | |
status: | New → Confirmed |
importance: | Undecided → High |
milestone: | none → timesheets-pilot |
Changed in canonical-openerp: | |
assignee: | nobody → DHS(OpenERP) (dhs-openerp) |
To post a comment you must log in.
Hello Jesudasan,
I agree that when the write() method is called without the 'user_id' it can cause an error. But if its coming from GTK it will always have a 'user_id' as it's a required field. I have found a solution for this, IMHO taking the 'uid' (logged user) in place of 'user_id' (assigned user) doesn't seem to be feasible. So would you please check the attached patch and notify us ?
Thanks.