Merge lp:~syleam/openobject-addons/5.0-project_timesheet-regression into lp:openobject-addons/5.0

Proposed by Christophe CHAUVET
Status: Merged
Merge reported by: Jay Vora (Serpent Consulting Services)
Merged at revision: not available
Proposed branch: lp:~syleam/openobject-addons/5.0-project_timesheet-regression
Merge into: lp:openobject-addons/5.0
Diff against target: None lines
To merge this branch: bzr merge lp:~syleam/openobject-addons/5.0-project_timesheet-regression
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+4863@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christophe CHAUVET (christophe-chauvet) wrote :

Fix regression introduce on the last revision

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'project_timesheet/project_timesheet.py'
2--- project_timesheet/project_timesheet.py 2009-03-23 21:39:56 +0000
3+++ project_timesheet/project_timesheet.py 2009-03-24 23:23:47 +0000
4@@ -85,15 +85,15 @@
5 vals_line['date'] = vals['date'][:10]
6 if 'hours' in vals:
7 vals_line['unit_amount'] = vals['hours']
8- vals_line['amount'] = (-1) * vals['hours'] * obj.browse(cr, uid, line_id.id).product_id.standard_price
9- obj.write(cr, uid, [line_id.id], vals_line, {})
10+ vals_line['amount'] = (-1) * vals['hours'] * obj.browse(cr, uid, line_id).product_id.standard_price
11+ obj.write(cr, uid, [line_id], vals_line, {})
12
13 return super(project_work,self).write(cr, uid, ids, vals, context)
14
15 def unlink(self, cr, uid, ids, *args, **kwargs):
16 for timesheet_id in self.pool.get('project.task.work').browse(cr, uid, ids):
17 if timesheet_id.hr_analytic_timesheet_id:
18- obj = self.pool.get('hr.analytic.timesheet').unlink(cr, uid, [timesheet_id.hr_analytic_timesheet_id.id], *args, **kwargs)
19+ obj = self.pool.get('hr.analytic.timesheet').unlink(cr, uid, [timesheet_id.hr_analytic_timesheet_id], *args, **kwargs)
20 return super(project_work,self).unlink(cr, uid, ids, *args, **kwargs)
21
22 _columns={