[Erp5-report] r35503 rafael - /erp5/trunk/products/ERP5OOo/Document/OOoDocument.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu May 20 19:53:40 CEST 2010
Author: rafael
Date: Thu May 20 19:53:39 2010
New Revision: 35503
URL: http://svn.erp5.org?rev=35503&view=rev
Log:
According to portal_contributions API a file and file_name should be provided to create a new document.
Modified:
erp5/trunk/products/ERP5OOo/Document/OOoDocument.py
Modified: erp5/trunk/products/ERP5OOo/Document/OOoDocument.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/Document/OOoDocument.py?rev=35503&r1=35502&r2=35503&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/Document/OOoDocument.py [utf8] (original)
+++ erp5/trunk/products/ERP5OOo/Document/OOoDocument.py [utf8] Thu May 20 19:53:39 2010
@@ -401,6 +401,8 @@
else:
temp_image = self.portal_contributions.newContent(
portal_type='Image',
+ file=cStringIO.StringIO(),
+ file_name=self.getId(),
temp_object=1)
temp_image._setData(data)
mime, data = temp_image.convert(original_format, display=display)
More information about the Erp5-report
mailing list