From 3f4c75919c7b2b6a5b2a7b72a80b37adc39ec1d3 Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Sat, 3 Jul 2010 00:50:58 +0300 Subject: [PATCH] Document: fix creating of node_res_obj without data . bzr revid: p_christ@hol.gr-20100702215058-5h49fw2dzox3022h --- addons/document/nodes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/document/nodes.py b/addons/document/nodes.py index ca223bb9486..d9ec0a3b607 100644 --- a/addons/document/nodes.py +++ b/addons/document/nodes.py @@ -820,7 +820,8 @@ class node_res_obj(node_class): fil_id = fil_obj.create(cr, uid, val, context=ctx) fil = fil_obj.browse(cr, uid, fil_id, context=ctx) fnode = node_file(path, self, self.context, fil) - fnode.set_data(cr, data, fil) + if data is not None: + fnode.set_data(cr, data, fil) return fnode def _get_ttag(self,cr):