From 877f99debe4a59b51d27591e03b68a5d804076f3 Mon Sep 17 00:00:00 2001 From: Kazuhiko Shiozaki <kazuhiko@nexedi.com> Date: Thu, 18 Nov 2010 10:22:19 +0000 Subject: [PATCH] we no longer need '/view' in the url. (more modification should be required.) git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40351 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../ListBox_getDiscussionThreadUrl.xml | 2 +- bt5/erp5_discussion/bt/revision | 2 +- .../portal_skins/erp5_ical_style/Listbox_asICal.xml | 2 +- bt5/erp5_ical_style/bt/revision | 2 +- .../portal_skins/erp5_rss_style/Listbox_asRSS.xml | 2 +- bt5/erp5_rss_style/bt/revision | 2 +- product/ERP5/Document/WebSection.py | 7 ++++--- product/ERP5/Document/Wiki.py | 4 ++-- product/ERP5/Extensions/InventoryBrain.py | 6 +++--- product/ERP5/Tool/TemplateTool.py | 4 ++-- product/ERP5/tests/testERP5Core.py | 12 ++++++------ product/ERP5/tests/testERP5WebWithDms.py | 6 +++--- product/ERP5/tests/testICal.py | 2 +- product/ERP5/tests/testRSS.py | 10 +++++----- .../Extensions/ERP5Site_createModuleScribus.py | 4 ++-- .../Extensions/ERP5Site_updateModuleScribus.py | 4 ++-- .../Folder_getWorkflowActionDocumentList.py | 2 +- product/ERP5Form/ListBox.py | 11 +++++------ product/ERP5Form/PlanningBox.py | 2 +- product/ERP5Form/tests/testPlanningBox.py | 2 +- product/ERP5Security/ERP5KeyAuthPlugin.py | 2 +- product/ERP5Security/tests/testERP5Security.py | 6 +++--- product/ERP5Type/Base.py | 3 ++- product/ERP5Type/Tool/PropertySheetTool.py | 2 +- 24 files changed, 51 insertions(+), 50 deletions(-) diff --git a/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/ListBox_getDiscussionThreadUrl.xml b/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/ListBox_getDiscussionThreadUrl.xml index 13da252996..fb9acfac7c 100644 --- a/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/ListBox_getDiscussionThreadUrl.xml +++ b/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/ListBox_getDiscussionThreadUrl.xml @@ -56,7 +56,7 @@ <value> <string>"""\n Used in listbox to generate proper root link\n """\n -return \'%s/view\' %brain.getParentValue().absolute_url()\n +return brain.getParentValue().absolute_url()\n </string> </value> </item> <item> diff --git a/bt5/erp5_discussion/bt/revision b/bt5/erp5_discussion/bt/revision index a76c74dcec..aa92725341 100644 --- a/bt5/erp5_discussion/bt/revision +++ b/bt5/erp5_discussion/bt/revision @@ -1 +1 @@ -75 \ No newline at end of file +76 \ No newline at end of file diff --git a/bt5/erp5_ical_style/SkinTemplateItem/portal_skins/erp5_ical_style/Listbox_asICal.xml b/bt5/erp5_ical_style/SkinTemplateItem/portal_skins/erp5_ical_style/Listbox_asICal.xml index cdedb29897..cf47a76f88 100644 --- a/bt5/erp5_ical_style/SkinTemplateItem/portal_skins/erp5_ical_style/Listbox_asICal.xml +++ b/bt5/erp5_ical_style/SkinTemplateItem/portal_skins/erp5_ical_style/Listbox_asICal.xml @@ -180,7 +180,7 @@ for line in line_list:\n else:\n ical_item_dict[\'COMPONENT\'] = \'journal\'\n elif field_upper == \'URL\' and hasattr(brainObject, \'absolute_url\'):\n - ical_item_dict[\'URL\'] = brainObject.absolute_url() + \'/view\'\n + ical_item_dict[\'URL\'] = brainObject.absolute_url()\n elif field_upper == \'DTSTAMP\':\n ical_item_dict[\'DTSTAMP\'] = convertDate(now)\n elif field_upper == \'DTSTART\':\n diff --git a/bt5/erp5_ical_style/bt/revision b/bt5/erp5_ical_style/bt/revision index 2edeafb09d..b5045cc404 100644 --- a/bt5/erp5_ical_style/bt/revision +++ b/bt5/erp5_ical_style/bt/revision @@ -1 +1 @@ -20 \ No newline at end of file +21 \ No newline at end of file diff --git a/bt5/erp5_rss_style/SkinTemplateItem/portal_skins/erp5_rss_style/Listbox_asRSS.xml b/bt5/erp5_rss_style/SkinTemplateItem/portal_skins/erp5_rss_style/Listbox_asRSS.xml index 819fc3bc1a..2f5db8bb8c 100644 --- a/bt5/erp5_rss_style/SkinTemplateItem/portal_skins/erp5_rss_style/Listbox_asRSS.xml +++ b/bt5/erp5_rss_style/SkinTemplateItem/portal_skins/erp5_rss_style/Listbox_asRSS.xml @@ -150,7 +150,7 @@ for line in line_list:\n elif required_field == \'link\':\n if hasattr(line.getBrain(), \'absolute_url\'):\n field_data = unicode(line.getBrain().absolute_url(), \'utf-8\' ) or \'\'\n - rss_item_string += (\'\\t\\t\\t<%s>%s/view</%s>\\n\' % (required_field, field_data, required_field))\n + rss_item_string += (\'\\t\\t\\t<%s>%s</%s>\\n\' % (required_field, field_data, required_field))\n elif required_field == \'description\':\n if hasattr(line.getBrain(), \'getDescription\'):\n field_data = html_quote(unicode(line.getBrain().getDescription(), \'utf-8\' ) or \'\')\n diff --git a/bt5/erp5_rss_style/bt/revision b/bt5/erp5_rss_style/bt/revision index 31ff414b74..2e66562e27 100644 --- a/bt5/erp5_rss_style/bt/revision +++ b/bt5/erp5_rss_style/bt/revision @@ -1 +1 @@ -48 \ No newline at end of file +49 \ No newline at end of file diff --git a/product/ERP5/Document/WebSection.py b/product/ERP5/Document/WebSection.py index 597c29c8c7..c08383c38d 100644 --- a/product/ERP5/Document/WebSection.py +++ b/product/ERP5/Document/WebSection.py @@ -289,12 +289,13 @@ class WebSection(Domain, DocumentExtensibleTraversableMixin): Return a permanent URL of document in the context of the current section. - If view is True, the url returned point to html content and can be - opened in a browser (ie. + '/view' for ooo documents) - This method must be implemented through a portal type dependent script: WebSection_getPermanentURL + + XXX The following argument is obsoleted because we no longer need /view. + If view is True, the url returned point to html content and can be + opened in a browser (ie. + '/view' for ooo documents) """ cache = getReadOnlyTransactionCache() if cache is not None: diff --git a/product/ERP5/Document/Wiki.py b/product/ERP5/Document/Wiki.py index 430406467a..7dec649c6b 100644 --- a/product/ERP5/Document/Wiki.py +++ b/product/ERP5/Document/Wiki.py @@ -137,7 +137,7 @@ class Wiki( Document ): append(name[1:]) else: # FIMXE: Create a new wiki instance if not present. - append('<a href="%s/%s/view">%s</a>' % (self._getTopLevelUrl(), name, name)) + append('<a href="%s/%s">%s</a>' % (self._getTopLevelUrl(), name, name)) elif min_key == 'url': url = match.string[match.start(1):match.end(1)] if url.startswith('!'): @@ -159,7 +159,7 @@ class Wiki( Document ): label = self._render_text(label) if self.wiki_name_expr.search(link): # FIXME: Create a new wiki instance if not present - append('<a href="%s/%s/view">%s</a>' % (self._getTopLevelUrl(), link, label)) + append('<a href="%s/%s">%s</a>' % (self._getTopLevelUrl(), link, label)) else: append('<a href="%s">%s</a>' % (link, label)) else: diff --git a/product/ERP5/Extensions/InventoryBrain.py b/product/ERP5/Extensions/InventoryBrain.py index 1dfd2328b5..8edbc473cd 100644 --- a/product/ERP5/Extensions/InventoryBrain.py +++ b/product/ERP5/Extensions/InventoryBrain.py @@ -173,7 +173,7 @@ class InventoryListBrain(ZSQLBrain): # with the inventory's uid. Then they are their own explanation. explanation = o if explanation is not None: - return '%s/%s/view' % ( + return '%s/%s' % ( self.portal_url.getPortalObject().absolute_url(), explanation.getRelativeUrl()) else: @@ -193,7 +193,7 @@ class InventoryListBrain(ZSQLBrain): query_kw_update = {} if cname_id in ('transformed_resource_title', ): - return '%s/view' % resource.absolute_url() + return resource.absolute_url() elif cname_id in ('getCurrentInventory', ): query_kw_update = { 'simulation_state': @@ -242,7 +242,7 @@ class InventoryListBrain(ZSQLBrain): if document.isMovement(): explanation = document.getExplanationValue() if explanation is not None: - return '%s/%s/view' % ( + return '%s/%s' % ( self.portal_url.getPortalObject().absolute_url(), explanation.getRelativeUrl()) return '' diff --git a/product/ERP5/Tool/TemplateTool.py b/product/ERP5/Tool/TemplateTool.py index b332912778..7f625f56cc 100644 --- a/product/ERP5/Tool/TemplateTool.py +++ b/product/ERP5/Tool/TemplateTool.py @@ -367,7 +367,7 @@ class TemplateTool (BaseTool): bt = self.download(url, id=id) if REQUEST is not None: - ret_url = bt.absolute_url() + '/view' + ret_url = bt.absolute_url() psm = translateString("Business template downloaded successfully.") REQUEST.RESPONSE.redirect("%s?portal_status_message=%s" % (ret_url, psm)) @@ -542,7 +542,7 @@ class TemplateTool (BaseTool): if not batch_mode and \ (REQUEST is not None): - ret_url = bt.absolute_url() + '/view' + ret_url = bt.absolute_url() psm = translateString("Business templates imported successfully.") REQUEST.RESPONSE.redirect("%s?portal_status_message=%s" % (ret_url, psm)) diff --git a/product/ERP5/tests/testERP5Core.py b/product/ERP5/tests/testERP5Core.py index 5e63242bd4..511c2d3193 100644 --- a/product/ERP5/tests/testERP5Core.py +++ b/product/ERP5/tests/testERP5Core.py @@ -282,13 +282,13 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): def test_frontpage(self): """Test we can view the front page. """ - response = self.publish('%s/view' % self.portal_id, self.auth) + response = self.publish(self.portal_id, self.auth) self.assertEquals(HTTP_OK, response.getStatus()) def test_login_form(self): """Test anonymous user are redirected to login_form """ - response = self.publish('%s/view' % self.portal_id) + response = self.publish(self.portal_id) self.assertEquals(HTTP_REDIRECT, response.getStatus()) self.assertEquals('%s/login_form' % self.portal.absolute_url(), response.getHeader('Location')) @@ -299,7 +299,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): 'portal_templates', 'portal_rules', 'portal_alarms',): - response = self.publish('%s/%s/view' % (self.portal_id, tool), self.auth) + response = self.publish('%s/%s' % (self.portal_id, tool), self.auth) self.assertEquals(HTTP_OK, response.getStatus(), "%s: %s" % (tool, response.getStatus())) @@ -308,7 +308,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): translation_service = DummyTranslationService() setGlobalTranslationService(translation_service) # assumes that we can add Business Template in template tool - response = self.publish('%s/portal_templates/view' % + response = self.publish('%s/portal_templates' % self.portal_id, self.auth) self.assertEquals(HTTP_OK, response.getStatus()) self.failUnless(('Business Template', {}) @@ -328,7 +328,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): title='Dummy Jump Action', action_permission='View', action_type='object_jump') - response = self.publish('%s/portal_templates/view' % + response = self.publish('%s/portal_templates' % self.portal_id, self.auth) self.assertEquals(HTTP_OK, response.getStatus()) self.failUnless(('Dummy Jump Action', {}) in @@ -410,7 +410,7 @@ class TestERP5Core(ERP5TypeTestCase, ZopeTestCase.Functional): len(portal.portal_catalog(portal_type='Preference', title='My Test Preference')), 1) - response = self.publish('%s/view' % self.portal_id, self.auth) + response = self.publish(self.portal_id, self.auth) self.assertEquals(HTTP_OK, response.getStatus()) def test_Folder_delete(self): diff --git a/product/ERP5/tests/testERP5WebWithDms.py b/product/ERP5/tests/testERP5WebWithDms.py index c5635ce835..f9ec7870b5 100644 --- a/product/ERP5/tests/testERP5WebWithDms.py +++ b/product/ERP5/tests/testERP5WebWithDms.py @@ -516,7 +516,7 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional): # is rendered in web_site context response = self.publish(website.absolute_url_path() + '/' +\ - web_page_reference + '/view', credential) + web_page_reference, credential) self.assertEquals(response.getHeader('content-type'), 'text/html; charset=utf-8') self.assertTrue('<form' in response.getBody()) # means the web_page @@ -545,7 +545,7 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional): # image is rendered in web_site context response = self.publish(website.absolute_url_path() + '/' +\ - image_reference+ '/view', credential) + image_reference, credential) self.assertEquals(response.getHeader('content-type'), 'text/html; charset=utf-8') @@ -562,7 +562,7 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional): 'application/vnd.oasis.opendocument.presentation') # Document is rendered in web_site context response = self.publish(website.absolute_url_path() + '/' +\ - document_reference + '/view', credential) + document_reference, credential) self.assertEquals(response.getHeader('content-type'), 'text/html; charset=utf-8') diff --git a/product/ERP5/tests/testICal.py b/product/ERP5/tests/testICal.py index c439b8c312..fff232dce5 100644 --- a/product/ERP5/tests/testICal.py +++ b/product/ERP5/tests/testICal.py @@ -119,7 +119,7 @@ class TestICal(ERP5TypeTestCase): self.assertEquals(feed_dict['DTEND'], event.getCreationDate().HTML4().replace('-','').replace(':','')) self.assertEquals(feed_dict['CREATED'], event.getCreationDate().HTML4().replace('-','').replace(':','')) self.assertEquals(feed_dict['LAST-MODIFIED'], event.getModificationDate().HTML4().replace('-','').replace(':','')) - self.assertEquals(feed_dict['URL'], event.absolute_url() + '/view') + self.assertEquals(feed_dict['URL'], event.absolute_url()) self.assertEquals(feed_dict['UID'], 'uuid%s' % event.getUid()) # there is no description self.assertFalse('DESCRIPTION' in feed_dict.keys()) diff --git a/product/ERP5/tests/testRSS.py b/product/ERP5/tests/testRSS.py index ab67e10d53..1b958e6795 100644 --- a/product/ERP5/tests/testRSS.py +++ b/product/ERP5/tests/testRSS.py @@ -120,7 +120,7 @@ class TestRSS(ERP5TypeTestCase): self.assertEquals(getSubnodeContent(item, 'title'), 'Two') self.assertEquals(getSubnodeContent(item, 'description'), 'Person Two') self.assertEquals(getSubnodeContent(item, 'author'), 'seb') - expected_link = two.absolute_url() + '/view' + expected_link = two.absolute_url() self.assertEquals(getSubnodeContent(item, 'link'), expected_link) self.assertEquals(len(item.getElementsByTagName('pubDate')), 1) # is date formatted correctly? @@ -130,7 +130,7 @@ class TestRSS(ERP5TypeTestCase): self.assertEquals(getSubnodeContent(item, 'title'), 'One') self.assertEquals(getSubnodeContent(item, 'description'), 'Person One') self.assertEquals(getSubnodeContent(item, 'author'), 'seb') - expected_link = one.absolute_url() + '/view' + expected_link = one.absolute_url() self.assertEquals(getSubnodeContent(item, 'link'), expected_link) self.assertEquals(len(item.getElementsByTagName('pubDate')), 1) # is date formatted correctly? @@ -173,7 +173,7 @@ class TestRSS(ERP5TypeTestCase): selection_name='rss_folder_selection')) listbox_link.manage_tales_xmlrpc( - dict(default="python: cell.absolute_url() + '/view'")) + dict(default="python: cell.absolute_url()")) one = self.portal.person_module.one two = self.portal.person_module.two @@ -193,7 +193,7 @@ class TestRSS(ERP5TypeTestCase): self.assertEquals(getSubnodeContent(item, 'title'), 'Two') self.assertEquals(getSubnodeContent(item, 'description'), 'Person Two') self.assertEquals(getSubnodeContent(item, 'author'), 'seb') - expected_link = two.absolute_url() + '/view' + expected_link = two.absolute_url() self.assertEquals(getSubnodeContent(item, 'link'), expected_link) self.assertEquals(len(item.getElementsByTagName('pubDate')), 1) # is date formatted correctly? @@ -203,7 +203,7 @@ class TestRSS(ERP5TypeTestCase): self.assertEquals(getSubnodeContent(item, 'title'), 'One') self.assertEquals(getSubnodeContent(item, 'description'), 'Person One') self.assertEquals(getSubnodeContent(item, 'author'), 'seb') - expected_link = one.absolute_url() + '/view' + expected_link = one.absolute_url() self.assertEquals(getSubnodeContent(item, 'link'), expected_link) self.assertEquals(len(item.getElementsByTagName('pubDate')), 1) # is date formatted correctly? diff --git a/product/ERP5Form/Extensions/ERP5Site_createModuleScribus.py b/product/ERP5Form/Extensions/ERP5Site_createModuleScribus.py index 2552509309..daf56188fb 100644 --- a/product/ERP5Form/Extensions/ERP5Site_createModuleScribus.py +++ b/product/ERP5Form/Extensions/ERP5Site_createModuleScribus.py @@ -391,11 +391,11 @@ def ERP5Site_createModuleScribus(self, # manage redirection URL if not selection_index: - redirect_url = '%s/view?%s' % (portal.absolute_url(), + redirect_url = '%s?%s' % (portal.absolute_url(), 'portal_status_message=Module+Created.' ) else: - redirect_url = '%s/view?selection_index=%s&selection_name=%s&%s' % ( + redirect_url = '%s?selection_index=%s&selection_name=%s&%s' % ( portal.absolute_url(), selection_index, selection_name, diff --git a/product/ERP5Form/Extensions/ERP5Site_updateModuleScribus.py b/product/ERP5Form/Extensions/ERP5Site_updateModuleScribus.py index 2c1926615a..ca4b732dda 100644 --- a/product/ERP5Form/Extensions/ERP5Site_updateModuleScribus.py +++ b/product/ERP5Form/Extensions/ERP5Site_updateModuleScribus.py @@ -404,11 +404,11 @@ def ERP5Site_updateModuleScribus(self, # manage redirection URL if not selection_index: - redirect_url = '%s/view?%s' % (portal.absolute_url(), + redirect_url = '%s?%s' % (portal.absolute_url(), 'portal_status_message=Module+Updated.' ) else: - redirect_url = '%s/view?selection_index=%s&selection_name=%s&%s' % ( + redirect_url = '%s?selection_index=%s&selection_name=%s&%s' % ( portal.absolute_url(), selection_index, selection_name, diff --git a/product/ERP5Form/Extensions/Folder_getWorkflowActionDocumentList.py b/product/ERP5Form/Extensions/Folder_getWorkflowActionDocumentList.py index 8c11a8079d..27eda2877b 100644 --- a/product/ERP5Form/Extensions/Folder_getWorkflowActionDocumentList.py +++ b/product/ERP5Form/Extensions/Folder_getWorkflowActionDocumentList.py @@ -41,7 +41,7 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw): def UrlGetter(doc, state_var): """returns an url method.""" def get_url(*args, **kw): - return '%s/view?reset:int=1&%s=%s&portal_type=%s' % ( + return '%s?reset:int=1&%s=%s&portal_type=%s' % ( self.absolute_url(), state_var, doc.getProperty(state_var), doc.getPortalTypeName()) return get_url diff --git a/product/ERP5Form/ListBox.py b/product/ERP5Form/ListBox.py index e497bf4665..0dd2658533 100644 --- a/product/ERP5Form/ListBox.py +++ b/product/ERP5Form/ListBox.py @@ -2427,12 +2427,11 @@ class ListBoxHTMLRendererLine(ListBoxRendererLine): error = sys.exc_info()) else: try: - url = '%s/view' % ( - # brain.absolute_url() is slow because it invokes - # _aq_dynamic() every time to get brain.REQUEST, - # so we call request.physicalPathToURL() directly - # instead of brain.absolute_url(). - request.physicalPathToURL(brain.getPath()),) + # brain.absolute_url() is slow because it invokes + # _aq_dynamic() every time to get brain.REQUEST, + # so we call request.physicalPathToURL() directly + # instead of brain.absolute_url(). + url = request.physicalPathToURL(brain.getPath()) params = [] if ignore_layout: params.append('ignore_layout:int=1') diff --git a/product/ERP5Form/PlanningBox.py b/product/ERP5Form/PlanningBox.py index dee388f849..f486db5a04 100644 --- a/product/ERP5Form/PlanningBox.py +++ b/product/ERP5Form/PlanningBox.py @@ -2418,7 +2418,7 @@ class Activity: if zone == 1: # active block_color = self.color - block_link = '%s/view' % self.object.absolute_url() + block_link = self.object.absolute_url() else: # passive block_color = '#D1E8FF' diff --git a/product/ERP5Form/tests/testPlanningBox.py b/product/ERP5Form/tests/testPlanningBox.py index 02f0408f96..1ab63d53c4 100644 --- a/product/ERP5Form/tests/testPlanningBox.py +++ b/product/ERP5Form/tests/testPlanningBox.py @@ -104,7 +104,7 @@ class TestPlanningBox(ERP5TypeTestCase): for info in bloc.info.values(): self.assertEquals(info.info,'Title 0') self.assertEquals(info.link , - '%s/foo_module/0/0/view' % self.getPortal().absolute_url()) + '%s/foo_module/0/0' % self.getPortal().absolute_url()) # Check Parent Activities parent = bloc.parent_activity for info in parent.info.values(): diff --git a/product/ERP5Security/ERP5KeyAuthPlugin.py b/product/ERP5Security/ERP5KeyAuthPlugin.py index e638dd9f8f..b9ee13625c 100644 --- a/product/ERP5Security/ERP5KeyAuthPlugin.py +++ b/product/ERP5Security/ERP5KeyAuthPlugin.py @@ -89,7 +89,7 @@ class ERP5KeyAuthPlugin(ERP5UserManager, CookieAuthHelper): """ Key authentification PAS plugin which support key authentication in URL. - <ERP5_Root>/web_page_module/1/view?__ac_key=207221200213146153166 + <ERP5_Root>/web_page_module/1?__ac_key=207221200213146153166 where value of __ac_key contains (encrypted): - proxied (i.e. granting user) username diff --git a/product/ERP5Security/tests/testERP5Security.py b/product/ERP5Security/tests/testERP5Security.py index 3d5825ae00..c1f577f466 100644 --- a/product/ERP5Security/tests/testERP5Security.py +++ b/product/ERP5Security/tests/testERP5Security.py @@ -655,7 +655,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase): self.tic() person_module_path = self.getPersonModule().absolute_url(relative=1) - response = self.publish('/%s/view' % person_module_path, + response = self.publish(person_module_path, basic='guest:guest') self.assertEqual(response.getStatus(), 200) response = self.publish('/%s/first_last/getFirstName' % person_module_path, @@ -709,7 +709,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase): key = erp5_auth_key_plugin.encrypt(reference) self.assertNotEquals(reference, key) self.assertEquals(reference, erp5_auth_key_plugin.decrypt(key)) - base_url = '%s/view' %portal.absolute_url(relative=1) + base_url = portal.absolute_url(relative=1) # without key we are Anonymous User so we should be redirected with proper HTML # status code to login_form @@ -751,7 +751,7 @@ class TestLocalRoleManagement(ERP5TypeTestCase): assignment.open() self.stepTic() - base_url = '%s/view' %portal.absolute_url(relative=1) + base_url = portal.absolute_url(relative=1) # without key we are Anonymous User so we should be redirected with proper HTML # status code to login_form diff --git a/product/ERP5Type/Base.py b/product/ERP5Type/Base.py index 1318fbb374..fad8b5cc78 100644 --- a/product/ERP5Type/Base.py +++ b/product/ERP5Type/Base.py @@ -1704,6 +1704,7 @@ class Base( CopyContainer, """ Generic edit Method for all ERP5 object """ + self.log('edit:%r' % kw) return self._edit(REQUEST=REQUEST, force_update=force_update, reindex_object=reindex_object, restricted=1, **kw) @@ -3057,7 +3058,7 @@ class Base( CopyContainer, return method(container, **kw) # XXX this should not happen, unless the Business Template is broken. - return dict(redirect_url=container.absolute_url() + '/view', + return dict(redirect_url=container.absolute_url(), selection_index=None, selection_name=None) # Hash method diff --git a/product/ERP5Type/Tool/PropertySheetTool.py b/product/ERP5Type/Tool/PropertySheetTool.py index 229e5d89e1..326a1442a6 100644 --- a/product/ERP5Type/Tool/PropertySheetTool.py +++ b/product/ERP5Type/Tool/PropertySheetTool.py @@ -136,7 +136,7 @@ class PropertySheetTool(BaseTool): if REQUEST is not None: return self.REQUEST.RESPONSE.redirect( - '%s/view?portal_status_message=' \ + '%s?portal_status_message=' \ 'Property Sheets successfully imported from filesystem to ZODB.' % \ self.absolute_url()) -- 2.30.9