Commit a41e8b6b authored by Jérome Perrin's avatar Jérome Perrin

simulation: don't look in request in action scripts

formulator passes arguments, no need to look in request by hand. Also
this makes scripts easier to test if passed arguments are used.
parent 5abd0838
request = context.REQUEST
from Products.ERP5Type.Message import translateString
listbox = request.get('listbox')
line_list = context.Delivery_getSolverDecisionList(listbox=listbox)
if len(line_list) == 0:
kw["keep_items"] = {'portal_status_message': translateString("Workflow state may have been updated by other user. Please try again.")}
return context.Base_redirect(form_id, **kw)
for listbox_key in listbox:
listbox_dict = listbox[listbox_key]
line = [x for x in line_list if x.getPath() == listbox_key][0]
for listbox_dict in listbox:
line = [x for x in line_list if x.getPath() == listbox_dict['listbox_key']][0]
uid = line.getUid()
for prop in ('solver', 'solver_configuration', 'delivery_solver', 'comment',):
value = listbox_dict.get(prop, None)
......
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