Commit e688823d authored by Kevin Deldycke's avatar Kevin Deldycke

2006-02-07 Kevin

* Fix mass workflow status modification (Folder_modifyWorkflowStatus and Base_callViewDialogMethod updated).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6028 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9e4c36d5
......@@ -76,8 +76,6 @@ from ZTUtils import make_query\n
\n
request=context.REQUEST\n
\n
\n
\n
#Exceptions for Base_edit\n
if dialog_method == \'Base_edit\':\n
return context.Base_edit( form_id=form_id\n
......@@ -89,6 +87,13 @@ if dialog_method == \'Workflow_statusModify\':\n
return context.Workflow_statusModify( form_id=form_id\n
, dialog_id=dialog_id\n
)\n
#Exceptions for Mass Workflow Modifications\n
if dialog_method == \'Folder_modifyWorkflowStatus\':\n
return context.Folder_modifyWorkflowStatus( form_id = form_id\n
, dialog_id = dialog_id\n
, selection_name = selection_name\n
)\n
#Exceptions for UI configurations\n
if dialog_method == \'Base_configureUI\':\n
return context.Base_configureUI( form_id=form_id\n
, selection_name=selection_name\n
......
......@@ -70,8 +70,8 @@
\n
# base_category_list : list of category values we need to retrieve\n
# user_name : string obtained from getSecurityManager().getUser().getUserName() [NuxUserGroup]\n
# When using PluggableAuthService with ERP5GroupMAnager, user_name is the id\n
# of the person linked to getUser().getId() through getReference() (which is its login).\n
# When using PluggableAuthService with ERP5GroupManager, user_name is the id\n
# of the person object whose \'reference\' is the login of the PAS user.\n
# object : object which we want to assign roles to.\n
# portal_type : portal type of object\n
\n
......
......@@ -75,28 +75,15 @@ request=context.REQUEST\n
\n
try:\n
# Validate the form\n
form = getattr(context,dialog_id)\n
#form.validate_all_to_request(request)\n
form = getattr(context, dialog_id)\n
kw = {}\n
for f in form.get_fields():\n
k = f.id\n
v = getattr(request, k, getattr(request, k[3:], None))\n
fid = \'field_\' + k\n
v = getattr(request, fid, None)\n
if v is not None:\n
k = k[3:]\n
kw[k] = v\n
\n
listbox = request.get(\'listbox\')\n
if listbox is not None:\n
listbox_line_list = []\n
listbox = getattr(request,\'listbox\',None)\n
listbox_keys = listbox.keys()\n
listbox_keys.sort()\n
for key in listbox_keys:\n
listbox_line = listbox[key]\n
listbox_line[\'listbox_key\'] = key\n
listbox_line_list.append(listbox[key])\n
listbox_line_list = tuple(listbox_line_list)\n
kw[\'listbox\'] = listbox_line_list\n
\n
selection_uid_list = context.portal_selections.getSelectionCheckedUidsFor(selection_name)\n
if len(selection_uid_list) == 0 :\n
......@@ -105,7 +92,7 @@ try:\n
selection_list = []\n
for uid in selection_uid_list :\n
selection_list.append(context.portal_catalog.getObject(uid))\n
\n
\n
for o in selection_list:\n
o = o.getObject()\n
o.activate().Base_workflowStatusModify(batch = 1, **kw)\n
......@@ -123,6 +110,7 @@ except FormValidationError, validation_errors:\n
field_errors = form.ErrorFields(validation_errors)\n
request.set(\'field_errors\', field_errors)\n
return form(request)\n
\n
except ValueError, value_error:\n
# Pack errors into the request\n
redirect_url = \'%s/%s?%s%s\' % ( context.absolute_url(), form_id\n
......@@ -187,7 +175,7 @@ except ValueError, value_error:\n
<string>Products.DCWorkflow.DCWorkflow</string>
<string>ValidationFailed</string>
<string>_getattr_</string>
<string>context</string>
<string>context</string>
<string>request</string>
<string>getattr</string>
<string>form</string>
......@@ -195,16 +183,11 @@ except ValueError, value_error:\n
<string>_getiter_</string>
<string>f</string>
<string>k</string>
<string>_getitem_</string>
<string>fid</string>
<string>None</string>
<string>v</string>
<string>_getitem_</string>
<string>_write_</string>
<string>listbox</string>
<string>listbox_line_list</string>
<string>listbox_keys</string>
<string>key</string>
<string>listbox_line</string>
<string>tuple</string>
<string>selection_uid_list</string>
<string>len</string>
<string>selection_list</string>
......
......@@ -170,9 +170,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
......@@ -286,23 +284,4 @@
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:""</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2006-02-07 Kevin
* Fix mass workflow status modification (Folder_modifyWorkflowStatus and Base_callViewDialogMethod updated).
2006-03-06 romain
* translate message return by scripts in erp5_core.
......
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