bzr revid: fp@tinyerp.com-20090121193358-a2o75diozf29c0hq
This commit is contained in:
Fabien Pinckaers
2009-01-21 20:33:58 +01:00
parent a42e24d08a
commit 5d61607688
@@ -405,7 +405,7 @@ class hr_timesheet_line(osv.osv):
}
def create(self, cr, uid, vals, *args, **kwargs):
if 'sheet_id' in vals:
if vals.get('sheet_id', False):
ts = self.pool.get('hr_timesheet_sheet.sheet').browse(cr, uid, vals['sheet_id'])
if not ts.state in ('draft', 'new'):
raise osv.except_osv(_('Error !'), _('You can not modify an entry in a confirmed timesheet !'))