Commit d1548b59 authored by Mayoro Diagne's avatar Mayoro Diagne

Use specific name according to portal_type, Document Procedure Definition for...

Use specific name according to portal_type, Document Procedure Definition for portal_type and View for Application

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36957 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4edf6f96
...@@ -428,10 +428,11 @@ class PDFTypeInformation(ERP5TypeInformation): ...@@ -428,10 +428,11 @@ class PDFTypeInformation(ERP5TypeInformation):
scribus_parser = ScribusParser(import_scribus_file) scribus_parser = ScribusParser(import_scribus_file)
import_scribus_file.close() import_scribus_file.close()
return scribus_parser.getERP5PropertyDict() return scribus_parser.getERP5PropertyDict()
generateParsedScribus = CachingMethod(generateParsedScribus, generateParsedScribus = CachingMethod(generateParsedScribus,
('PDFTypeInformation_generateParsedScribus', ('PDFTypeInformation_generateParsedScribus',
md5.new(scribus_form.getData()).digest()), md5.new(scribus_form.getData()).digest()),
cache_factory='dms_cache_factory') cache_factory='erp5_content_long')
return generateParsedScribus() return generateParsedScribus()
def getERP5Form(self): def getERP5Form(self):
...@@ -594,7 +595,7 @@ class PDFTypeInformation(ERP5TypeInformation): ...@@ -594,7 +595,7 @@ class PDFTypeInformation(ERP5TypeInformation):
generateERP5FormCSS = CachingMethod(generateERP5FormCSS, generateERP5FormCSS = CachingMethod(generateERP5FormCSS,
('PDFTypeInformation_generateERP5FormCSS', ('PDFTypeInformation_generateERP5FormCSS',
md5.new(self.getDefaultScribusFormValue().getData()).digest()), md5.new(self.getDefaultScribusFormValue().getData()).digest()),
cache_factory='dms_cache_factory') cache_factory='erp5_content_long')
self.REQUEST.RESPONSE.setHeader('Content-Type', 'text/css') self.REQUEST.RESPONSE.setHeader('Content-Type', 'text/css')
return generateERP5FormCSS() return generateERP5FormCSS()
...@@ -702,9 +703,13 @@ class PDFTypeInformation(ERP5TypeInformation): ...@@ -702,9 +703,13 @@ class PDFTypeInformation(ERP5TypeInformation):
portal_type_name = self.getId().replace(' ','') portal_type_name = self.getId().replace(' ','')
pdf_form_name ='%s_view%sAsPdf' % (portal_type_name, portal_type_name) pdf_form_name ='%s_view%sAsPdf' % (portal_type_name, portal_type_name)
action_list = ERP5TypeInformation.getCacheableActionList(self) action_list = ERP5TypeInformation.getCacheableActionList(self)
if self.getPortalType() == "EGov Type":
name = 'View'
else:
name = 'Document Procedure Definition'
return list(action_list) + [ return list(action_list) + [
CacheableAction(id='view', CacheableAction(id='form',
name='Form', name=name,
description='', description='',
category='object_view', category='object_view',
priority=0.5, priority=0.5,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment