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