From 50b2e324a900b1e4fbaf1d834926acd78fe238a6 Mon Sep 17 00:00:00 2001
From: Nicolas Delaby <nicolas@nexedi.com>
Date: Mon, 11 Feb 2008 10:36:11 +0000
Subject: [PATCH] Convert unicode in utf-8 for properties in role definition

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

diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py
index a9ea979a80..ebadb3d803 100644
--- a/product/ERP5/Document/BusinessTemplate.py
+++ b/product/ERP5/Document/BusinessTemplate.py
@@ -2384,6 +2384,8 @@ class PortalTypeRolesTemplateItem(BaseTemplateItem):
     bta.addFolder(name=root_path)
     for key in self._objects.keys():
       xml_data = self.generateXml(key)
+      if isinstance(xml_data, unicode):
+        xml_data = xml_data.encode('utf-8')
       name = key.split('/', 1)[1]
       bta.addObject(obj=xml_data, name=name, path=root_path)
 
-- 
2.30.9