[FIX] Project : task work behavior towards task hours corrected
lp bug: https://launchpad.net/bugs/427388 fixed bzr revid: jvo@tinyerp.com-20090911091712-w5oi9z2wnjvuvb2j
This commit is contained in:
parent
d4e9825ce6
commit
322a34009d
|
@ -433,8 +433,9 @@ class project_work(osv.osv):
|
|||
def write(self, cr, uid, ids,vals,context={}):
|
||||
if 'hours' in vals and (not vals['hours']):
|
||||
vals['hours'] = 0.00
|
||||
for work in self.browse(cr, uid, ids, context):
|
||||
cr.execute('update project_task set remaining_hours=remaining_hours - %s + (%s) where id=%s', (vals.get('hours',0.0), work.hours, work.task_id.id))
|
||||
if 'hours' in vals:
|
||||
for work in self.browse(cr, uid, ids, context):
|
||||
cr.execute('update project_task set remaining_hours=remaining_hours - %s + (%s) where id=%s', (vals.get('hours',0.0), work.hours, work.task_id.id))
|
||||
return super(project_work,self).write(cr, uid, ids, vals, context)
|
||||
|
||||
def unlink(self, cr, uid, ids, *args, **kwargs):
|
||||
|
|
Loading…
Reference in New Issue