[Erp5-report] r14465 - /erp5/trunk/products/ERP5/Document/Document.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri May 11 14:51:48 CEST 2007
Author: ivan
Date: Fri May 11 14:51:48 2007
New Revision: 14465
URL: http://svn.erp5.org?rev=14465&view=rev
Log:
Revert to r14448. Add missing import. Reindex both new created doc and merged one.
Modified:
erp5/trunk/products/ERP5/Document/Document.py
Modified: erp5/trunk/products/ERP5/Document/Document.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Document.py?rev=14465&r1=14464&r2=14465&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Document.py (original)
+++ erp5/trunk/products/ERP5/Document/Document.py Fri May 11 14:51:48 2007
@@ -42,6 +42,7 @@
from Products.ERP5Type.Utils import convertToUpperCase, convertToMixedCase
from Products.ERP5.Document.Url import UrlMixIn
from Products.ERP5.Tool.ContributionTool import MAX_REPEAT
+from AccessControl import Unauthorized
_MARKER = []
VALID_ORDER_KEY_LIST = ('user_login', 'content', 'file_name', 'input')
@@ -723,6 +724,7 @@
based on a suffix
"""
# Change the document reference
+ catalog = getToolByName(self.getPortalObject(), 'portal_catalog')
reference = self.getReference() + '-%s-' % suffix + '%s'
ref_count = 0
kw = dict(portal_type=self.getPortalDocumentTypeList())
@@ -987,10 +989,6 @@
# Prepare the content edit parameters - portal_type should not be changed
kw.pop('portal_type', None)
- # if we still do not have reference extracted try to use group_reference_path
- # XXX: We must catch inconsistent 're' patterns earlier and raise an exception
- if kw.get('reference', None) is None:
- kw['reference'] = kw.pop('group_reference_path', None)
# Try not to invoke an automatic transition here
self._edit(**kw)
# Finish ingestion by calling method
@@ -998,7 +996,9 @@
self.reindexObject()
# Revision merge is tightly coupled
# to metadata discovery - refer to the documentation of mergeRevision method
- return self.mergeRevision()
+ merged_doc = self.mergeRevision()
+ merged_doc.reindexObject()
+ return merged_doc
security.declareProtected(Permissions.ModifyPortalContent, 'finishIngestion')
def finishIngestion(self):
More information about the Erp5-report
mailing list