From 9d9c75e64d668a2eaaa572799168e747058213e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com>
Date: Mon, 7 Dec 2009 10:44:35 +0000
Subject: [PATCH] save_and_remove action must also be taken into account when
 backuping objects, as remove is call after installation during bt's
 installation process

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31112 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/BusinessTemplate.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py
index e08c0ac2bb..fbf1477767 100644
--- a/product/ERP5/Document/BusinessTemplate.py
+++ b/product/ERP5/Document/BusinessTemplate.py
@@ -799,7 +799,7 @@ class ObjectTemplateItem(BaseTemplateItem):
         subobjects_dict[subobject_id] = subobject_copy
       return subobjects_dict
     # XXX btsave is for backward compatibility
-    if action == 'backup' or action == 'btsave':
+    if action == 'backup' or action == 'btsave' or action == 'save_and_remove':
       subobjects_dict = self.portal_trash.backupObject(trashbin, container_path, object_id, save=1, **kw)
     elif action == 'install':
       subobjects_dict = self.portal_trash.backupObject(trashbin, container_path, object_id, save=0, **kw)
-- 
2.30.9