[Erp5-report] r14526 - /erp5/trunk/products/ERP5/Document/Document.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon May 21 16:04:13 CEST 2007
Author: bartek
Date: Mon May 21 16:04:12 2007
New Revision: 14526
URL: http://svn.erp5.org?rev=14526&view=rev
Log:
set source_reference using kw mechanism (otherwise it is set only on the first upload, then it is always overwritten by 'input' values)
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=14526&r1=14525&r2=14526&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Document.py (original)
+++ erp5/trunk/products/ERP5/Document/Document.py Mon May 21 16:04:12 2007
@@ -959,9 +959,6 @@
user_login - this is a login string of a person; can be None if the user is
currently logged in, then we'll get him from session
"""
- if file_name is not None:
- # filename is often undefined....
- self._setSourceReference(file_name)
# Preference is made of a sequence of 'user_login', 'content', 'file_name', 'input'
method = self._getTypeBasedMethod('getPreferredDocumentMetadataDiscoveryOrderList',
fallback_script_id = 'Document_getPreferredDocumentMetadataDiscoveryOrderList')
@@ -987,6 +984,9 @@
if result is not None:
kw.update(result)
+ if file_name is not None:
+ # filename is often undefined....
+ kw['source_reference'] = file_name
# Prepare the content edit parameters - portal_type should not be changed
kw.pop('portal_type', None)
# Try not to invoke an automatic transition here
More information about the Erp5-report
mailing list