Commit 9af7c3bd authored by Arnaud Fontaine's avatar Arnaud Fontaine

Move Predicate.py from ERP5.Document to ERP5Type.Core as it will later

be needed to implement constraints in ZODB Property Sheets



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39337 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ad1fab90
......@@ -32,7 +32,7 @@ will replace DeliveryRule.
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.mixin.rule import RuleMixin
from Products.ERP5.mixin.movement_collection_updater import \
MovementCollectionUpdaterMixin
......
......@@ -32,7 +32,7 @@ will replace DeliveryRule.
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.mixin.rule import RuleMixin
from Products.ERP5.mixin.movement_collection_updater import \
MovementCollectionUpdaterMixin
......
......@@ -32,7 +32,7 @@ will replace InvoiceRule.
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.mixin.rule import RuleMixin
from Products.ERP5.mixin.movement_collection_updater import \
MovementCollectionUpdaterMixin
......
......@@ -32,7 +32,7 @@ will replace InvoicingRule.
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.mixin.rule import RuleMixin
from Products.ERP5.mixin.movement_collection_updater import \
MovementCollectionUpdaterMixin
......
......@@ -32,7 +32,7 @@ will replace InvoicingRule.
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.mixin.rule import RuleMixin
from Products.ERP5.mixin.movement_collection_updater import \
MovementCollectionUpdaterMixin
......
......@@ -32,7 +32,7 @@ will replace OrderRule.
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.mixin.rule import RuleMixin
from Products.ERP5.mixin.movement_collection_updater import \
MovementCollectionUpdaterMixin
......
......@@ -32,7 +32,7 @@ will replace PaymentRule.
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.mixin.rule import RuleMixin
from Products.ERP5.mixin.movement_collection_updater import \
MovementCollectionUpdaterMixin
......
......@@ -32,7 +32,7 @@ will replace DeliveryRule.
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.mixin.rule import RuleMixin
from Products.ERP5.mixin.movement_collection_updater import \
MovementCollectionUpdaterMixin
......
141
\ No newline at end of file
142
\ No newline at end of file
......@@ -31,7 +31,7 @@
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.Document.Invoice import Invoice
class AccountingRuleCell(Predicate, Invoice):
......
......@@ -29,7 +29,7 @@
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.Variated import Variated
......
......@@ -30,7 +30,7 @@
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.Document.MetaNode import MetaNode
from Products.ERP5.Document.Movement import Movement
......
......@@ -31,7 +31,7 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.XMLMatrix import XMLMatrix
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.Variated import Variated
......
......@@ -28,7 +28,7 @@
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
class BudgetModel(Predicate):
"""A model of budget, with all budget variation
......
......@@ -28,7 +28,7 @@
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
class BudgetVariation(Predicate):
"""Base class for budget variations.
......
......@@ -33,7 +33,7 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.Document.Path import Path
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
import zope.interface
......
......@@ -34,7 +34,7 @@ from Products.ERP5.Document.MetaResource import MetaResource
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5Type.Base import Base
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from zLOG import LOG
......
......@@ -29,7 +29,7 @@
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.mixin.equivalence_tester import EquivalenceTesterMixin
......
......@@ -28,7 +28,7 @@
from Acquisition import aq_base
from AccessControl import ClassSecurityInfo
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.Cache import getReadOnlyTransactionCache, enableReadOnlyTransactionCache, disableReadOnlyTransactionCache
......
......@@ -30,7 +30,7 @@ import zope.interface
from AccessControl import ClassSecurityInfo
from DateTime import DateTime
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.mixin.equivalence_tester import EquivalenceTesterMixin
......
......@@ -32,7 +32,7 @@ from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.MetaResource import MetaResource
from Products.ERP5.Document.MetaNode import MetaNode
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
class Domain(Predicate, MetaNode, MetaResource):
"""
......
......@@ -31,7 +31,7 @@
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.mixin.equivalence_tester import EquivalenceTesterMixin
......
......@@ -30,7 +30,7 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.Document.Amount import Amount
class MappedValue(Predicate, Amount):
......
......@@ -29,7 +29,7 @@
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.Document.Amount import Amount
from Products.ERP5.MovementGroup import MovementGroupNode
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
......
......@@ -26,7 +26,7 @@
#
##############################################################################
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
# Just for compatibility
class PredicateGroup(Predicate):
......
......@@ -27,7 +27,7 @@
##############################################################################
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import PropertySheet, Permissions
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5Type.Utils import UpperCase
from decimal import Decimal
from Products.ERP5.Tool.RoundingTool import ROUNDING_OPTION_DICT
......
......@@ -29,7 +29,7 @@
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.ERP5Type import ERP5TypeInformation
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
class SolverTypeInformation(Predicate, ERP5TypeInformation):
"""
......
......@@ -31,7 +31,7 @@
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.mixin.equivalence_tester import EquivalenceTesterMixin
......
......@@ -33,7 +33,7 @@ from Products.CMFCore.utils import getToolByName
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLMatrix import XMLMatrix
from Products.ERP5.Document.Amount import Amount
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.AggregatedAmountList import AggregatedAmountList
from Products.ERP5.Document.TradeCondition import TradeCondition
from Products.ERP5.PropertySheet.TradeModelLine import (TARGET_LEVEL_MOVEMENT,
......
......@@ -40,7 +40,7 @@ from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5.Variated import Variated
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.CMFCategory.Renderer import Renderer
from Products.ERP5.AggregatedAmountList import AggregatedAmountList
......
......@@ -39,7 +39,7 @@ from Products.ERP5Type.XMLMatrix import XMLMatrix
from Products.ERP5.Document.Amount import Amount
from Products.ERP5.AggregatedAmountList import AggregatedAmountList
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
class TransformedResource(Predicate, XMLObject, XMLMatrix, Amount):
"""
......
......@@ -29,7 +29,7 @@
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.mixin.equivalence_tester import EquivalenceTesterMixin
......
......@@ -32,7 +32,7 @@ from Acquisition import aq_base
from Products.ERP5Type import Permissions
from Products.ERP5Type.Cache import transactional_cached
from Products.ERP5Type.Utils import sortValueList
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery
......
......@@ -31,7 +31,7 @@ from AccessControl import ClassSecurityInfo
from Acquisition import aq_base
from Products.CMFCore.utils import getToolByName
from Products.ERP5Type import Permissions, interfaces
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
def _compare(tester_list, prevision_movement, decision_movement):
for tester in tester_list:
......
......@@ -274,7 +274,7 @@ class TestPredicates(TestPredicateMixIn):
def test_Interface(self):
"""Test Predicate implements Predicate interface."""
from Products.ERP5Type.interfaces import IPredicate
from Products.ERP5Type.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
predicate = self.createPredicate()
self.failUnless(IPredicate.providedBy(predicate))
from zope.interface.verify import verifyClass
......
......@@ -31,7 +31,7 @@
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import PropertySheet, Permissions, interfaces
from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from zope.interface import implements
class Archive(Predicate):
......
......@@ -32,7 +32,7 @@ import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type.Core.Predicate import Predicate
from Acquisition import aq_base
class Rule(Predicate, XMLObject):
......
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