Commit e499eb51 authored by Jérome Perrin's avatar Jérome Perrin

2008-05-14 jerome

* Use absolute_url when necessary to produce URLs compatible with virtual hosting.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20960 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 411d1d70
......@@ -67,7 +67,7 @@
<key> <string>_body</string> </key>
<value> <string>request = context.REQUEST\n
return request.RESPONSE.redirect( "%s/Preference_viewAccounting" %\n
context.portal_preferences.getActivePreference().getPath())\n
context.portal_preferences.getActivePreference().absolute_url())\n
\n
# vim: syntax=python\n
</string> </value>
......
......@@ -66,27 +66,26 @@
<item>
<key> <string>_body</string> </key>
<value> <string># Jump to a bank account of the current organisation\n
\n
N_ = context.Base_translateString\n
request=context.REQUEST\n
organisation = context.restrictedTraverse(\n
context.getPortalObject().portal_preferences.\\\n
getPreferredAccountingTransactionSourceSection())\n
portal = context.getPortalObject()\n
organisation = portal.restrictedTraverse(\n
portal.portal_preferences.getPreferredAccountingTransactionSourceSection())\n
\n
if organisation is not None :\n
selection_uid_list = [ bank_account.getUid() for bank_account \\\n
in organisation.searchFolder(portal_type = [\'Bank Account\', \'Cash Register\', \'Credit Card\']) ]\n
in organisation.searchFolder(portal_type=portal.getPortalPaymentNodeTypeList()) ]\n
if len(selection_uid_list) != 0 : \n
kw = {\'uid\': selection_uid_list}\n
context.portal_selections.setSelectionParamsFor(\'Base_jumpToRelatedObjectList\', kw)\n
portal.portal_selections.setSelectionParamsFor(\'Base_jumpToRelatedObjectList\', kw)\n
request.set(\'object_uid\', context.getUid())\n
request.set(\'uids\', selection_uid_list)\n
return context.Base_jumpToRelatedObjectList(\n
uids=selection_uid_list, REQUEST=request)\n
\n
redirect_url = \'%s/view?%s\' % (context.getPath(),\n
\'portal_status_message=No+Bank+Account+For+Current+Organisation\')\n
return context.REQUEST[ \'RESPONSE\' ].redirect(redirect_url)\n
# vim: syntax=python\n
return context.Base_redirect(form_id,\n
keep_items=dict(portal_status_message=\n
N_(\'No Bank Account For Current Organisation\')))\n
</string> </value>
</item>
<item>
......@@ -103,7 +102,7 @@ return context.REQUEST[ \'RESPONSE\' ].redirect(redirect_url)\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
<value> <string>form_id=\'view\'</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -123,15 +122,18 @@ return context.REQUEST[ \'RESPONSE\' ].redirect(redirect_url)\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>form_id</string>
<string>_getattr_</string>
<string>context</string>
<string>N_</string>
<string>request</string>
<string>portal</string>
<string>organisation</string>
<string>None</string>
<string>append</string>
......@@ -141,8 +143,7 @@ return context.REQUEST[ \'RESPONSE\' ].redirect(redirect_url)\n
<string>selection_uid_list</string>
<string>len</string>
<string>kw</string>
<string>redirect_url</string>
<string>_getitem_</string>
<string>dict</string>
</tuple>
</value>
</item>
......@@ -154,7 +155,9 @@ return context.REQUEST[ \'RESPONSE\' ].redirect(redirect_url)\n
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
<tuple>
<string>view</string>
</tuple>
</value>
</item>
<item>
......
......@@ -138,7 +138,7 @@ for line in line_list:\n
new_line.setProperty(prop, line.getProperty(prop))\n
\n
return context.REQUEST.RESPONSE.redirect("%s/view?portal_status_message=%s" %\n
(reversal.getPath(),\n
(reversal.absolute_url(),\n
N_("Reversal Transaction for ${specific_reference} created.",\n
mapping={\'specific_reference\': specific_reference})))\n
</string> </value>
......
......@@ -92,7 +92,7 @@ if len(id_to_delete_list) != len(transaction_lines):\n
\n
if redirect:\n
context.REQUEST.RESPONSE.redirect("%s/view?portal_status_message=%s" % (\n
transaction.getPath(), N_(\'Empty+Lines+Deleted.\')))\n
transaction.absolute_url(), N_(\'Empty+Lines+Deleted.\')))\n
</string> </value>
</item>
<item>
......
2008-05-14 jerome
* Use absolute_url when necessary to produce URLs compatible with virtual hosting.
2008-04-19 yo
* Bump to 5.0.
......
695
\ No newline at end of file
697
\ No newline at end of file
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