Commit d7f0e54d authored by Arnaud Fontaine's avatar Arnaud Fontaine

The Form class must be re-created after the first attempts otherwise an

ExpiredError is raised as the content is outdated



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@46028 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4d3e7ee7
......@@ -796,8 +796,8 @@ class ContextMainForm(MainForm):
else:
current_attempt_counter = 0
while current_attempt_counter != maximum_attempt_number:
self.submitSelect('select_jump', 'Base_doJump:method',
label, value, **kw)
self.browser.mainForm.submitSelect('select_jump', 'Base_doJump:method',
label, value, **kw)
if no_jump_transition_message != self.browser.getTransitionMessage():
return current_attempt_counter * sleep_between_attempt
......@@ -909,15 +909,14 @@ class ContextMainForm(MainForm):
"""
def tryLegacyAndNew():
try:
self.submitSelect('select_action', 'Base_doAction:method', label,
value and '%s?workflow_action=%s' % (script_id, value),
**kw)
self.browser.mainForm.submitSelect(
'select_action', 'Base_doAction:method', label,
value and '%s?workflow_action=%s' % (script_id, value), **kw)
except LookupError:
self.submitSelect('select_action', 'Base_doAction:method', label,
value and '%s?field_my_workflow_action=%s' % (script_id,
value),
**kw)
self.browser.mainForm.submitSelect(
'select_action', 'Base_doAction:method', label,
value and '%s?field_my_workflow_action=%s' % (script_id, value), **kw)
if maximum_attempt_number == 1:
tryLegacyAndNew()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment