summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Bouvy <dbo@odoo.com>2016-07-12 16:29:08 +0200
committerDamien Bouvy <dbo@odoo.com>2016-07-12 16:30:56 +0200
commitd7d07810aa3b567a4258ea97d14aa43ddb49e9c7 (patch)
tree634cc167c876748c8d7e2448a57f69920cecd984
parentc9b270c9a45156fd2b24cbf98755efb5e61e7f79 (diff)
[FIX] hr_timesheet_sheet: no product on employee
Some leftover code from before. opw-683126 Courtesy of David Coninckx
-rw-r--r--addons/hr_timesheet_sheet/hr_timesheet_sheet.py2
1 files changed, 0 insertions, 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