=== modified file 'hr_timesheet_sheet/hr_timesheet_sheet.py'
--- hr_timesheet_sheet/hr_timesheet_sheet.py 2013-05-21 12:23:59 +0000
+++ hr_timesheet_sheet/hr_timesheet_sheet.py 2013-06-12 09:57:37 +0000
@@ -193,6 +193,22 @@
self.create_workflow(cr, uid, ids)
return True
+ def workflow_new(self, cr, uid, ids, context=None):
+ self.write(cr, uid, ids, {'state': 'new'}, context=context)
+ return True
+
+ def workflow_draft(self, cr, uid, ids, context=None):
+ self.write(cr, uid, ids, {'state': 'draft'}, context=context)
+ return True
+
+ def workflow_confirm(self, cr, uid, ids, context=None):
+ self.write(cr, uid, ids, {'state': 'confirm'}, context=context)
+ return True
+
+ def workflow_done(self, cr, uid, ids, context=None):
+ self.write(cr, uid, ids, {'state': 'done'}, context=context)
+ return True
+
def name_get(self, cr, uid, ids, context=None):
if not ids:
return []
=== modified file 'hr_timesheet_sheet/hr_timesheet_workflow.xml'
--- hr_timesheet_sheet/hr_timesheet_workflow.xml 2011-07-11 11:23:29 +0000
+++ hr_timesheet_sheet/hr_timesheet_workflow.xml 2013-06-12 09:57:37 +0000
@@ -14,26 +14,26 @@
new
function
- write({'state':'new'})
+ workflow_new()
True
draft
function
- write({'state':'draft'})
+ workflow_draft()
confirm
function
- write({'state':'confirm'})
+ workflow_confirm()
done
function
- write({'state':'done'})
+ workflow_done()
True