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
=== modified file 'hr_timesheet_sheet/hr_timesheet_sheet.py'
--- hr_timesheet_sheet/hr_timesheet_sheet.py 2013-01-08 12:50:40 +0000
+++ hr_timesheet_sheet/hr_timesheet_sheet.py 2013-06-12 13:34:26 +0000
@@ -441,6 +441,22 @@
441 wf_service.trg_create(uid, self._name, id, cr)441 wf_service.trg_create(uid, self._name, id, cr)
442 return True442 return True
443443
444 def workflow_new(self, cr, uid, ids, context=None):
445 self.write(cr, uid, ids, {'state': 'new'}, context=context)
446 return True
447
448 def workflow_draft(self, cr, uid, ids, context=None):
449 self.write(cr, uid, ids, {'state': 'draft'}, context=context)
450 return True
451
452 def workflow_confirm(self, cr, uid, ids, context=None):
453 self.write(cr, uid, ids, {'state': 'confirm'}, context=context)
454 return True
455
456 def workflow_done(self, cr, uid, ids, context=None):
457 self.write(cr, uid, ids, {'state': 'done'}, context=context)
458 return True
459
444 def name_get(self, cr, uid, ids, context=None):460 def name_get(self, cr, uid, ids, context=None):
445 if not len(ids):461 if not len(ids):
446 return []462 return []
447463
=== 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 13:34:26 +0000
@@ -14,26 +14,26 @@
14 <field name="wkf_id" ref="wkf_timesheet"/>14 <field name="wkf_id" ref="wkf_timesheet"/>
15 <field name="name">new</field>15 <field name="name">new</field>
16 <field name="kind">function</field>16 <field name="kind">function</field>
17 <field name="action">write({'state':'new'})</field>17 <field name="action">workflow_new()</field>
18 <field name="flow_start">True</field>18 <field name="flow_start">True</field>
19 </record>19 </record>
20 <record id="act_draft" model="workflow.activity">20 <record id="act_draft" model="workflow.activity">
21 <field name="wkf_id" ref="wkf_timesheet"/>21 <field name="wkf_id" ref="wkf_timesheet"/>
22 <field name="name">draft</field>22 <field name="name">draft</field>
23 <field name="kind">function</field>23 <field name="kind">function</field>
24 <field name="action">write({'state':'draft'})</field>24 <field name="action">workflow_draft()</field>
25 </record>25 </record>
26 <record id="act_confirm" model="workflow.activity">26 <record id="act_confirm" model="workflow.activity">
27 <field name="wkf_id" ref="wkf_timesheet"/>27 <field name="wkf_id" ref="wkf_timesheet"/>
28 <field name="name">confirm</field>28 <field name="name">confirm</field>
29 <field name="kind">function</field>29 <field name="kind">function</field>
30 <field name="action">write({'state':'confirm'})</field>30 <field name="action">workflow_confirm()</field>
31 </record>31 </record>
32 <record id="act_done" model="workflow.activity">32 <record id="act_done" model="workflow.activity">
33 <field name="wkf_id" ref="wkf_timesheet"/>33 <field name="wkf_id" ref="wkf_timesheet"/>
34 <field name="name">done</field>34 <field name="name">done</field>
35 <field name="kind">function</field>35 <field name="kind">function</field>
36 <field name="action">write({'state':'done'})</field>36 <field name="action">workflow_done()</field>
37 <field name="flow_stop">True</field>37 <field name="flow_stop">True</field>
38 </record>38 </record>
3939

Subscribers

People subscribed via source and target branches