From 6f99d9d1049a35cea959c6197a6f31ed1b011a5b Mon Sep 17 00:00:00 2001
From: Tristan Cavelier <tristan.cavelier@tiolive.com>
Date: Mon, 6 Oct 2014 14:38:26 +0200
Subject: [PATCH] Remove useless ooo xml validation in OOoTemplate

Reverts 037a7ed35fc7eeff75b3dff8f5ec6e043f50f662
More details, see 574d45a633955b8ed0fb85a2ed084c3c68e3b8e3
---
 product/ERP5OOo/OOoTemplate.py | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/product/ERP5OOo/OOoTemplate.py b/product/ERP5OOo/OOoTemplate.py
index 244ccf2a02..87aaef9575 100644
--- a/product/ERP5OOo/OOoTemplate.py
+++ b/product/ERP5OOo/OOoTemplate.py
@@ -29,8 +29,6 @@
 
 from types import StringType
 from mimetypes import guess_extension
-from zLOG import LOG , INFO
-from zLOG import PROBLEM
 from OFS.Image import File
 from Products.CMFCore.FSPageTemplate import FSPageTemplate
 from Products.CMFCore.DirectoryView import registerFileExtension, registerMetaType
@@ -40,7 +38,6 @@ from zope.tal.talinterpreter import FasterStringIO
 from Products.ERP5Type import PropertySheet
 from urllib import quote
 from Products.ERP5Type.Globals import InitializeClass, DTMLFile, get_request
-from Products.ERP5Type.Globals import DevelopmentMode
 from Acquisition import aq_base
 from AccessControl import ClassSecurityInfo
 from OOoUtils import OOoBuilder
@@ -541,14 +538,6 @@ class OOoTemplate(ZopePageTemplate):
     else:
       ooo = ooo_builder.render(name=self.title or self.id, source=source)
 
-    if DevelopmentMode:
-      # Validate XML in development mode
-      from Products.ERP5OOo.tests.utils import Validator
-      err_list = Validator().validate(ooo)
-      if err_list:
-        LOG('ERP5OOo', PROBLEM,
-            'Validation of %s failed:\n%s' % (self.getId(), ''.join(err_list)))
-
     extension = None
     mimetype = ooo_builder.getMimeType()
     mimetypes_registry = self.getPortalObject().mimetypes_registry
-- 
2.30.9