Commit 8f8ca090 authored by Romain Courteaud's avatar Romain Courteaud

Update IMovementGroup.

Update interface test to check IMovementGroup.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29311 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cb9ff1d3
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet, interfaces
import zope.interface
class MovementGroup(XMLObject): class MovementGroup(XMLObject):
""" """
...@@ -37,6 +38,8 @@ class MovementGroup(XMLObject): ...@@ -37,6 +38,8 @@ class MovementGroup(XMLObject):
meta_type = 'ERP5 Movement Group' meta_type = 'ERP5 Movement Group'
portal_type = 'Movement Group' portal_type = 'Movement Group'
zope.interface.implements( interfaces.IMovementGroup, )
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
......
...@@ -30,8 +30,24 @@ ...@@ -30,8 +30,24 @@
from zope.interface import Interface from zope.interface import Interface
class IMovementGroup(Interface): class IMovementGroup(Interface):
"""Movement Group interface specification
The purpose of MovementGroup is to define how movements are grouped,
and how values are updated from simulation movements.
""" """
XXX - add documentation here def test(document, property_dict, **kw):
"""Returns a tuple of 2 values.
First one is True if document contains identical values than some
contained property_dict.
Second one is a modified version of property_dict.
""" """
#XXX - add documentation here def separate(movement_list):
"""
Returns a list of lists of movements, which are grouped by some of their
properties.
"""
def isBranch():
"""Returns True if self can be taken as branch point by the builder.
"""
...@@ -57,6 +57,29 @@ implements_tuple_list = [ ...@@ -57,6 +57,29 @@ implements_tuple_list = [
('TextDocument', 'IDocument'), ('TextDocument', 'IDocument'),
('EmailDocument', 'IDocument'), ('EmailDocument', 'IDocument'),
('Event', 'IDocument'), ('Event', 'IDocument'),
#IMovementGroup
('MovementGroup', 'IMovementGroup'),
('BaseVariantMovementGroup', 'IMovementGroup'),
('CategoryMovementGroup', 'IMovementGroup'),
('CausalityAssignmentMovementGroup', 'IMovementGroup'),
('CausalityMovementGroup', 'IMovementGroup'),
('DayMovementGroup', 'IMovementGroup'),
('DeliveryCausalityAssignmentMovementGroup', 'IMovementGroup'),
('FirstCausalityMovementGroup', 'IMovementGroup'),
('MonthlyRangeMovementGroup', 'IMovementGroup'),
('NestedLineMovementGroup', 'IMovementGroup'),
('OrderMovementGroup', 'IMovementGroup'),
('ParentExplanationMovementGroup', 'IMovementGroup'),
('PropertyAssignmentMovementGroup', 'IMovementGroup'),
('PropertyMovementGroup', 'IMovementGroup'),
('QuantitySignMovementGroup', 'IMovementGroup'),
('RequirementMovementGroup', 'IMovementGroup'),
('RootAppliedRuleCausalityMovementGroup', 'IMovementGroup'),
('SplitMovementGroup', 'IMovementGroup'),
('TaxLineDeliveryMovementGroup', 'IMovementGroup'),
('TitleMovementGroup', 'IMovementGroup'),
('VariantMovementGroup', 'IMovementGroup'),
('VariationPropertyMovementGroup', 'IMovementGroup'),
] ]
class TestERP5Interfaces(ERP5TypeTestCase): class TestERP5Interfaces(ERP5TypeTestCase):
......
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