diff --git a/product/ERP5/interfaces/transformation.py b/product/ERP5/interfaces/transformation.py index dbf80c447cfedb433124f0d92a81c062f2ca298a..9c8fe0d7c111ff0f79998a492a9e8763de7b9b3d 100644 --- a/product/ERP5/interfaces/transformation.py +++ b/product/ERP5/interfaces/transformation.py @@ -6,10 +6,10 @@ # Åukasz Nowak <luke@nexedi.com> # # WARNING: This program as such is intended to be used by professional -# programmers who take the whole responsability of assessing all potential +# programmers who take the whole responsibility of assessing all potential # consequences resulting from its eventual inadequacies and bugs # End users who are looking for a ready-to-use solution with commercial -# garantees and support are strongly adviced to contract a Free Software +# guarantees and support are strongly advised to contract a Free Software # Service Company # # This program is Free Software; you can redistribute it and/or @@ -28,26 +28,23 @@ # ############################################################################## -# simple interface which have to be implemented on TradeModelLine, -# Transformation, Pay Sheet Model, etc from zope.interface import Interface class ITransformation(Interface): """ Common Interface to implementing querying of Indirect Amount - Models (TaxModelLine, InvoiceModelLine) shall be based on this interface - - TODO: - - define parameters precisely for each method + Models (TaxModelLine, InvoiceModelLine, etc) shall be based on this + interface """ def getAggregatedAmountList(context, movement_list=None, rounding=False): - """Returns implementation specific AggregatedAmountList of amounts - generated by set of rules + """Returns list of amounts generated by set of models context - represents object for which calculation shall happen + movement_list - optional argument, movement list to apply on, if not passed it will be generated from passed context + rounding - boolean argument, which controls if rounding shall be applied on generated movements or not @@ -61,16 +58,19 @@ class ITransformation(Interface): pass def updateAggregatedAmountList(context, movement_list=None, rounding=False): - """Updates existing movement and returns new or deleted if any. - - Returns a dictionary of list of movement 'movement_to_add_list' and - 'movement_to_delete_list' + """Updates existing movement and returns new or deleted if any according to model context - represents object on which update shall happen + movement_list - optional argument, movement list to apply on, if not passed it will be generated from passed context + rounding - boolean argument, which controls if rounding shall be applied on generated movements or not + + Returns a dictionary of list of instances of AggregatedAmountList class. + Dictionary contain lists described by keys: + * movement_to_add_list - list for movements which shall be added + * movement_to_delete_list - list of movements which shall be deleted """ pass -