Commit 56edeedc authored by Nicolas Dumazet's avatar Nicolas Dumazet

replace _aq_reset calls/resetDynamicDocuments calls with...

replace _aq_reset calls/resetDynamicDocuments calls with resetDynamicDocumentsOnceAtTransactionBoundary calls


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42859 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6f5bf62b
......@@ -61,7 +61,6 @@ from Products.ERP5Type.Utils import readLocalDocument, writeLocalDocument, getLo
from Products.ERP5Type.Utils import readLocalConstraint, writeLocalConstraint, getLocalConstraintList
from Products.ERP5Type.InitGenerator import getProductDocumentPathList
from Products.ERP5Type.Base import _aq_reset
from Products.ERP5Type.Base import newTempDocumentationHelper
from Products.ERP5Type import allowClassTool
......@@ -222,7 +221,7 @@ if allowClassTool():
def reimport(self, status, class_id):
if status and self.__importer is not None:
self.__importer(class_id)
_aq_reset()
self.portal_types.resetDynamicDocumentsOnceAtTransactionBoundary()
def _getOb(self, key, default=_MARKER ):
if key in self.objectIds():
......@@ -550,7 +549,7 @@ class %s(XMLObject):
# Clear object cache and reset _aq_dynamic after reload
self._clearCache()
_aq_reset()
self.portal_types.resetDynamicDocumentsOnceAtTransactionBoundary()
if REQUEST is not None and class_path is None:
REQUEST.RESPONSE.redirect('%s/manage_editDocumentForm?class_id=%s&manage_tabs_message=Document+Reloaded+Successfully' % (self.absolute_url(), class_id))
......@@ -661,7 +660,7 @@ class %s:
# Reset _aq_dynamic after reload
# There is no need to reset the cache in this case because
# XXX it is not sure however that class defined propertysheets will be updated
_aq_reset()
self.portal_types.resetDynamicDocumentsOnceAtTransactionBoundary()
if REQUEST is not None:
REQUEST.RESPONSE.redirect('%s/manage_editPropertySheetForm?class_id=%s&manage_tabs_message=PropertySheet+Reloaded+Successfully' % (self.absolute_url(), class_id))
......@@ -928,7 +927,7 @@ class %s(Constraint):
# Reset _aq_dynamic after reload
# There is no need to reset the cache in this case because
# XXX it is not sure however that class defined propertysheets will be updated
_aq_reset()
self.portal_types.resetDynamicDocumentsOnceAtTransactionBoundary()
if REQUEST is not None:
REQUEST.RESPONSE.redirect('%s/manage_editConstraintForm?class_id=%s&manage_tabs_message=Constraint+Reloaded+Successfully' % (self.absolute_url(), class_id))
......
......@@ -155,8 +155,9 @@ class TranslationProviderBase(object):
if new_domain_name != prop_object.getDomainName():
prop_object.edit(domain_name=new_domain_name)
from Products.ERP5Type.Base import _aq_reset
_aq_reset() # Reset accessor cache
# Reset accessor cache
types_tool = self.getPortalObject().portal_types
types_tool.resetDynamicDocumentsOnceAtTransactionBoundary()
if REQUEST is not None:
return self.manage_editTranslationForm(REQUEST, manage_tabs_message=
......
......@@ -76,8 +76,11 @@ class PropertySheetTestCase(ERP5TypeTestCase):
if psheet in property_sheet_set:
property_sheet_set.remove(psheet)
ti._setTypePropertySheetList(list(property_sheet_set))
# this is useful if somehow the interaction workflows is set
# wrongly. If the interaction has been called already it does nothing,
# but in the other hand, if isolates the test "just in case"
ttool.resetDynamicDocumentsOnceAtTransactionBoundary()
transaction.commit()
ttool.resetDynamicDocuments()
super(PropertySheetTestCase, self).tearDown()
def _addProperty(self, portal_type_name, property_sheet_id, property_id, **kw):
......
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