Before create or write the hr_analytic_timesheet, check if the values of the line is changed.
# We check the state of the sheet
estado = self._check_sheet_state(cr, uid, ids)
# if estado is False, the sheet is confirmed or done
if estado is False:
# We test if the values are changed
if vals: raise osv.except_osv(_('Error!'), _('You cannot modify an entry in a Confirmed/Done timesheet!'))
else:
# If no values are changed, we clean the ids, for not do validation
ids = []
Hello!
I did a patch for it :)
Before create or write the hr_analytic_ timesheet, check if the values of the line is changed.
# We check the state of the sheet sheet_state( cr, uid, ids)
raise osv.except_ osv(_(' Error!' ),
_ ('You cannot modify an entry in a Confirmed/Done timesheet!'))
estado = self._check_
# if estado is False, the sheet is confirmed or done
if estado is False:
# We test if the values are changed
if vals:
else:
# If no values are changed, we clean the ids, for not do validation
ids = []
return super(hr_ analytic_ timesheet, self).write(cr, uid, ids, vals, *args, **argv)