From edeefc122e0fc9d15ae8172b53c07b82d1102750 Mon Sep 17 00:00:00 2001
From: Arnaud Fontaine <arnaud.fontaine@nexedi.com>
Date: Wed, 2 Feb 2011 08:07:48 +0000
Subject: [PATCH] Perform migration of bt-specific Property Sheets from
 filesystem to ZODB (code previously commented by r42901 but at that time the
 migration was not performed because of _perform_migration being set to False
 and then enabled in r42902)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42922 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/BusinessTemplate.py | 34 +++++++++++------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py
index 34586ce97c..dd0fa238f0 100644
--- a/product/ERP5/Document/BusinessTemplate.py
+++ b/product/ERP5/Document/BusinessTemplate.py
@@ -3681,23 +3681,23 @@ class PropertySheetTemplateItem(DocumentTemplateItem,
     if not self._perform_migration:
       return DocumentTemplateItem.install(self, context, **kw)
 
-#    # With format 0 of Business Template, the objects are stored in
-#    # '_archive' whereas they are stored in '_objects' with format
-#    # version 1
-#    bt_format_version = context.getTemplateFormatVersion()
-#
-#    if bt_format_version == 0 and \
-#       not self._is_already_migrated(self._archive.keys()):
-#      self._migrateAllFilesystemPropertySheets(context,
-#                                               self._archive,
-#                                               self._objects,
-#                                               kw.get('object_to_update'))
-#    elif bt_format_version == 1 and \
-#         not self._is_already_migrated(self._objects.keys()):
-#      self._migrateAllFilesystemPropertySheets(context,
-#                                               self._objects,
-#                                               self._archive,
-#                                               kw.get('object_to_update'))
+    # With format 0 of Business Template, the objects are stored in
+    # '_archive' whereas they are stored in '_objects' with format
+    # version 1
+    bt_format_version = context.getTemplateFormatVersion()
+
+    if bt_format_version == 0 and \
+       not self._is_already_migrated(self._archive.keys()):
+      self._migrateAllFilesystemPropertySheets(context,
+                                               self._archive,
+                                               self._objects,
+                                               kw.get('object_to_update'))
+    elif bt_format_version == 1 and \
+         not self._is_already_migrated(self._objects.keys()):
+      self._migrateAllFilesystemPropertySheets(context,
+                                               self._objects,
+                                               self._archive,
+                                               kw.get('object_to_update'))
 
     return ObjectTemplateItem.install(self, context, **kw)
 
-- 
2.30.9