From 70b079724170f62c3d5497b4da4c877131861cbf Mon Sep 17 00:00:00 2001
From: Yusei Tahara <yusei@nexedi.com>
Date: Fri, 17 Sep 2010 10:08:03 +0000
Subject: [PATCH] "office:*" attributes may not exist.

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

diff --git a/product/ERP5OOo/FormPrintout.py b/product/ERP5OOo/FormPrintout.py
index 20a4c9b7ec..8a03da2284 100644
--- a/product/ERP5OOo/FormPrintout.py
+++ b/product/ERP5OOo/FormPrintout.py
@@ -807,7 +807,7 @@ class ODFStrategy(Implicit):
     # such as '0.0', '$0'
     attrib = column.attrib
     for key in attrib.keys():
-      if key.startswith("{%s}" % column.nsmap['office']):
+      if 'office' in column.nsmap and key.startswith("{%s}" % column.nsmap['office']):
         del attrib[key]
     column.text = None
     [column.remove(child) for child in column]
-- 
2.30.9