Commit fc970047 authored by Romain Courteaud's avatar Romain Courteaud Committed by Sebastien Robin

ERP5Form is now indexable.

parent 8947a112
...@@ -47,6 +47,7 @@ from Acquisition import aq_base ...@@ -47,6 +47,7 @@ from Acquisition import aq_base
from Products.PageTemplates.Expressions import SecureModuleImporter from Products.PageTemplates.Expressions import SecureModuleImporter
from Products.ERP5Type.PsycoWrapper import psyco from Products.ERP5Type.PsycoWrapper import psyco
from Products.ERP5Type.Base import Base
import sys import sys
class FieldValueCacheDict(dict): class FieldValueCacheDict(dict):
...@@ -563,12 +564,13 @@ def create_settings_form(): ...@@ -563,12 +564,13 @@ def create_settings_form():
from OFS.Cache import filterCacheTab from OFS.Cache import filterCacheTab
class ERP5Form(ZMIForm, ZopePageTemplate): class ERP5Form(Base, ZMIForm, ZopePageTemplate):
""" """
A Formulator form with a built-in rendering parameter based A Formulator form with a built-in rendering parameter based
on page templates or DTML. on page templates or DTML.
""" """
meta_type = "ERP5 Form" meta_type = "ERP5 Form"
portal_type = "Form"
icon = "www/Form.png" icon = "www/Form.png"
# Declarative Security # Declarative Security
...@@ -589,7 +591,10 @@ class ERP5Form(ZMIForm, ZopePageTemplate): ...@@ -589,7 +591,10 @@ class ERP5Form(ZMIForm, ZopePageTemplate):
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.SimpleItem) , PropertySheet.SimpleItem
, PropertySheet.Folder
, PropertySheet.CategoryCore
)
# Constructors # Constructors
constructors = (manage_addForm, addERP5Form) constructors = (manage_addForm, addERP5Form)
...@@ -621,6 +626,11 @@ class ERP5Form(ZMIForm, ZopePageTemplate): ...@@ -621,6 +626,11 @@ class ERP5Form(ZMIForm, ZopePageTemplate):
# Special Settings # Special Settings
settings_form = create_settings_form() settings_form = create_settings_form()
manage_main = ZMIForm.manage_main
objectIds = ZMIForm.objectIds
objectItems = ZMIForm.objectItems
objectValues = ZMIForm.objectValues
def __init__(self, id, title, unicode_mode=0, encoding='UTF-8', def __init__(self, id, title, unicode_mode=0, encoding='UTF-8',
stored_encoding='UTF-8'): stored_encoding='UTF-8'):
"""Initialize form. """Initialize form.
......
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