From 385aaa2467e8b3f355adba2c5d192a45e33b78ba Mon Sep 17 00:00:00 2001 From: "P. Christeas" Date: Mon, 12 Jul 2010 22:28:08 +0300 Subject: [PATCH] Document API: define node_class.create_child() and collection Allow clients to call those fn()s for the wrong nodes, just to get an NotImplementedError. bzr revid: p_christ@hol.gr-20100712192808-d0x2qud1p5q26fb8 --- addons/document/nodes.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/addons/document/nodes.py b/addons/document/nodes.py index d710db37c15..d40886846aa 100644 --- a/addons/document/nodes.py +++ b/addons/document/nodes.py @@ -306,7 +306,17 @@ class node_class(object): Move operations, as instructed from APIs (eg. request from DAV) could use this function. """ - raise NotImplementedError + raise NotImplementedError() + + def create_child(self, cr, path, data=None): + """ Create a regular file under this node + """ + raise NotImplementedError() + + def create_child_collection(self, cr, objname): + """ Create a child collection (directory) under self + """ + raise NotImplementedError() def rm(self, cr): raise RuntimeError("Not Implemented")