From 4a77c0118a6eb50c7e7ed0c033c532b1314e2ae7 Mon Sep 17 00:00:00 2001 From: Jean-Paul Smets <jp@nexedi.com> Date: Sun, 28 Mar 2004 23:41:40 +0000 Subject: [PATCH] newTempBase added git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@625 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/Document/__init__.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/product/ERP5Type/Document/__init__.py b/product/ERP5Type/Document/__init__.py index 428b8f46bd..3788522994 100755 --- a/product/ERP5Type/Document/__init__.py +++ b/product/ERP5Type/Document/__init__.py @@ -15,3 +15,16 @@ def addFolder(folder, id, REQUEST=None, **kw): REQUEST['RESPONSE'].redirect( 'manage_main' ) InitializeClass(ERP5Folder.Folder) + +from Products.ERP5Type.Base import TempBase +from Products.PythonScripts.Utility import allow_class +allow_class(TempBase) + +def newTempBase(folder, id, REQUEST=None, **kw): + o = TempBase(id) + o = o.__of__(folder) + if kw is not None: o._edit(force_update=1, **kw) + return o + +from AccessControl import ModuleSecurityInfo +ModuleSecurityInfo('Products.ERP5Type.Document').declarePublic('newTempBase',) -- 2.30.9