Ashvin Rathod (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-724201-ara into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #724201 in OpenERP Addons: "Cannot use the timesheet program because of a 
warning message "Please Enter A Value""
  https://bugs.launchpad.net/openobject-addons/+bug/724201

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-724201-ara/+merge/53207

Hello,

fix: Cannot use the timesheet program because of a warning message "Please 
Enter A Value"
https://bugs.launchpad.net/openobject-addons/+bug/724201

Thanks,
ara
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-724201-ara/+merge/53207
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-724201-ara.
=== modified file 'hr_timesheet_sheet/hr_timesheet_sheet.py'
--- hr_timesheet_sheet/hr_timesheet_sheet.py	2011-03-11 17:25:13 +0000
+++ hr_timesheet_sheet/hr_timesheet_sheet.py	2011-03-14 09:13:22 +0000
@@ -177,6 +177,10 @@
         if 'employee_id' in vals:
             if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).user_id:
                 raise osv.except_osv(_('Error !'), _('You cannot create a timesheet for an employee that does not have any user defined !'))
+            if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).product_id:
+                raise osv.except_osv(_('Error !'), _('You cannot create a timesheet for an employee that does not have any product defined !'))
+            if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).journal_id:
+                raise osv.except_osv(_('Error !'), _('You cannot create a timesheet for an employee that does not have any analytic journal defined !'))
         return super(hr_timesheet_sheet, self).create(cr, uid, vals, *args, **argv)
 
     def write(self, cr, uid, ids, vals, *args, **argv):

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-web
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-web
More help   : https://help.launchpad.net/ListHelp

Reply via email to