From d7d07810aa3b567a4258ea97d14aa43ddb49e9c7 Mon Sep 17 00:00:00 2001 From: Damien Bouvy Date: Tue, 12 Jul 2016 16:29:08 +0200 Subject: [PATCH] [FIX] hr_timesheet_sheet: no product on employee Some leftover code from before. opw-683126 Courtesy of David Coninckx --- addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 92625f278f8..2b79c3c2715 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -70,8 +70,6 @@ class hr_timesheet_sheet(osv.osv): raise UserError(_('In order to create a timesheet for this employee, you must link him/her to a user.')) if not self._sheet_date(cr, uid, ids, forced_user_id=new_user_id, context=context): raise UserError(_('You cannot have 2 timesheets that overlap!\nYou should use the menu \'My Timesheet\' to avoid this problem.')) - if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id'], context=context).product_id: - raise UserError(_('In order to create a timesheet for this employee, you must link the employee to a product.')) if vals.get('attendances_ids'): # If attendances, we sort them by date asc before writing them, to satisfy the alternance constraint # In addition to the date order, deleting attendances are done before inserting attendances