[Erp5-report] r27609 - /erp5/trunk/products/ERP5/interfaces/transformation.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jun 16 15:46:02 CEST 2009
Author: luke
Date: Tue Jun 16 15:46:00 2009
New Revision: 27609
URL: http://svn.erp5.org?rev=27609&view=rev
Log:
- add parameters needed in implementation
- fix typos
- rewrite and extend docstrings
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=27609&r1=27608&r2=27609&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/interfaces/transformation.py [utf8] (original)
+++ erp5/trunk/products/ERP5/interfaces/transformation.py [utf8] Tue Jun 16 15:46:00 2009
@@ -34,21 +34,24 @@
class ITransformation(Interface):
"""
- Common Interface to implementing quering of Indirect Amount
+ Common Interface to implementing querying of Indirect Amount
Models (TaxModelLine, InvoiceModelLine) shall be based on this interface
TODO:
- define parameters precisely for each method
"""
- def getAggregatedAmountList(context):
+ def getAggregatedAmountList(context, movement_list=None, rounding=False):
"""Returns implementation specific AggregatedAmountList of amounts
generated by set of rules
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
- The method returns an instance of AggregatedAmountList class defined
- at ERP5/AggregatedAmountList.py
+ Returns list of instance of AggregatedAmountList class
Note: This method shall be linear in case if context is order, line,
applied rule or movement. In case of built delivery this method shall
@@ -57,16 +60,17 @@
"""
pass
- def updateAggregatedAmountList(context):
+ def updateAggregatedAmountList(context, movement_list=None, rounding=False):
"""Updates existing movement and returns new or deleted if any.
- Returns a dict of list of movement 'movement_to_add_list' and
+ Returns a dictionary of list of movement 'movement_to_add_list' and
'movement_to_delete_list'
context - represents object on which update shall happen
-
- The method return a dict of list of movements : 'movement_to_add_list' and
- 'movement_to_delete_list'.
+ 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
"""
pass
More information about the Erp5-report
mailing list