Commit 93f6fe38 authored by Nicolas Dumazet's avatar Nicolas Dumazet

handle accessor generation on the Preference Tool


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42868 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 28284adb
...@@ -32,6 +32,7 @@ import inspect ...@@ -32,6 +32,7 @@ import inspect
from types import ModuleType from types import ModuleType
from dynamic_module import registerDynamicModule from dynamic_module import registerDynamicModule
from accessor_holder import _generateBaseAccessorHolder, _generatePreferenceToolAccessorHolder
from Products.ERP5Type.Base import _aq_reset, Base from Products.ERP5Type.Base import _aq_reset, Base
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
...@@ -287,6 +288,14 @@ def generatePortalTypeClass(site, portal_type_name): ...@@ -287,6 +288,14 @@ def generatePortalTypeClass(site, portal_type_name):
erp5.accessor_holder, erp5.accessor_holder,
property_sheet_tool) property_sheet_tool)
# XXX a hook to add per-portal type accessor holders maybe?
if portal_type_name == "Preference Tool":
accessor_holder = _generatePreferenceToolAccessorHolder(
site,
accessor_holder_list,
erp5.accessor_holder)
accessor_holder_list.insert(0, accessor_holder)
base_category_set = set(base_category_list) base_category_set = set(base_category_list)
for accessor_holder in accessor_holder_list: for accessor_holder in accessor_holder_list:
base_category_set.update(accessor_holder._categories) base_category_set.update(accessor_holder._categories)
......
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