[Erp5-report] r27631 - /erp5/trunk/products/ERP5/interfaces/transformation.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Jun 17 13:16:04 CEST 2009
Author: luke
Date: Wed Jun 17 13:15:59 2009
New Revision: 27631
URL: http://svn.erp5.org?rev=27631&view=rev
Log:
- formatting and spellchecking
- small fixes to description of interface
Modified:
erp5/trunk/products/ERP5/interfaces/transformation.py
Modified: erp5/trunk/products/ERP5/interfaces/transformation.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/interfaces/transformation.py?rev=27631&r1=27630&r2=27631&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/transformation.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/transformation.py [utf8] Wed Jun 17 13:15:59 2009
@@ -6,10 +6,10 @@
# Łukasz Nowak <luke at 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 @@
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
-
More information about the Erp5-report
mailing list