Commit f65095d6 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Initial import.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1752 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4c8bfa35
## 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
## 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 )
## 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)
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