From 2efb3ff09f9f0b939fe23869efceee1c8a654168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com> Date: Wed, 17 Jun 2009 11:15:59 +0000 Subject: [PATCH] - formatting and spellchecking - small fixes to description of interface git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27631 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/interfaces/transformation.py | 30 +++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/product/ERP5/interfaces/transformation.py b/product/ERP5/interfaces/transformation.py index dbf80c447c..9c8fe0d7c1 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 - -- 2.30.9