diff --git a/product/ERP5OOo/FormPrintout.py b/product/ERP5OOo/FormPrintout.py index 381063cb2ab0bcacdc8fca2f4d88d24503c31b89..845054eba03d1a620d8fb2f6d4d3a77e70756f6d 100644 --- a/product/ERP5OOo/FormPrintout.py +++ b/product/ERP5OOo/FormPrintout.py @@ -957,5 +957,7 @@ class ODGStrategy(ODFStrategy): for target_node in node_list: attr_dict = {} attr_dict.update(target_node.attrib) - new_node = field.render_odt(attr_dict=attr_dict) - parent_node = target_node.getparent().replace(target_node, new_node) + new_node = field.render_odg(attr_dict=attr_dict) + if new_node is not None: # XXX None node exists because render_odg is + # not yet writed for all fields, but it should + parent_node = target_node.getparent().replace(target_node, new_node)