diff --git a/product/ERP5/ERP5Site.py b/product/ERP5/ERP5Site.py index 79d608f6905bcbdf8cf070d4f78612e55ef5becc..772b15ec2eb47144c383cff8826e66645f145c31 100644 --- a/product/ERP5/ERP5Site.py +++ b/product/ERP5/ERP5Site.py @@ -2186,6 +2186,7 @@ class ERP5Generator(PortalGenerator): def setup(self, p, create_userfolder, **kw): update = kw.get('update', 0) + if getattr(p, 'setDefaultSorting', None) is not None: p.setDefaultSorting('id', 0) diff --git a/product/ERP5Type/patches/PythonScript.py b/product/ERP5Type/patches/PythonScript.py index 9c4ed49b6d4a5c7cf5055942eae2ee58ed278a2f..c45f7dd421882ab5e65d9e9a208b954c9db16502 100644 --- a/product/ERP5Type/patches/PythonScript.py +++ b/product/ERP5Type/patches/PythonScript.py @@ -51,7 +51,7 @@ PythonScript.manage_main = manage_editForm PythonScript.manage_editDocument = manage_editForm PythonScript.manage_editForm = manage_editForm -# following methods are design for showAsXML function: +# following methods are necessary for showAsXML function: def pyscript_getBody(self): return self._body def pyscript_getParams(self): diff --git a/product/ERP5Workflow/Document/WorkflowScript.py b/product/ERP5Workflow/Document/WorkflowScript.py index fdf893141a2656470582d81df0170bc81fc5793c..3cb16cc250e2e536e95b3b9decf1c22874919da1 100644 --- a/product/ERP5Workflow/Document/WorkflowScript.py +++ b/product/ERP5Workflow/Document/WorkflowScript.py @@ -52,16 +52,10 @@ class WorkflowScript(PythonScript, IdAsReferenceMixin("script_", "prefix")): , PropertySheet.WorkflowScript ) - def __init__(self, *args, **kw): - PythonScript.__init__(self, *args, **kw) - def __call__(self): r_url = self.REQUEST.get('URL') return self.REQUEST.RESPONSE.redirect(r_url+'/view') execute = PythonScript.__call__ - # We need to take __setstate__ from PythonScript in order to - # generate _v_ft attributes which is necessary to run the script - __setstate__ = PythonScript.__setstate__ InitializeClass(WorkflowScript)