Skip to content
Snippets Groups Projects
Commit d66c96ff authored by Holger Brunn's avatar Holger Brunn Committed by Martin Trigaux
Browse files

[FIX] project_timesheet: don't trigger write if there is nothing to write

Triggering an empty write could break constraint (can not update past timesheet) (opw 606963)
parent ab9ac783
Branches
Tags
No related merge requests found
......@@ -200,7 +200,8 @@ class project_work(osv.osv):
if amount_unit and 'amount' in amount_unit.get('value',{}):
vals_line['amount'] = amount_unit['value']['amount']
self.pool.get('hr.analytic.timesheet').write(cr, uid, [line_id.id], vals_line, context=context)
if vals_line:
self.pool.get('hr.analytic.timesheet').write(cr, uid, [line_id.id], vals_line, context=context)
return super(project_work,self).write(cr, uid, ids, vals, context)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment