diff --git a/product/ERP5/Document/Document.py b/product/ERP5/Document/Document.py
index a020fed41f65d1fc7cb3ec8a97dccc099c12e72b..56dab9a34935047eeda456ed6a5612eddfba8c26 100644
--- a/product/ERP5/Document/Document.py
+++ b/product/ERP5/Document/Document.py
@@ -787,3 +787,14 @@ class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixin,
     if hasattr(aq_base(container), 'isIndexContent'):
       return container.isIndexContent(self)
     return False
+
+  # backward compatibility
+  def getFilename(self, default=None):
+    if self.hasFilename():
+      return self._baseGetFilename(default)
+    elif self.hasSourceReference():
+      filename = self._baseGetSourceReference(default)
+      self._setFilename(filename)
+      return filename
+    else:
+      return default