From 8c0d9db94653df9a3cb5e0e7f0eea2571155d9b9 Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Thu, 1 Jul 2004 13:32:50 +0000 Subject: [PATCH] modifications for the export of CPSForum git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1114 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5CPS/CPSCorePatch.py | 39 +++++++++++++++++++++++++++++ product/ERP5CPS/CPSDocumentPatch.py | 1 - 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/product/ERP5CPS/CPSCorePatch.py b/product/ERP5CPS/CPSCorePatch.py index 7ecd76ca44..6217518021 100755 --- a/product/ERP5CPS/CPSCorePatch.py +++ b/product/ERP5CPS/CPSCorePatch.py @@ -67,6 +67,10 @@ class PatchedProxyBase(ProxyBase): 'id' : 'default_language', 'type' : 'string' }, + { + 'id' : 'default_language', + 'type' : 'string' + }, { 'id' : 'sync_language_revisions', # XXX we have to manage dict type 'type' : 'dict' @@ -112,3 +116,38 @@ ProxyBase.getSyncRepoHistory = PatchedProxyBase.getSyncRepoHistory ProxyBase.setSyncRepoHistory = PatchedProxyBase.setSyncRepoHistory ProxyFolder.asXML = Folder.asXML + +from Products.CPSCore.CPSBase import CPSBaseDocument + +class PatchedCPSBaseDocument(CPSBaseDocument): + + security = ClassSecurityInfo() + + + def _propertyMap(self): + """ + Returns fake property sheet + """ + property_sheet = [] + + property_sheet += self._properties + + property_sheet += [ + { + 'id' : 'Title', + 'type' : 'string' + }, + { + 'id' : 'description', + 'type' : 'string' + }, + ] + return tuple(property_sheet + list(getattr(self, '_local_properties', ()))) + +CPSBaseDocument.getPath = Base.getPath +CPSBaseDocument.getProperty = Base.getProperty +CPSBaseDocument._setProperty = Base._setProperty +CPSBaseDocument._edit = Base._edit +CPSBaseDocument.asXML = Base.asXML +CPSBaseDocument._propertyMap = PatchedCPSBaseDocument._propertyMap + diff --git a/product/ERP5CPS/CPSDocumentPatch.py b/product/ERP5CPS/CPSDocumentPatch.py index 4645be13a0..c00e0090a5 100755 --- a/product/ERP5CPS/CPSDocumentPatch.py +++ b/product/ERP5CPS/CPSDocumentPatch.py @@ -229,4 +229,3 @@ CPSDocument.setProperty = Base.setProperty CPSDocument._setProperty = PatchedCPSDocument._setProperty CPSDocument.asXML = Base.asXML CPSDocument._edit = PatchedCPSDocument._edit -CPSDocument.edit = PatchedCPSDocument._edit -- 2.30.9