Merge lp:~hbrunn/ocb-addons/lp1190022 into lp:ocb-addons/6.1

Proposed by Holger Brunn (Therp)
Status: Rejected
Rejected by: Holger Brunn (Therp)
Proposed branch: lp:~hbrunn/ocb-addons/lp1190022
Merge into: lp:ocb-addons/6.1
Diff against target: 60 lines (+20/-4)
2 files modified
hr_timesheet_sheet/hr_timesheet_sheet.py (+16/-0)
hr_timesheet_sheet/hr_timesheet_workflow.xml (+4/-4)
To merge this branch: bzr merge lp:~hbrunn/ocb-addons/lp1190022
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) Disapprove
Review via email: mp+168953@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

rejecting as per https://bugs.launchpad.net/openobject-addons/+bug/1190022

we don't want incompatible changes

review: Disapprove

Unmerged revisions

6753. By Holger Brunn (Therp)

[IMP] call methods in workflow to write state

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_timesheet_sheet/hr_timesheet_sheet.py'
2--- hr_timesheet_sheet/hr_timesheet_sheet.py 2013-01-08 12:50:40 +0000
3+++ hr_timesheet_sheet/hr_timesheet_sheet.py 2013-06-12 13:34:26 +0000
4@@ -441,6 +441,22 @@
5 wf_service.trg_create(uid, self._name, id, cr)
6 return True
7
8+ def workflow_new(self, cr, uid, ids, context=None):
9+ self.write(cr, uid, ids, {'state': 'new'}, context=context)
10+ return True
11+
12+ def workflow_draft(self, cr, uid, ids, context=None):
13+ self.write(cr, uid, ids, {'state': 'draft'}, context=context)
14+ return True
15+
16+ def workflow_confirm(self, cr, uid, ids, context=None):
17+ self.write(cr, uid, ids, {'state': 'confirm'}, context=context)
18+ return True
19+
20+ def workflow_done(self, cr, uid, ids, context=None):
21+ self.write(cr, uid, ids, {'state': 'done'}, context=context)
22+ return True
23+
24 def name_get(self, cr, uid, ids, context=None):
25 if not len(ids):
26 return []
27
28=== modified file 'hr_timesheet_sheet/hr_timesheet_workflow.xml'
29--- hr_timesheet_sheet/hr_timesheet_workflow.xml 2011-07-11 11:23:29 +0000
30+++ hr_timesheet_sheet/hr_timesheet_workflow.xml 2013-06-12 13:34:26 +0000
31@@ -14,26 +14,26 @@
32 <field name="wkf_id" ref="wkf_timesheet"/>
33 <field name="name">new</field>
34 <field name="kind">function</field>
35- <field name="action">write({'state':'new'})</field>
36+ <field name="action">workflow_new()</field>
37 <field name="flow_start">True</field>
38 </record>
39 <record id="act_draft" model="workflow.activity">
40 <field name="wkf_id" ref="wkf_timesheet"/>
41 <field name="name">draft</field>
42 <field name="kind">function</field>
43- <field name="action">write({'state':'draft'})</field>
44+ <field name="action">workflow_draft()</field>
45 </record>
46 <record id="act_confirm" model="workflow.activity">
47 <field name="wkf_id" ref="wkf_timesheet"/>
48 <field name="name">confirm</field>
49 <field name="kind">function</field>
50- <field name="action">write({'state':'confirm'})</field>
51+ <field name="action">workflow_confirm()</field>
52 </record>
53 <record id="act_done" model="workflow.activity">
54 <field name="wkf_id" ref="wkf_timesheet"/>
55 <field name="name">done</field>
56 <field name="kind">function</field>
57- <field name="action">write({'state':'done'})</field>
58+ <field name="action">workflow_done()</field>
59 <field name="flow_stop">True</field>
60 </record>
61

Subscribers

People subscribed via source and target branches