diff --git a/product/ERP5/interfaces/amount_generator.py b/product/ERP5/interfaces/amount_generator.py index 568cae1b905465db7968a02281602ff8ad6b3453..7d77a1b5d78bb829d5e50330c09d23897e18fa2b 100644 --- a/product/ERP5/interfaces/amount_generator.py +++ b/product/ERP5/interfaces/amount_generator.py @@ -3,7 +3,7 @@ # # Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved. # Jean-Paul Smets-Solanes <jp@nexedi.com> -# 艁ukasz Nowak <luke@nexedi.com> +# Lukasz Nowak <luke@nexedi.com> # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of assessing all potential @@ -46,6 +46,26 @@ class IAmountGenerator(Interface): def getAggregatedAmountList(context, movement_list=None, rounding=False): """ Returns an IAmountList generated by a model applied to the context. + and aggregated according to the context divergence testers. + + context - an IMovementCollection, an IAmountList or an IAmount + + movement_list - optional IAmountList which can be passed explicitly + whenever context is an IMovementCollection and whenever + we want to filter context.getMovementList + + rounding - boolean argument, which controls if rounding shall be applied on + generated movements or not + + NOTE: + - implement rounding appropriately (True or False seems + simplistic) + - define how to retrieve divergence testers in the context + """ + + def getGeneratedAmountList(context, movement_list=None, rounding=False): + """ + Returns an IAmountList generated by a model applied to the context. context - an IMovementCollection, an IAmountList or an IAmount diff --git a/product/ERP5/interfaces/movement_generator.py b/product/ERP5/interfaces/movement_generator.py index c3e7cdfda4dca239abd537945630bb9b0f4f54e3..fa29fc539b1ff558b5dc76d9c4696cbed4d11ec7 100644 --- a/product/ERP5/interfaces/movement_generator.py +++ b/product/ERP5/interfaces/movement_generator.py @@ -3,7 +3,7 @@ # # Copyright (c) 2009 Nexedi SA and Contributors. All Rights Reserved. # Jean-Paul Smets-Solanes <jp@nexedi.com> -# 艁ukasz Nowak <luke@nexedi.com> +# Lukasz Nowak <luke@nexedi.com> # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of assessing all potential @@ -45,7 +45,8 @@ class IMovementGenerator(Interface): def getAggregatedMovementList(context, movement_list=None, rounding=False): """ - Returns an IMovementList generated by a model applied to the context. + Returns an IMovementList generated by a model applied to the context + and aggregated according to the context divergence testers. context - an IMovementCollection, an IMovementList or an IMovement @@ -59,4 +60,23 @@ class IMovementGenerator(Interface): NOTE: - implement rounding appropriately (True or False seems simplistic) + - define how to retrieve divergence testers in the context """ + + def getGeneratedMovementList(context, movement_list=None, rounding=False): + """ + Returns an IMovementList generated by a model applied to the context + + context - an IMovementCollection, an IMovementList or an IMovement + + movement_list - optional IMovementList which can be passed explicitely + whenever context is an IMovementCollection and whenever + we want to filter context.getMovementList + + rounding - boolean argument, which controls if rounding shall be applied on + generated movements or not + + NOTE: + - implement rounding appropriately (True or False seems + simplistic) + """ \ No newline at end of file diff --git a/product/ERP5/interfaces/movement_group.py b/product/ERP5/interfaces/movement_group.py index d0c9e6b4514f10edf8ddf0ba30b7620ccadcddce..b40f7fbec97b51c37f6a042e5dbdb7d4229c043f 100644 --- a/product/ERP5/interfaces/movement_group.py +++ b/product/ERP5/interfaces/movement_group.py @@ -32,14 +32,22 @@ from zope.interface import 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. + The purpose of MovementGroup is to define how movements are grouped, [YES] XXX + and how values are updated from simulation movements. [NO] XXX """ 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. + + TODO: + - take into account the possibility to use Divergence Testers + to build movement groups + - how does separate method relate to matching provided by + Divergence Testers + - consider an interface for property groups. Is it the same or + different ? """ def separate(movement_list):