Skip to content

Commit fad743a

Browse files
author
Stephane Wirtel
committed
[REF] Remove old code from the workflow engine
bzr revid: [email protected]
1 parent c7afc04 commit fad743a

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

openerp/workflow/workitem.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def create(session, record, activities, instance_id, stack):
4141
assert isinstance(stack, list)
4242
cr = session.cr
4343

44-
ident = session.uid, record.model, record.id
4544
for activity in activities:
4645
cr.execute("select nextval('wkf_workitem_id_seq')")
4746
id_new = cr.fetchone()[0]
@@ -91,8 +90,6 @@ def process(session, record, workitem, signal=None, force_running=False, stack=N
9190

9291
# ---------------------- PRIVATE FUNCS --------------------------------
9392

94-
# def new_state_set(session, record, workitem, activity, state):
95-
9693
def _state_set(session, record, workitem, activity, state):
9794
session.cr.execute('update wkf_workitem set state=%s where id=%s', (state, workitem['id']))
9895
workitem['state'] = state
@@ -106,7 +103,6 @@ def _execute(session, record, workitem, activity, stack):
106103
# send a signal to parent workflow (signal: subflow.signal_name)
107104
#
108105
cr = session.cr
109-
ident = (session.uid, record.model, record.id)
110106
signal_todo = []
111107
if (workitem['state']=='active') and activity['signal_send']:
112108
cr.execute("select i.id,w.osv,i.res_id from wkf_instance i left join wkf w on (i.wkf_id=w.id) where i.id IN (select inst_id from wkf_workitem where subflow_id=%s)", (workitem['inst_id'],))
@@ -118,7 +114,7 @@ def _execute(session, record, workitem, activity, stack):
118114
if workitem['state']=='active':
119115
_state_set(session, record, workitem, activity, 'complete')
120116
if activity['action_id']:
121-
res2 = wkf_expr.execute_action(cr, ident, workitem, activity)
117+
res2 = wkf_expr.execute_action(session, record, workitem, activity)
122118
if res2:
123119
stack.append(res2)
124120
result=res2
@@ -199,7 +195,6 @@ def _split_test(session, record, workitem, split_mode, signal, stack):
199195
return False
200196

201197
def _join_test(session, record, trans_id, inst_id, stack):
202-
# cr, trans_id, inst_id, ident, stack):
203198
cr = session.cr
204199
cr.execute('select * from wkf_activity where id=(select act_to from wkf_transition where id=%s)', (trans_id,))
205200
activity = cr.dictfetchone()

0 commit comments

Comments
 (0)