Commit daafd0e6 authored by Arnaud Fontaine's avatar Arnaud Fontaine

WIP: Move all TypeProviders to ERP5Type Product.

parent 78a8f52c
......@@ -37,7 +37,7 @@ from erp5.component.test.testERP5BankingCheckPayment \
import TestERP5BankingCheckPaymentMixin
from erp5.component.test.testERP5BankingMoneyDeposit \
import TestERP5BankingMoneyDepositMixin
from Products.ERP5Form.PreferenceTool import Priority
from Products.ERP5Type.Tool.PreferenceTool import Priority
# Needed in order to have a log file inside the current folder
os.environ['EVENT_LOG_FILE'] = os.path.join(os.getcwd(), 'zLOG.log')
......
......@@ -45,7 +45,7 @@ from Tool import IdTool, TemplateTool,\
TestTool, DomainTool, AlarmTool,\
TrashTool, ContributionTool, NotificationTool, PasswordTool,\
GadgetTool, ContributionRegistryTool, IntrospectionTool,\
AcknowledgementTool, SolverTool,\
AcknowledgementTool,\
UrlRegistryTool, InterfaceTool,\
CertificateAuthorityTool, InotifyTool
from Document import PythonScript, SQLMethod
......@@ -65,7 +65,6 @@ portal_tools = ( IdTool.IdTool,
ContributionRegistryTool.ContributionRegistryTool,
IntrospectionTool.IntrospectionTool,
AcknowledgementTool.AcknowledgementTool,
SolverTool.SolverTool,
UrlRegistryTool.UrlRegistryTool,
CertificateAuthorityTool.CertificateAuthorityTool,
InotifyTool.InotifyTool,
......
......@@ -38,7 +38,7 @@ from Products.ERP5Type.tests.utils import reindex
from Products.DCWorkflow.DCWorkflow import ValidationFailed
from AccessControl.SecurityManagement import newSecurityManager
from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5Form.PreferenceTool import Priority
from Products.ERP5Type.Tool.PreferenceTool import Priority
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
......
......@@ -33,7 +33,7 @@ import unittest
from unittest import expectedFailure
from AccessControl.SecurityManagement import newSecurityManager
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Form.PreferenceTool import Priority
from Products.ERP5Type.Tool.PreferenceTool import Priority
class TestTemplate(ERP5TypeTestCase):
......
......@@ -31,7 +31,7 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, Constraint
from Products.ERP5Type.Core.Folder import Folder
from Products.CMFCore.utils import getToolByName
from Products.ERP5Form.PreferenceTool import PreferenceTool
from Products.ERP5Type.Tool.PreferenceTool import PreferenceTool
class Priority:
""" names for priorities
......
......@@ -47,7 +47,6 @@ import OOoChart, PDFTemplate, Report, PDFForm, ParallelListField
import PlanningBox, POSBox, FormBox, EditorField, ProxyField, DurationField
import RelationField, ImageField, MultiRelationField, MultiLinkField, InputButtonField
import CaptchaField
import PreferenceTool
from Products.Formulator.FieldRegistry import FieldRegistry
from Products.Formulator import StandardFields, HelperFields
......@@ -56,7 +55,7 @@ from Products.CMFCore.utils import registerIcon
object_classes = ( Form.ERP5Form, FSForm.ERP5FSForm, PDFTemplate.PDFTemplate,
Report.ERP5Report, PDFForm.PDFForm)
portal_tools = ( SelectionTool.SelectionTool, PreferenceTool.PreferenceTool )
portal_tools = ( SelectionTool.SelectionTool, )
content_classes = ( )
content_constructors = ()
......
......@@ -39,7 +39,7 @@ from DateTime import DateTime
from Products.ERP5Type.tests.testERP5Type import PropertySheetTestCase
from Products.ERP5Type.tests.utils import createZODBPythonScript
from Products.ERP5Form.PreferenceTool import Priority
from Products.ERP5Type.Tool.PreferenceTool import Priority
# should match what's configured by default in HtmlStylePreference
default_large_image_height = 768
......
......@@ -61,7 +61,7 @@ from Products.CMFCore.utils import getToolByName
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl import getSecurityManager
from Products.ERP5.Document.Document import NotConvertedError
from Products.ERP5Form.PreferenceTool import Priority
from Products.ERP5Type.Tool.PreferenceTool import Priority
from Products.ERP5Type.tests.utils import createZODBPythonScript
from Products.ERP5Type.Globals import get_request
import os
......
......@@ -27,7 +27,7 @@
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5OOo.tests.testDms import makeFileUpload
from Products.ERP5Form.PreferenceTool import Priority
from Products.ERP5Type.Tool.PreferenceTool import Priority
class TestOOoConversionServerRetry(ERP5TypeTestCase):
......
......@@ -26,14 +26,14 @@
#
##############################################################################
from Products.ERP5Form.Document.PreferenceType import PreferenceType
from Products.ERP5Type.Core.PreferenceType import PreferenceType
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions
from Products.ERP5Type.dynamic.accessor_holder import AccessorHolderType
from Products.ERP5Type.Accessor.TypeDefinition import list_types
from Products.ERP5Type.Utils import convertToUpperCase
from Products.ERP5Form.PreferenceTool import PreferenceMethod
from Products.ERP5Type.Tool.PreferenceTool import PreferenceMethod
def _generatePreferenceToolAccessorHolder(portal_type_name,
accessor_holder_list):
......
......@@ -299,7 +299,7 @@ class ERP5Site(ResponseHeaderGenerator, FolderMixIn, CMFSite, CacheCookieMixin):
if pref.getPreferenceState() == 'global':
break
else:
from Products.ERP5Form.PreferenceTool import Priority
from Products.ERP5Type.Tool.PreferenceTool import Priority
pref = preference_tool.newContent(id, portal_type,
priority=Priority.SITE, title='Default ' + portal_type)
pref.enable()
......
......@@ -40,7 +40,6 @@ from Products.ERP5Type import Permissions
from Products.ERP5Type.Cache import CachingMethod
from Products.ERP5Type.Utils import convertToUpperCase
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from Products.ERP5Form import _dtmldir
from BTrees.OIBTree import OIBTree
_marker = object()
......@@ -105,10 +104,6 @@ class PreferenceTool(BaseTool):
aq_preference_generated = False
security.declareProtected(
Permissions.ManagePortal, 'manage_overview' )
manage_overview = DTMLFile( 'explainPreferenceTool', _dtmldir )
security.declarePrivate('manage_afterAdd')
def manage_afterAdd(self, item, container) :
""" init the permissions right after creation """
......
......@@ -90,7 +90,8 @@ def initialize( context ):
# Import Product Components
from Tool import (CacheTool, MemcachedTool, SessionTool,
TypesTool, WebServiceTool, PropertySheetTool,
ComponentTool, CategoryTool)
ComponentTool, CategoryTool,
PreferenceTool, SolverTool)
import Document
from Base import Base
import XMLObject
......@@ -110,7 +111,9 @@ def initialize( context ):
WebServiceTool.WebServiceTool,
PropertySheetTool.PropertySheetTool,
ComponentTool.ComponentTool,
CategoryTool.CategoryTool
CategoryTool.CategoryTool,
PreferenceTool.PreferenceTool,
SolverTool.SolverTool
)
# Do initialization step
initializeProduct(context, this_module, globals(),
......
......@@ -12,3 +12,4 @@ from role_provider import ILocalRoleAssignor, ILocalRoleGenerator
from types_tool import ITypesTool, ITypeProvider
from property_recordable import IPropertyRecordable
from predicate import IPredicate
from delivery_solver_factory import IDeliverySolverFactory
......@@ -59,7 +59,7 @@ from Testing.ZopeTestCase import PortalTestCase, user_name
from Products.DCWorkflow.DCWorkflow import ValidationFailed
from Products.PythonScripts.PythonScript import PythonScript
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5Form.PreferenceTool import Priority
from Products.ERP5Type.Tool.PreferenceTool import Priority
from zLOG import LOG, DEBUG
from Products.ERP5Type.Utils import convertToUpperCase
from Products.ERP5Type.tests.backportUnittest import SetupSiteError
......
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