Commit 1fc37201 authored by Jérome Perrin's avatar Jérome Perrin

simulation: fix pylint messages and enable coding style test

parent 0eab0c1a
......@@ -6,7 +6,7 @@
# - Implement validation of list fields
#
from Products.ERP5Type.Message import translateString
from Products.Formulator.Errors import ValidationError, FormValidationError
from Products.Formulator.Errors import FormValidationError
request=context.REQUEST
......
......@@ -28,15 +28,15 @@ for listbox_dict in listbox:
listbox_key = listbox_dict['listbox_key']
line = [x for x in line_list if x.getPath() == listbox_key][0]
uid = line.getUid()
for property in ('solver', 'solver_configuration', 'delivery_solver', 'comment',):
value = listbox_dict.get(property, None)
key = 'field_listbox_%s_%s' % (property, uid)
for prop in ('solver', 'solver_configuration', 'delivery_solver', 'comment',):
value = listbox_dict.get(prop, None)
key = 'field_listbox_%s_%s' % (prop, uid)
request.form[key] = request.other[key] = value
if property == 'solver_configuration':
if prop == 'solver_configuration':
if value is not None:
line.updateConfiguration(**value.as_dict())
else:
line.setProperty(property, value)
line.setProperty(prop, value)
# if divergence solving is already ongoing and will be fixed by activities
if line is None:
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>form_id=\'view\', listbox=[], **kw</string> </value>
<value> <string>form_id=\'view\', listbox=(), **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
request= context.REQUEST
request = context.REQUEST
from Products.ERP5Type.Message import translateString
listbox = request.get('listbox')
......@@ -12,15 +12,15 @@ for listbox_key in listbox:
listbox_dict = listbox[listbox_key]
line = [x for x in line_list if x.getPath() == listbox_key][0]
uid = line.getUid()
for property in ('solver', 'solver_configuration', 'delivery_solver', 'comment',):
value = listbox_dict.get(property, None)
key = 'field_listbox_%s_%s' % (property, uid)
for prop in ('solver', 'solver_configuration', 'delivery_solver', 'comment',):
value = listbox_dict.get(prop, None)
key = 'field_listbox_%s_%s' % (prop, uid)
request.form[key] = request.other[key] = value
if property == 'solver_configuration':
if prop == 'solver_configuration':
if value is not None:
line.updateConfiguration(**value.as_dict())
else:
line.setProperty(property, value)
line.setProperty(prop, value)
request.form['your_dialog_updated'] = '1'
# xhtml style Base_callDialogMethod does not redirected because of the listbox
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>form_id=\'view\', listbox=[],**kw</string> </value>
<value> <string>form_id=\'view\', listbox=(),**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
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