From 5b2fa0a84f6c771536507e4a89f511055a618ea6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com>
Date: Tue, 2 Sep 2014 13:32:39 +0200
Subject: [PATCH] putting object from integration module into thrash does not
 work as it might try to get all from web-services

---
 product/ERP5/Document/BusinessTemplate.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py
index cd24ec5e4a..07a716939d 100644
--- a/product/ERP5/Document/BusinessTemplate.py
+++ b/product/ERP5/Document/BusinessTemplate.py
@@ -862,6 +862,10 @@ class ObjectTemplateItem(BaseTemplateItem):
     """
       Backup the object in portal trash if necessery and return its subobjects
     """
+    if "portal_integrations" in container_path and "module" in object_id:
+      # XXX It is impossible to backup integration module as
+      # it will call the request and try to get remote data
+      return
     p = self.getPortalObject()
     if trashbin is None: # must return subobjects
       subobject_dict = {}
-- 
2.30.9