Commit 433dc3e6 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: erp5_core: Migrate SimulationTool, AppliedRule and Simulation...

ZODB Components: erp5_core: Migrate SimulationTool, AppliedRule and Simulation Movement (and their Interfaces/Mixins).
parent 25c85c05
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.mixin.rule import RuleMixin from erp5.component.mixin.RuleMixin import RuleMixin
from Products.ERP5.mixin.movement_collection_updater import MovementCollectionUpdaterMixin from erp5.component.mixin.MovementCollectionUpdaterMixin import MovementCollectionUpdaterMixin
class AccountingTransactionRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): class AccountingTransactionRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
""" """
Accounting Transaction Root Simulation Rule is a root level rule for Accounting Transaction Root Simulation Rule is a root level rule for
......
...@@ -28,11 +28,13 @@ ...@@ -28,11 +28,13 @@
import zope.interface import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.mixin.rule import RuleMixin from erp5.component.mixin.RuleMixin import RuleMixin
from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin
from Products.ERP5.mixin.movement_collection_updater import \ from erp5.component.mixin.MovementCollectionUpdaterMixin import MovementCollectionUpdaterMixin
MovementCollectionUpdaterMixin from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
class PaymentSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): class PaymentSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
""" """
...@@ -48,9 +50,9 @@ class PaymentSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): ...@@ -48,9 +50,9 @@ class PaymentSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces # Declarative interfaces
zope.interface.implements(interfaces.IRule, zope.interface.implements(IRule,
interfaces.IDivergenceController, IDivergenceController,
interfaces.IMovementCollectionUpdater,) IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
......
...@@ -33,7 +33,7 @@ from Products.ERP5Type import Permissions, PropertySheet ...@@ -33,7 +33,7 @@ from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type.Core.Predicate import Predicate from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.Document.Amount import Amount from Products.ERP5.Document.Amount import Amount
from Products.ERP5.MovementGroup import MovementGroupNode from erp5.component.module.MovementGroup import MovementGroupNode
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from Products.ERP5.ExplanationCache import _getExplanationCache from Products.ERP5.ExplanationCache import _getExplanationCache
......
...@@ -29,12 +29,15 @@ ...@@ -29,12 +29,15 @@
import zope.interface import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.mixin.rule import RuleMixin from erp5.component.mixin.RuleMixin import RuleMixin
from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin
from Products.ERP5.mixin.movement_collection_updater import \ from erp5.component.mixin.MovementCollectionUpdaterMixin import \
MovementCollectionUpdaterMixin MovementCollectionUpdaterMixin
from Acquisition import aq_base from Acquisition import aq_base
from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
class LoyaltyTransactionSimulationRule(RuleMixin,MovementCollectionUpdaterMixin): class LoyaltyTransactionSimulationRule(RuleMixin,MovementCollectionUpdaterMixin):
""" """ """ """
...@@ -47,9 +50,9 @@ class LoyaltyTransactionSimulationRule(RuleMixin,MovementCollectionUpdaterMixin) ...@@ -47,9 +50,9 @@ class LoyaltyTransactionSimulationRule(RuleMixin,MovementCollectionUpdaterMixin)
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces # Declarative interfaces
zope.interface.implements(interfaces.IRule, zope.interface.implements(IRule,
interfaces.IDivergenceController, IDivergenceController,
interfaces.IMovementCollectionUpdater,) IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
......
...@@ -33,7 +33,7 @@ from string import capitalize ...@@ -33,7 +33,7 @@ from string import capitalize
from Products.ERP5Type.DateUtils import centis, getClosestDate, addToDate from Products.ERP5Type.DateUtils import centis, getClosestDate, addToDate
from Products.ERP5Type.DateUtils import getDecimalNumberOfYearsBetween from Products.ERP5Type.DateUtils import getDecimalNumberOfYearsBetween
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5.mixin.rule import RuleMixin from erp5.component.mixin.RuleMixin import RuleMixin
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from Products.ERP5.Document.ImmobilisationMovement import NO_CHANGE_METHOD from Products.ERP5.Document.ImmobilisationMovement import NO_CHANGE_METHOD
......
...@@ -28,11 +28,14 @@ ...@@ -28,11 +28,14 @@
import zope.interface import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.mixin.rule import RuleMixin from erp5.component.mixin.RuleMixin import RuleMixin
from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin
from Products.ERP5.mixin.movement_collection_updater import \ from erp5.component.mixin.MovementCollectionUpdaterMixin import \
MovementCollectionUpdaterMixin MovementCollectionUpdaterMixin
from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
class InvoiceSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): class InvoiceSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
""" """
...@@ -47,9 +50,9 @@ class InvoiceSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): ...@@ -47,9 +50,9 @@ class InvoiceSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces # Declarative interfaces
zope.interface.implements(interfaces.IRule, zope.interface.implements(IRule,
interfaces.IDivergenceController, IDivergenceController,
interfaces.IMovementCollectionUpdater,) IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
......
...@@ -28,13 +28,15 @@ ...@@ -28,13 +28,15 @@
import zope.interface import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.mixin.rule import RuleMixin from erp5.component.mixin.RuleMixin import RuleMixin
from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin
from Products.ERP5.mixin.movement_collection_updater import \ from erp5.component.mixin.MovementCollectionUpdaterMixin import \
MovementCollectionUpdaterMixin MovementCollectionUpdaterMixin
from Products.ERP5.Document.PredicateMatrix import PredicateMatrix from Products.ERP5.Document.PredicateMatrix import PredicateMatrix
from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
class InvoiceTransactionSimulationRule(RuleMixin, class InvoiceTransactionSimulationRule(RuleMixin,
MovementCollectionUpdaterMixin, PredicateMatrix): MovementCollectionUpdaterMixin, PredicateMatrix):
...@@ -53,9 +55,9 @@ class InvoiceTransactionSimulationRule(RuleMixin, ...@@ -53,9 +55,9 @@ class InvoiceTransactionSimulationRule(RuleMixin,
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces # Declarative interfaces
zope.interface.implements(interfaces.IRule, zope.interface.implements(IRule,
interfaces.IDivergenceController, IDivergenceController,
interfaces.IMovementCollectionUpdater,) IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
......
...@@ -29,11 +29,14 @@ ...@@ -29,11 +29,14 @@
import zope.interface import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Acquisition import aq_base from Acquisition import aq_base
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.mixin.rule import RuleMixin from erp5.component.mixin.RuleMixin import RuleMixin
from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin
from Products.ERP5.mixin.movement_collection_updater import \ from erp5.component.mixin.MovementCollectionUpdaterMixin import \
MovementCollectionUpdaterMixin MovementCollectionUpdaterMixin
from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
class TradeModelSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): class TradeModelSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
""" """
...@@ -48,9 +51,9 @@ class TradeModelSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): ...@@ -48,9 +51,9 @@ class TradeModelSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces # Declarative interfaces
zope.interface.implements(interfaces.IRule, zope.interface.implements(IRule,
interfaces.IDivergenceController, IDivergenceController,
interfaces.IMovementCollectionUpdater,) IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
......
...@@ -30,9 +30,9 @@ from AccessControl import ClassSecurityInfo ...@@ -30,9 +30,9 @@ from AccessControl import ClassSecurityInfo
from Acquisition import aq_base from Acquisition import aq_base
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from Products.ERP5.mixin.rule import RuleMixin from erp5.component.mixin.RuleMixin import RuleMixin
from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin
from Products.ERP5.mixin.movement_collection_updater import \ from erp5.component.mixin.MovementCollectionUpdaterMixin import \
MovementCollectionUpdaterMixin MovementCollectionUpdaterMixin
class TransformationSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): class TransformationSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
......
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Acquisition import aq_base from Acquisition import aq_base
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.mixin.rule import RuleMixin from erp5.component.mixin.RuleMixin import RuleMixin
from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin
from Products.ERP5.mixin.movement_collection_updater import \ from erp5.component.mixin.MovementCollectionUpdaterMixin import \
MovementCollectionUpdaterMixin MovementCollectionUpdaterMixin
class TransformationSourcingSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): class TransformationSourcingSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
......
...@@ -36,7 +36,7 @@ class InventoryAssetPriceAccountingRuleMovementGenerator(InvoiceTransactionRuleM ...@@ -36,7 +36,7 @@ class InventoryAssetPriceAccountingRuleMovementGenerator(InvoiceTransactionRuleM
meta_type = 'ERP5 Inventory Asset Price Accounting Simulation Rule' meta_type = 'ERP5 Inventory Asset Price Accounting Simulation Rule'
portal_type = 'Inventory Asset Price Accounting Simulation Rule' portal_type = 'Inventory Asset Price Accounting Simulation Rule'
# XXX: Copy/paste from Products.ERP5.mixin.rule to support Transit use case # XXX: Copy/paste from erp5.component.mixin.RuleMixin to support Transit use case
def getGeneratedMovementList(self, movement_list=None, rounding=False): def getGeneratedMovementList(self, movement_list=None, rounding=False):
""" """
Returns a list of movements generated by that rule. Returns a list of movements generated by that rule.
......
...@@ -34,7 +34,7 @@ from Products.ERP5Type import Permissions, PropertySheet ...@@ -34,7 +34,7 @@ from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from erp5.component.mixin.SolverMixin import SolverMixin from erp5.component.mixin.SolverMixin import SolverMixin
from erp5.component.mixin.ConfigurableMixin import ConfigurableMixin from erp5.component.mixin.ConfigurableMixin import ConfigurableMixin
from Products.ERP5.MovementCollectionDiff import _getPropertyAndCategoryList from erp5.component.module.MovementCollectionDiff import _getPropertyAndCategoryList
from erp5.component.interface.ISolver import ISolver from erp5.component.interface.ISolver import ISolver
from erp5.component.interface.IConfigurable import IConfigurable from erp5.component.interface.IConfigurable import IConfigurable
......
...@@ -35,7 +35,7 @@ from Products.ERP5Type.XMLObject import XMLObject ...@@ -35,7 +35,7 @@ from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type.Globals import PersistentMapping from Products.ERP5Type.Globals import PersistentMapping
from erp5.component.mixin.SolverMixin import SolverMixin from erp5.component.mixin.SolverMixin import SolverMixin
from erp5.component.mixin.ConfigurableMixin import ConfigurableMixin from erp5.component.mixin.ConfigurableMixin import ConfigurableMixin
from Products.ERP5.MovementCollectionDiff import _getPropertyAndCategoryList from erp5.component.module.MovementCollectionDiff import _getPropertyAndCategoryList
from erp5.component.interface.ISolver import ISolver from erp5.component.interface.ISolver import ISolver
from erp5.component.interface.IConfigurable import IConfigurable from erp5.component.interface.IConfigurable import IConfigurable
......
...@@ -30,7 +30,7 @@ import zope.interface ...@@ -30,7 +30,7 @@ import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5Type.DivergenceMessage import DivergenceMessage from erp5.component.module.DivergenceMessage import DivergenceMessage
from Products.ERP5Type.Message import Message from Products.ERP5Type.Message import Message
from Products.PythonScripts.standard import html_quote as h from Products.PythonScripts.standard import html_quote as h
from zLOG import LOG, WARNING from zLOG import LOG, WARNING
......
...@@ -31,10 +31,11 @@ import zope.interface ...@@ -31,10 +31,11 @@ import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type import Permissions, interfaces from Products.ERP5Type import Permissions
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from erp5.component.interface.IDivergenceController import IDivergenceController
class SolverProcessTool(BaseTool): class SolverProcessTool(BaseTool):
""" Container for solver processes. """ Container for solver processes.
...@@ -48,7 +49,7 @@ class SolverProcessTool(BaseTool): ...@@ -48,7 +49,7 @@ class SolverProcessTool(BaseTool):
security = ClassSecurityInfo() security = ClassSecurityInfo()
# Declarative interfaces # Declarative interfaces
zope.interface.implements(interfaces.IDivergenceController, ) zope.interface.implements(IDivergenceController, )
# IDivergenceController implementation # IDivergenceController implementation
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
......
...@@ -35,7 +35,7 @@ from Products.ERP5Type.TransactionalVariable import getTransactionalVariable ...@@ -35,7 +35,7 @@ from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5.Document.Path import Path from Products.ERP5.Document.Path import Path
from Products.ERP5.ExplanationCache import _getExplanationCache, _getBusinessLinkClosure from Products.ERP5.ExplanationCache import _getExplanationCache, _getBusinessLinkClosure
from Products.ERP5.MovementCollectionDiff import _getPropertyAndCategoryList from erp5.component.module.MovementCollectionDiff import _getPropertyAndCategoryList
from erp5.component.interface.IBusinessProcess import IBusinessProcess from erp5.component.interface.IBusinessProcess import IBusinessProcess
import zope.interface import zope.interface
......
...@@ -28,11 +28,14 @@ ...@@ -28,11 +28,14 @@
import zope.interface import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.mixin.rule import RuleMixin from erp5.component.mixin.RuleMixin import RuleMixin
from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin
from Products.ERP5.mixin.movement_collection_updater import \ from erp5.component.mixin.MovementCollectionUpdaterMixin import \
MovementCollectionUpdaterMixin MovementCollectionUpdaterMixin
from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
class DeliveryRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): class DeliveryRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
""" """
...@@ -50,9 +53,9 @@ class DeliveryRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): ...@@ -50,9 +53,9 @@ class DeliveryRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces # Declarative interfaces
zope.interface.implements(interfaces.IRule, zope.interface.implements(IRule,
interfaces.IDivergenceController, IDivergenceController,
interfaces.IMovementCollectionUpdater,) IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
......
...@@ -28,11 +28,14 @@ ...@@ -28,11 +28,14 @@
import zope.interface import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.mixin.rule import RuleMixin from erp5.component.mixin.RuleMixin import RuleMixin
from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin
from Products.ERP5.mixin.movement_collection_updater import \ from erp5.component.mixin.MovementCollectionUpdaterMixin import \
MovementCollectionUpdaterMixin MovementCollectionUpdaterMixin
from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
class DeliverySimulationRule(RuleMixin, MovementCollectionUpdaterMixin): class DeliverySimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
""" """
...@@ -50,9 +53,9 @@ class DeliverySimulationRule(RuleMixin, MovementCollectionUpdaterMixin): ...@@ -50,9 +53,9 @@ class DeliverySimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces # Declarative interfaces
zope.interface.implements(interfaces.IRule, zope.interface.implements(IRule,
interfaces.IDivergenceController, IDivergenceController,
interfaces.IMovementCollectionUpdater,) IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
......
...@@ -28,11 +28,14 @@ ...@@ -28,11 +28,14 @@
import zope.interface import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.mixin.rule import RuleMixin from erp5.component.mixin.RuleMixin import RuleMixin
from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin from Products.ERP5.mixin.movement_generator import MovementGeneratorMixin
from Products.ERP5.mixin.movement_collection_updater import \ from erp5.component.mixin.MovementCollectionUpdaterMixin import \
MovementCollectionUpdaterMixin MovementCollectionUpdaterMixin
from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
class OrderRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): class OrderRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
""" """
...@@ -50,9 +53,9 @@ class OrderRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin): ...@@ -50,9 +53,9 @@ class OrderRootSimulationRule(RuleMixin, MovementCollectionUpdaterMixin):
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces # Declarative interfaces
zope.interface.implements(interfaces.IRule, zope.interface.implements(IRule,
interfaces.IDivergenceController, IDivergenceController,
interfaces.IMovementCollectionUpdater,) IMovementCollectionUpdater,)
# Default Properties # Default Properties
property_sheets = ( property_sheets = (
......
...@@ -40,6 +40,7 @@ from Products.ERP5.mixin.composition import _getEffectiveModel ...@@ -40,6 +40,7 @@ from Products.ERP5.mixin.composition import _getEffectiveModel
from Products.ERP5.Document.MappedValue import MappedValue from Products.ERP5.Document.MappedValue import MappedValue
from Products.ERP5.mixin.amount_generator import AmountGeneratorMixin from Products.ERP5.mixin.amount_generator import AmountGeneratorMixin
from Products.ERP5.mixin.variated import VariatedMixin from Products.ERP5.mixin.variated import VariatedMixin
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
class TradeCondition(MappedValue, AmountGeneratorMixin, VariatedMixin): class TradeCondition(MappedValue, AmountGeneratorMixin, VariatedMixin):
""" """
...@@ -74,7 +75,7 @@ class TradeCondition(MappedValue, AmountGeneratorMixin, VariatedMixin): ...@@ -74,7 +75,7 @@ class TradeCondition(MappedValue, AmountGeneratorMixin, VariatedMixin):
zope.interface.implements(interfaces.IAmountGenerator, zope.interface.implements(interfaces.IAmountGenerator,
interfaces.IMovementGenerator, interfaces.IMovementGenerator,
interfaces.IMovementCollectionUpdater,) IMovementCollectionUpdater,)
# Mapped Value implementation # Mapped Value implementation
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
# #
############################################################################## ##############################################################################
from Products.ERP5.MovementCollectionDiff import _getPropertyAndCategoryList
from Products.ERP5Type.Globals import PersistentMapping from Products.ERP5Type.Globals import PersistentMapping
from CopyToTarget import CopyToTarget from CopyToTarget import CopyToTarget
from Acquisition import aq_base from Acquisition import aq_base
...@@ -64,6 +63,7 @@ class SplitAndDefer(CopyToTarget): ...@@ -64,6 +63,7 @@ class SplitAndDefer(CopyToTarget):
split_index += 1 split_index += 1
new_id = "%s_split_%s" % (simulation_movement.getId(), split_index) new_id = "%s_split_%s" % (simulation_movement.getId(), split_index)
# Adopt different dates for deferred movements # Adopt different dates for deferred movements
from erp5.component.module.MovementCollectionDiff import _getPropertyAndCategoryList
movement_dict = _getPropertyAndCategoryList(simulation_movement) movement_dict = _getPropertyAndCategoryList(simulation_movement)
# new properties # new properties
movement_dict.update( movement_dict.update(
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -35,17 +35,13 @@ from Products.ERP5Type.Utils import initializeProduct, updateGlobals ...@@ -35,17 +35,13 @@ from Products.ERP5Type.Utils import initializeProduct, updateGlobals
import sys, Permissions import sys, Permissions
this_module = sys.modules[ __name__ ] this_module = sys.modules[ __name__ ]
document_classes = updateGlobals( this_module, globals(), permissions_module = Permissions) document_classes = updateGlobals( this_module, globals(), permissions_module = Permissions)
from Products.PythonScripts.Utility import allow_class
from AccessControl import ModuleSecurityInfo from AccessControl import ModuleSecurityInfo
import MovementGroup
allow_class(MovementGroup)
from Products.ERP5Type.Globals import package_home from Products.ERP5Type.Globals import package_home
product_path = package_home( globals() ) product_path = package_home( globals() )
# Define object classes and tools # Define object classes and tools
from Tool import CategoryTool, SimulationTool, RuleTool, IdTool, TemplateTool,\ from Tool import CategoryTool, RuleTool, IdTool, TemplateTool,\
TestTool, DomainTool, AlarmTool, OrderTool, DeliveryTool,\ TestTool, DomainTool, AlarmTool, OrderTool, DeliveryTool,\
TrashTool, ContributionTool, NotificationTool, PasswordTool,\ TrashTool, ContributionTool, NotificationTool, PasswordTool,\
GadgetTool, ContributionRegistryTool, IntrospectionTool,\ GadgetTool, ContributionRegistryTool, IntrospectionTool,\
...@@ -59,7 +55,6 @@ object_classes = ( ERP5Site.ERP5Site, ...@@ -59,7 +55,6 @@ object_classes = ( ERP5Site.ERP5Site,
SQLMethod.SQLMethod, SQLMethod.SQLMethod,
) )
portal_tools = ( CategoryTool.CategoryTool, portal_tools = ( CategoryTool.CategoryTool,
SimulationTool.SimulationTool,
RuleTool.RuleTool, RuleTool.RuleTool,
IdTool.IdTool, IdTool.IdTool,
TemplateTool.TemplateTool, TemplateTool.TemplateTool,
......
...@@ -34,15 +34,17 @@ import zope.interface ...@@ -34,15 +34,17 @@ import zope.interface
from zExceptions import ExceptionFormatter from zExceptions import ExceptionFormatter
from ZODB.POSException import ConflictError from ZODB.POSException import ConflictError
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5Type.Base import WorkflowMethod from Products.ERP5Type.Base import WorkflowMethod
from Products.ERP5Type.Globals import PersistentMapping from Products.ERP5Type.Globals import PersistentMapping
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from Products.ERP5.ExpandPolicy import TREE_DELIVERED_CACHE_KEY from erp5.component.module.ExpandPolicy import TREE_DELIVERED_CACHE_KEY
from Products.ERP5.mixin.explainable import ExplainableMixin from erp5.component.mixin.ExplainableMixin import ExplainableMixin
from Products.ERP5.mixin.rule import RuleMixin from erp5.component.mixin.RuleMixin import RuleMixin
from erp5.component.interface.IExpandable import IExpandable
from erp5.component.interface.IMovementCollection import IMovementCollection
class AppliedRule(XMLObject, ExplainableMixin): class AppliedRule(XMLObject, ExplainableMixin):
""" """
...@@ -80,8 +82,8 @@ class AppliedRule(XMLObject, ExplainableMixin): ...@@ -80,8 +82,8 @@ class AppliedRule(XMLObject, ExplainableMixin):
) )
# Declarative interfaces # Declarative interfaces
zope.interface.implements(interfaces.IExpandable, zope.interface.implements(IExpandable,
interfaces.IMovementCollection) IMovementCollection)
def tpValues(self) : def tpValues(self) :
""" show the content in the left pane of the ZMI """ """ show the content in the left pane of the ZMI """
...@@ -170,6 +172,7 @@ class AppliedRule(XMLObject, ExplainableMixin): ...@@ -170,6 +172,7 @@ class AppliedRule(XMLObject, ExplainableMixin):
""" """
return self.objectValues(portal_type=RuleMixin.movement_type) return self.objectValues(portal_type=RuleMixin.movement_type)
# pylint: disable=cell-var-from-loop
def _migrateSimulationTree(self, def _migrateSimulationTree(self,
get_matching_key, get_matching_key,
get_original_property_dict, get_original_property_dict,
...@@ -370,8 +373,8 @@ class AppliedRule(XMLObject, ExplainableMixin): ...@@ -370,8 +373,8 @@ class AppliedRule(XMLObject, ExplainableMixin):
for delivery, sm_dict in deleted: for delivery, sm_dict in deleted:
if not sm_dict: if not sm_dict:
del old_dict[delivery] del old_dict[delivery]
from Products.ERP5.Document.SimulationMovement import SimulationMovement from erp5.component.document.SimulationMovement import SimulationMovement
from Products.ERP5.mixin.movement_collection_updater import \ from erp5.component.mixin.MovementCollectionUpdaterMixin import \
MovementCollectionUpdaterMixin as mixin MovementCollectionUpdaterMixin as mixin
# Patch is already protected by WorkflowMethod.disable lock. # Patch is already protected by WorkflowMethod.disable lock.
orig_updateMovementCollection = mixin.__dict__['updateMovementCollection'] orig_updateMovementCollection = mixin.__dict__['updateMovementCollection']
...@@ -404,8 +407,8 @@ class AppliedRule(XMLObject, ExplainableMixin): ...@@ -404,8 +407,8 @@ class AppliedRule(XMLObject, ExplainableMixin):
document = object_list.popleft() document = object_list.popleft()
portal_type = document.getPortalType() portal_type = document.getPortalType()
document_dict = {'portal_type': portal_type} document_dict = {'portal_type': portal_type}
for property in property_dict[portal_type]: for property_ in property_dict[portal_type]:
document_dict[property] = document.getProperty(property) document_dict[property_] = document.getProperty(property_)
rule_dict[document.getRelativeUrl()] = document_dict rule_dict[document.getRelativeUrl()] = document_dict
object_list += document.objectValues() object_list += document.objectValues()
return rule_dict return rule_dict
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>AppliedRule</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Document.AppliedRule</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.AppliedRule</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -44,6 +44,8 @@ from Products.ERP5.mixin.composition import CompositionMixin ...@@ -44,6 +44,8 @@ from Products.ERP5.mixin.composition import CompositionMixin
from erp5.component.mixin.SimulableMixin import SimulableMixin from erp5.component.mixin.SimulableMixin import SimulableMixin
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod, \ from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod, \
unrestricted_apply unrestricted_apply
from erp5.component.interface.IMovementCollection import IMovementCollection
from erp5.component.interface.IDivergenceController import IDivergenceController
class Delivery(XMLObject, ImmobilisationDelivery, SimulableMixin, class Delivery(XMLObject, ImmobilisationDelivery, SimulableMixin,
CompositionMixin, AmountGeneratorMixin): CompositionMixin, AmountGeneratorMixin):
...@@ -75,8 +77,8 @@ class Delivery(XMLObject, ImmobilisationDelivery, SimulableMixin, ...@@ -75,8 +77,8 @@ class Delivery(XMLObject, ImmobilisationDelivery, SimulableMixin,
# Declarative interfaces # Declarative interfaces
zope.interface.implements(interfaces.IAmountGenerator, zope.interface.implements(interfaces.IAmountGenerator,
interfaces.IDivergenceController, IDivergenceController,
interfaces.IMovementCollection) IMovementCollection)
security.declareProtected(Permissions.AccessContentsInformation, 'isAccountable') security.declareProtected(Permissions.AccessContentsInformation, 'isAccountable')
def isAccountable(self): def isAccountable(self):
......
...@@ -33,11 +33,12 @@ import zope.interface ...@@ -33,11 +33,12 @@ import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from AccessControl.PermissionRole import PermissionRole from AccessControl.PermissionRole import PermissionRole
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.Movement import Movement from Products.ERP5.Document.Movement import Movement
from Products.ERP5.Document.MappedValue import MappedValue from Products.ERP5.Document.MappedValue import MappedValue
from Products.ERP5.Document.ImmobilisationMovement import ImmobilisationMovement from Products.ERP5.Document.ImmobilisationMovement import ImmobilisationMovement
from erp5.component.interface.IDivergenceController import IDivergenceController
class DeliveryCell(MappedValue, Movement, ImmobilisationMovement): class DeliveryCell(MappedValue, Movement, ImmobilisationMovement):
""" """
...@@ -66,7 +67,7 @@ class DeliveryCell(MappedValue, Movement, ImmobilisationMovement): ...@@ -66,7 +67,7 @@ class DeliveryCell(MappedValue, Movement, ImmobilisationMovement):
) )
# Declarative interfaces # Declarative interfaces
zope.interface.implements(interfaces.IDivergenceController,) zope.interface.implements(IDivergenceController,)
security.declareProtected(Permissions.AccessContentsInformation, 'isPredicate') security.declareProtected(Permissions.AccessContentsInformation, 'isPredicate')
def isPredicate(self): def isPredicate(self):
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
import zope.interface import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.XMLMatrix import XMLMatrix from Products.ERP5Type.XMLMatrix import XMLMatrix
from Products.ERP5.Document.Movement import Movement from Products.ERP5.Document.Movement import Movement
...@@ -40,6 +40,8 @@ from inspect import getargspec ...@@ -40,6 +40,8 @@ from inspect import getargspec
from Products.ERP5Type.Base import Base from Products.ERP5Type.Base import Base
edit_args_list = getargspec(Base._edit).args edit_args_list = getargspec(Base._edit).args
from erp5.component.interface.IDivergenceController import IDivergenceController
class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement): class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
""" """
A DeliveryLine object allows to implement lines in A DeliveryLine object allows to implement lines in
...@@ -70,7 +72,7 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement): ...@@ -70,7 +72,7 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
) )
# Declarative interfaces # Declarative interfaces
zope.interface.implements(interfaces.IDivergenceController,) zope.interface.implements(IDivergenceController,)
# Multiple inheritance definition # Multiple inheritance definition
updateRelatedContent = XMLMatrix.updateRelatedContent updateRelatedContent = XMLMatrix.updateRelatedContent
......
...@@ -33,12 +33,13 @@ from AccessControl import ClassSecurityInfo ...@@ -33,12 +33,13 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from Products.ERP5.Document.Movement import Movement from Products.ERP5.Document.Movement import Movement
from Products.ERP5.ExpandPolicy import policy_dict, TREE_DELIVERED_CACHE_KEY from erp5.component.module.ExpandPolicy import policy_dict, TREE_DELIVERED_CACHE_KEY
from zLOG import LOG, WARNING from zLOG import LOG, WARNING
from Products.ERP5.mixin.property_recordable import PropertyRecordableMixin from Products.ERP5.mixin.property_recordable import PropertyRecordableMixin
from Products.ERP5.mixin.explainable import ExplainableMixin from erp5.component.mixin.ExplainableMixin import ExplainableMixin
from erp5.component.interface.IExpandable import IExpandable
# XXX Do we need to create groups ? (ie. confirm group include confirmed, getting_ready and ready # XXX Do we need to create groups ? (ie. confirm group include confirmed, getting_ready and ready
...@@ -118,7 +119,7 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin): ...@@ -118,7 +119,7 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin):
) )
# Declarative interfaces # Declarative interfaces
zope.interface.implements(interfaces.IExpandable, zope.interface.implements(IExpandable,
interfaces.IPropertyRecordable) interfaces.IPropertyRecordable)
def tpValues(self) : def tpValues(self) :
...@@ -656,25 +657,25 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin): ...@@ -656,25 +657,25 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin):
empty; a movement is only yielded if its causality value is in this set empty; a movement is only yielded if its causality value is in this set
""" """
object_id_list = document.objectIds() object_id_list = document.objectIds()
for id in object_id_list: for id_ in object_id_list:
if id not in tree_node.visited_movement_dict: if id_ not in tree_node.visited_movement_dict:
# we had not visited it in step #2 # we had not visited it in step #2
subdocument = document._getOb(id) subdocument = document._getOb(id_)
if subdocument.getPortalType() == "Simulation Movement": if subdocument.getPortalType() == "Simulation Movement":
path = subdocument.getCausalityValue(portal_type='Business Link') path = subdocument.getCausalityValue(portal_type='Business Link')
t = (subdocument, path) t = (subdocument, path)
tree_node.visited_movement_dict[id] = t tree_node.visited_movement_dict[id_] = t
if path in path_set_to_check: if path in path_set_to_check:
yield t yield t
else: else:
# it must be an Applied Rule # it must be an Applied Rule
subtree = tree_node.get(id, treeNode()) subtree = tree_node.get(id_, treeNode())
for d in descendantGenerator(subdocument, for d in descendantGenerator(subdocument,
subtree, subtree,
path_set_to_check): path_set_to_check):
yield d yield d
for id, t in tree_node.visited_movement_dict.iteritems(): for id_, t in tree_node.visited_movement_dict.iteritems():
subdocument, path = t subdocument, path = t
to_check = path_set_to_check to_check = path_set_to_check
# do we need to change/copy the set? # do we need to change/copy the set?
...@@ -684,7 +685,7 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin): ...@@ -684,7 +685,7 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin):
continue continue
to_check = to_check.copy() to_check = to_check.copy()
to_check.remove(path) to_check.remove(path)
subtree = tree_node.get(id, treeNode()) subtree = tree_node.get(id_, treeNode())
for d in descendantGenerator(subdocument, subtree, to_check): for d in descendantGenerator(subdocument, subtree, to_check):
yield d yield d
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Document Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>SimulationMovement</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Document.SimulationMovement</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document.erp5.SimulationMovement</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Document Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Interface Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>IDivergenceController</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.interfaces.divergence_controller</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>interface.erp5.IDivergenceController</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Interface Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
# #
############################################################################## ##############################################################################
""" """
Products.ERP5.interfaces.expandable erp5.component.interface.IExpandable
""" """
from zope.interface import Interface from zope.interface import Interface
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Interface Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>IExpandable</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.interfaces.expandable</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>interface.erp5.IExpandable</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Interface Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Interface Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>IMovementCollection</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.interfaces.movement_collection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>interface.erp5.IMovementCollection</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Interface Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Interface Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>IMovementCollectionDiff</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.interfaces.movement_collection_diff</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>interface.erp5.IMovementCollectionDiff</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Interface Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Interface Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>IMovementCollectionUpdater</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.interfaces.movement_collection_updater</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>interface.erp5.IMovementCollectionUpdater</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Interface Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
# #
############################################################################## ##############################################################################
""" """
Products.ERP5.interfaces.rule erp5.component.interface.IRule
""" """
from Products.ERP5.interfaces.movement_collection_updater import IMovementCollectionUpdater from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
class IRule(IMovementCollectionUpdater): class IRule(IMovementCollectionUpdater):
"""Rule interface specification """Rule interface specification
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Interface Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>IRule</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.interfaces.rule</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>interface.erp5.IRule</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Interface Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -27,14 +27,13 @@ ...@@ -27,14 +27,13 @@
# #
############################################################################## ##############################################################################
""" """
Products.ERP5.interfaces.simulation_movement erp5.component.interface.ISimulationMovement
""" """
from Products.ERP5.interfaces.property_recordable import IPropertyRecordable from Products.ERP5.interfaces.property_recordable import IPropertyRecordable
from Products.ERP5.interfaces.movement import IMovement from Products.ERP5.interfaces.movement import IMovement
from Products.ERP5.interfaces.divergence_controller import IDivergenceController from erp5.component.interface.IDivergenceController import IDivergenceController
from Products.ERP5.interfaces.explainable import IExplainable from Products.ERP5.interfaces.explainable import IExplainable
from zope.interface import Interface
class ISimulationMovement(IMovement, IPropertyRecordable, IDivergenceController, IExplainable): class ISimulationMovement(IMovement, IPropertyRecordable, IDivergenceController, IExplainable):
"""Simulation Movement interface specification """Simulation Movement interface specification
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Interface Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>ISimulationMovement</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.interfaces.simulation_movement</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>interface.erp5.ISimulationMovement</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Interface Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Mixin Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>ExplainableMixin</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.mixin.explainable</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>mixin.erp5.ExplainableMixin</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Mixin Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -29,10 +29,11 @@ ...@@ -29,10 +29,11 @@
import zope.interface import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type import Permissions, interfaces from Products.ERP5Type import Permissions
from Products.ERP5.MovementCollectionDiff import ( from erp5.component.module.MovementCollectionDiff import (
MovementCollectionDiff, _getPropertyAndCategoryList) MovementCollectionDiff, _getPropertyAndCategoryList)
from Products.ERP5.mixin.rule import _compare from erp5.component.mixin.RuleMixin import _compare
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
class MovementCollectionUpdaterMixin: class MovementCollectionUpdaterMixin:
"""Movement Collection Updater. """Movement Collection Updater.
...@@ -49,7 +50,7 @@ class MovementCollectionUpdaterMixin: ...@@ -49,7 +50,7 @@ class MovementCollectionUpdaterMixin:
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces # Declarative interfaces
zope.interface.implements(interfaces.IMovementCollectionUpdater,) zope.interface.implements(IMovementCollectionUpdater,)
# Implementation of IMovementCollectionUpdater # Implementation of IMovementCollectionUpdater
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Mixin Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>MovementCollectionUpdaterMixin</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.mixin.movement_collection_updater</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>mixin.erp5.MovementCollectionUpdaterMixin</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Mixin Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -29,9 +29,12 @@ ...@@ -29,9 +29,12 @@
import zope.interface import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type import Permissions, interfaces from Products.ERP5Type import Permissions
from Products.ERP5Type.Core.Predicate import Predicate from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.ExpandPolicy import policy_dict from erp5.component.module.ExpandPolicy import policy_dict
from erp5.component.interface.IRule import IRule
from erp5.component.interface.IDivergenceController import IDivergenceController
from erp5.component.interface.IMovementCollectionUpdater import IMovementCollectionUpdater
def _compare(tester_list, prevision_movement, decision_movement): def _compare(tester_list, prevision_movement, decision_movement):
for tester in tester_list: for tester in tester_list:
...@@ -49,9 +52,9 @@ class RuleMixin(Predicate): ...@@ -49,9 +52,9 @@ class RuleMixin(Predicate):
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces # Declarative interfaces
zope.interface.implements(interfaces.IRule, zope.interface.implements(IRule,
interfaces.IDivergenceController, IDivergenceController,
interfaces.IMovementCollectionUpdater,) IMovementCollectionUpdater,)
# Portal Type of created children # Portal Type of created children
movement_type = 'Simulation Movement' movement_type = 'Simulation Movement'
...@@ -128,7 +131,7 @@ class RuleMixin(Predicate): ...@@ -128,7 +131,7 @@ class RuleMixin(Predicate):
# Implementation of IDivergenceController # XXX-JPS move to IDivergenceController only mixin for # Implementation of IDivergenceController # XXX-JPS move to IDivergenceController only mixin for
security.declareProtected( Permissions.AccessContentsInformation, security.declareProtected( Permissions.AccessContentsInformation,
'isDivergent') 'isDivergent')
def isDivergent(self, movement, ignore_list=[]): def isDivergent(self, movement, ignore_list=()):
""" """
Returns true if the Simulation Movement is divergent comparing to Returns true if the Simulation Movement is divergent comparing to
the delivery value the delivery value
...@@ -179,12 +182,16 @@ class RuleMixin(Predicate): ...@@ -179,12 +182,16 @@ class RuleMixin(Predicate):
quantity divergence testers quantity divergence testers
""" """
if exclude_quantity: if exclude_quantity:
return filter(lambda x:x.isDivergenceProvider() and \ return [
'quantity' not in x.getTestedPropertyList(), self.objectValues( x for x in self.objectValues(
portal_type=self.getPortalDivergenceTesterTypeList())) portal_type=self.getPortalDivergenceTesterTypeList())
if (x.isDivergenceProvider() and
'quantity' not in x.getTestedPropertyList())]
else: else:
return filter(lambda x:x.isDivergenceProvider(), self.objectValues( return [
portal_type=self.getPortalDivergenceTesterTypeList())) x for x in self.objectValues(
portal_type=self.getPortalDivergenceTesterTypeList())
if x.isDivergenceProvider()]
def _getMatchingTesterList(self): def _getMatchingTesterList(self):
""" """
...@@ -192,8 +199,10 @@ class RuleMixin(Predicate): ...@@ -192,8 +199,10 @@ class RuleMixin(Predicate):
be used to match movements and build the diff (ie. be used to match movements and build the diff (ie.
not all divergence testers of the Rule) not all divergence testers of the Rule)
""" """
return filter(lambda x:x.isMatchingProvider(), self.objectValues( return [
portal_type=self.getPortalDivergenceTesterTypeList())) x for x in self.objectValues(
portal_type=self.getPortalDivergenceTesterTypeList())
if x.isMatchingProvider()]
def _getUpdatingTesterList(self, exclude_quantity=False): def _getUpdatingTesterList(self, exclude_quantity=False):
""" """
...@@ -204,12 +213,16 @@ class RuleMixin(Predicate): ...@@ -204,12 +213,16 @@ class RuleMixin(Predicate):
quantity divergence testers quantity divergence testers
""" """
if exclude_quantity: if exclude_quantity:
return filter(lambda x:x.isUpdatingProvider() and \ return [
'quantity' not in x.getTestedPropertyList(), self.objectValues( x for x in self.objectValues(
portal_type=self.getPortalDivergenceTesterTypeList())) portal_type=self.getPortalDivergenceTesterTypeList())
if (x.isUpdatingProvider() and
'quantity' not in x.getTestedPropertyList())]
else: else:
return filter(lambda x:x.isUpdatingProvider(), self.objectValues( return [
portal_type=self.getPortalDivergenceTesterTypeList())) x for x in self.objectValues(
portal_type=self.getPortalDivergenceTesterTypeList())
if x.isUpdatingProvider()]
def _getQuantityTesterList(self): def _getQuantityTesterList(self):
""" """
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Mixin Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>RuleMixin</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.mixin.rule</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>mixin.erp5.RuleMixin</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Mixin Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -130,7 +130,7 @@ class VerticalTimeBound(_Policy): ...@@ -130,7 +130,7 @@ class VerticalTimeBound(_Policy):
super(VerticalTimeBound, self).__init__(**kw) super(VerticalTimeBound, self).__init__(**kw)
self.stop = transaction.get().start_time + VERTICAL_EXPAND_TIMEOUT self.stop = transaction.get().start_time + VERTICAL_EXPAND_TIMEOUT
def test(self, context): def test(self, context): # pylint: disable=method-hidden
if time() < self.stop: if time() < self.stop:
return True return True
self.deferAll() self.deferAll()
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Module Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>ExpandPolicy</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.ExpandPolicy</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>module.erp5.ExpandPolicy</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Module Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Module Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>MovementCollectionDiff</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.MovementCollectionDiff</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>module.erp5.MovementCollectionDiff</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Module Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -41,7 +41,7 @@ class MovementGroupNode: ...@@ -41,7 +41,7 @@ class MovementGroupNode:
# a separate method requests separating movements. # a separate method requests separating movements.
def __init__(self, movement_group_list=None, movement_list=None, def __init__(self, movement_group_list=None, movement_list=None,
last_line_movement_group=None, last_line_movement_group=None,
separate_method_name_list=[], movement_group=None, separate_method_name_list=(), movement_group=None,
merge_delivery=None): merge_delivery=None):
self._movement_list = [] self._movement_list = []
self._group_list = [] self._group_list = []
...@@ -332,7 +332,7 @@ class FakeMovement: ...@@ -332,7 +332,7 @@ class FakeMovement:
return True return True
return False return False
def _setDelivery(self, object): def _setDelivery(self, object): # pylint: disable=redefined-builtin
""" """
Set Delivery value for each movement Set Delivery value for each movement
""" """
...@@ -508,85 +508,3 @@ class FakeMovement: ...@@ -508,85 +508,3 @@ class FakeMovement:
id(self), id(self),
self.getMovementList()) self.getMovementList())
return repr_str return repr_str
\ No newline at end of file
# The following classes are not ported to Document/XxxxMovementGroup.py yet.
class RootMovementGroup(MovementGroupNode):
pass
class SplitResourceMovementGroup(RootMovementGroup):
def __init__(self, movement, **kw):
RootMovementGroup.__init__(self, movement=movement, **kw)
self.resource = movement.getResource()
def test(self, movement):
return movement.getResource() == self.resource
allow_class(SplitResourceMovementGroup)
class OptionMovementGroup(RootMovementGroup):
def __init__(self,movement,**kw):
RootMovementGroup.__init__(self, movement=movement, **kw)
option_base_category_list = movement.getPortalOptionBaseCategoryList()
self.option_category_list = movement.getVariationCategoryList(
base_category_list=option_base_category_list)
if self.option_category_list is None:
self.option_category_list = []
self.option_category_list.sort()
# XXX This is very bad, but no choice today.
self.setGroupEdit(industrial_phase_list = self.option_category_list)
def test(self,movement):
option_base_category_list = movement.getPortalOptionBaseCategoryList()
movement_option_category_list = movement.getVariationCategoryList(
base_category_list=option_base_category_list)
if movement_option_category_list is None:
movement_option_category_list = []
movement_option_category_list.sort()
return movement_option_category_list == self.option_category_list
allow_class(OptionMovementGroup)
# XXX This should not be here
# I (seb) have commited this because movement groups are not
# yet configurable through the zope web interface
class IntIndexMovementGroup(RootMovementGroup):
def getIntIndex(self,movement):
order_value = movement.getOrderValue()
int_index = 0
if order_value is not None:
if "Line" in order_value.getPortalType():
int_index = order_value.getIntIndex()
elif "Cell" in order_value.getPortalType():
int_index = order_value.getParentValue().getIntIndex()
return int_index
def __init__(self,movement,**kw):
RootMovementGroup.__init__(self, movement=movement, **kw)
int_index = self.getIntIndex(movement)
self.int_index = int_index
self.setGroupEdit(
int_index=int_index
)
def test(self,movement):
return self.getIntIndex(movement) == self.int_index
allow_class(IntIndexMovementGroup)
class ParentExplanationMovementGroup(RootMovementGroup): pass
class ParentExplanationCausalityMovementGroup(ParentExplanationMovementGroup):
"""
Like ParentExplanationMovementGroup, and set the causality.
"""
def __init__(self, movement, **kw):
ParentExplanationMovementGroup.__init__(self, movement=movement, **kw)
self.updateGroupEdit(
causality_value = self.explanation_value
)
allow_class(ParentExplanationCausalityMovementGroup)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Module Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>MovementGroup</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.MovementGroup</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>module.erp5.MovementGroup</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Module Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Tool Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>SimulationTool</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Tool.SimulationTool</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tool.erp5.SimulationTool</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Tool Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
document.erp5.AppliedRule
document.erp5.Delivery document.erp5.Delivery
document.erp5.DeliveryCell document.erp5.DeliveryCell
document.erp5.DeliveryLine document.erp5.DeliveryLine
...@@ -10,3 +11,4 @@ document.erp5.Item ...@@ -10,3 +11,4 @@ document.erp5.Item
document.erp5.Order document.erp5.Order
document.erp5.PackingList document.erp5.PackingList
document.erp5.ScriptConstraint document.erp5.ScriptConstraint
document.erp5.SimulationMovement
\ No newline at end of file
interface.erp5.IDivergenceController
interface.erp5.IExpandable
interface.erp5.IMovementCollection
interface.erp5.IMovementCollectionDiff
interface.erp5.IMovementCollectionUpdater
interface.erp5.IRule
interface.erp5.ISimulationMovement
\ No newline at end of file
mixin.erp5.ExplainableMixin
mixin.erp5.MovementCollectionUpdaterMixin
mixin.erp5.RuleMixin
mixin.erp5.SimulableMixin mixin.erp5.SimulableMixin
\ No newline at end of file
module.erp5.ExpandPolicy
module.erp5.MovementCollectionDiff
module.erp5.MovementGroup
\ No newline at end of file
tool.erp5.CallableTool tool.erp5.CallableTool
tool.erp5.DiffTool tool.erp5.DiffTool
tool.erp5.SimulationTool
\ No newline at end of file
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<dtml-var manage_page_footer>
...@@ -43,8 +43,6 @@ from MySQLdb import ProgrammingError ...@@ -43,8 +43,6 @@ from MySQLdb import ProgrammingError
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.utils import reindex from Products.ERP5Type.tests.utils import reindex
from Products.ERP5.Tool.SimulationTool import MYSQL_MIN_DATETIME_RESOLUTION
class InventoryAPITestCase(ERP5TypeTestCase): class InventoryAPITestCase(ERP5TypeTestCase):
"""Base class for Inventory API Tests {{{ """Base class for Inventory API Tests {{{
...@@ -2913,6 +2911,7 @@ class TestInventoryCacheTable(InventoryAPITestCase): ...@@ -2913,6 +2911,7 @@ class TestInventoryCacheTable(InventoryAPITestCase):
min_lag = cache_lag / 2 min_lag = cache_lag / 2
self.NOW = now = DateTime(DateTime().strftime("%Y-%m-%d %H:%M:%S UTC")) self.NOW = now = DateTime(DateTime().strftime("%Y-%m-%d %H:%M:%S UTC"))
self.CACHE_DATE = cache_date = now - min_lag self.CACHE_DATE = cache_date = now - min_lag
from erp5.component.tool.SimulationTool import MYSQL_MIN_DATETIME_RESOLUTION
self.LAST_CACHED_MOVEMENT_DATE = last_cached_movement_date = \ self.LAST_CACHED_MOVEMENT_DATE = last_cached_movement_date = \
cache_date - MYSQL_MIN_DATETIME_RESOLUTION cache_date - MYSQL_MIN_DATETIME_RESOLUTION
# First movement, won't be into cache # First movement, won't be into cache
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
# #
############################################################################## ##############################################################################
""" """
Products.ERP5Type.interfaces.divergence_message erp5.component.interface.IDivergenceMessage
""" """
from zope.interface import Interface from zope.interface import Interface
......
...@@ -33,11 +33,11 @@ implements_tuple_list = [ ...@@ -33,11 +33,11 @@ implements_tuple_list = [
(('Products.ERP5Type.ObjectMessage', 'ObjectMessage'), 'IObjectMessage'), (('Products.ERP5Type.ObjectMessage', 'ObjectMessage'), 'IObjectMessage'),
(('Products.ERP5Type.ConsistencyMessage', 'ConsistencyMessage'), (('Products.ERP5Type.ConsistencyMessage', 'ConsistencyMessage'),
'IObjectMessage'), 'IObjectMessage'),
(('Products.ERP5Type.DivergenceMessage', 'DivergenceMessage'), (('erp5.component.module.DivergenceMessage', 'DivergenceMessage'),
'IObjectMessage'), 'IObjectMessage'),
(('Products.ERP5Type.ConsistencyMessage', 'ConsistencyMessage'), (('Products.ERP5Type.ConsistencyMessage', 'ConsistencyMessage'),
'IConsistencyMessage'), 'IConsistencyMessage'),
(('Products.ERP5Type.DivergenceMessage', 'DivergenceMessage'), (('erp5.component.module.DivergenceMessage', 'DivergenceMessage'),
'IDivergenceMessage'), 'IDivergenceMessage'),
(('Products.ERP5Type.ERP5Type', 'ERP5TypeInformation'), (('Products.ERP5Type.ERP5Type', 'ERP5TypeInformation'),
'IActionContainer'), 'IActionContainer'),
......
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