From 387f274805e421192775fb84ced89a2216f3fb9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20G=C3=B3rny?= <bartek@gorny.edu.pl> Date: Fri, 13 Oct 2006 20:04:32 +0000 Subject: [PATCH] handling content_type in a property_sheet git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10712 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5OOo/Document/DMSFile.py | 3 --- product/ERP5OOo/Document/OOoDocument.py | 1 - product/ERP5OOo/PropertySheet/DMSFile.py | 5 +++++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/product/ERP5OOo/Document/DMSFile.py b/product/ERP5OOo/Document/DMSFile.py index 80b671fa80..d02267761a 100644 --- a/product/ERP5OOo/Document/DMSFile.py +++ b/product/ERP5OOo/Document/DMSFile.py @@ -162,9 +162,6 @@ class DMSFile(XMLObject,File): searchable_attrs=('title','description','id','reference','version', 'short_title','keywords','subject','source_reference','source_project_title') - # XXX a hack-around untill JPS's Data property sheets stops to break thins :) - content_type='application/unknown' - ### Content indexing methods security.declareProtected(Permissions.View, 'getSearchableText') def getSearchableText(self, md=None): diff --git a/product/ERP5OOo/Document/OOoDocument.py b/product/ERP5OOo/Document/OOoDocument.py index 8605d7ebb1..cd2b1ba7d8 100644 --- a/product/ERP5OOo/Document/OOoDocument.py +++ b/product/ERP5OOo/Document/OOoDocument.py @@ -99,7 +99,6 @@ class OOoDocument(DMSFile, CachingMixin): property_sheets = ( PropertySheet.Base , PropertySheet.CategoryCore , PropertySheet.DublinCore - , PropertySheet.Data , PropertySheet.Version , PropertySheet.Reference , PropertySheet.Document diff --git a/product/ERP5OOo/PropertySheet/DMSFile.py b/product/ERP5OOo/PropertySheet/DMSFile.py index a88bce06ad..19a01698ae 100644 --- a/product/ERP5OOo/PropertySheet/DMSFile.py +++ b/product/ERP5OOo/PropertySheet/DMSFile.py @@ -31,6 +31,11 @@ class DMSFile: """ _properties = ( + { 'id' : 'content_type', + 'description' : 'content type', + 'type' : 'string', + 'default' : 'application/unknown', + 'mode' : 'w' }, ) _categories = ('destination','similar','predecessor','successor','source_project','publication_section','classification', -- 2.30.9