diff --git a/product/ERP5/skins/erp5_core/Base_doLanguage.py b/product/ERP5/skins/erp5_core/Base_doLanguage.py new file mode 100755 index 0000000000000000000000000000000000000000..cdfef6d46269bfa1c73f8b338ed8412fc3781d40 --- /dev/null +++ b/product/ERP5/skins/erp5_core/Base_doLanguage.py @@ -0,0 +1,17 @@ +## Script (Python) "doLanguage" +##bind container=container +##bind context=context +##bind namespace= +##bind script=script +##bind subpath=traverse_subpath +##parameters=language_select +##title= +## + +from Products.ERP5Type.Cache import clearCache + +# XXX Localizer-dependent +context.Localizer.changeLanguage(language_select) + +# XXX should invalidate cached data specific to current user +clearCache() \ No newline at end of file diff --git a/product/ERP5/skins/erp5_core/Base_jumpToAccountingTransaction.py b/product/ERP5/skins/erp5_core/Base_jumpToAccountingTransaction.py new file mode 100755 index 0000000000000000000000000000000000000000..c83c3f0448d95472cc42f38478fce69a236835b7 --- /dev/null +++ b/product/ERP5/skins/erp5_core/Base_jumpToAccountingTransaction.py @@ -0,0 +1,33 @@ +## Script (Python) "Base_jumpToAccountingTransaction" +##bind container=container +##bind context=context +##bind namespace= +##bind script=script +##bind subpath=traverse_subpath +##parameters=from_account=None, from_entity=None +##title= +## +# You can use this script to jump to accounting module without making the URL longer. +# Like 'erp5/organisation/purchase_order/accounting/view'. +# +# Usage: .../Base_jumpToAccountingTransaction?from_entity=1 +# +# Use from_account to display only transaction related to the account you come from, and from_entity if you come from an organisation or person + +request=context.REQUEST + +redirect_url = '%s/accounting/view' % context.getPortalObject().absolute_url() + +separator = '?' + +if from_account: + redirect_url += '%snode:list=%s' % (separator, context.getRelativeUrl()) + separator = '&' + +elif from_entity: + redirect_url += '%sentity=%s' % (separator, context.getRelativeUrl()) + separator = '&' + +redirect_url += '%sreset=1' % separator + +request[ 'RESPONSE' ].redirect( redirect_url ) diff --git a/product/ERP5/skins/erp5_core/Folder_deleteObjectList.py b/product/ERP5/skins/erp5_core/Folder_deleteObjectList.py new file mode 100755 index 0000000000000000000000000000000000000000..cf73aef25db856036e6510352c2b59ea9bf1791b --- /dev/null +++ b/product/ERP5/skins/erp5_core/Folder_deleteObjectList.py @@ -0,0 +1,16 @@ +## Script (Python) "Folder_deleteObjectList" +##title=Delete objects from a folder +##parameters=selection_index=None,form_id='',uids=[], listbox_uid=[],selection_name='' + +request=context.REQUEST + +selected_uids = context.portal_selections.updateSelectionCheckedUidList(selection_name,listbox_uid,uids) +uids = context.portal_selections.getSelectionCheckedUidsFor(selection_name) + + +kw = {'uid': uids} +request.set('object_uid', context.getUid()) +request.set('uids', uids) +context.portal_selections.setSelectionParamsFor('folder_delete_selection', kw) +return context.Folder_viewDeleteDialog(uids=uids, REQUEST=request) +