Commit 1ef807c2 authored by Łukasz Nowak's avatar Łukasz Nowak

- docstrings update

 - move description to interface


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27479 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 799e981b
...@@ -79,11 +79,6 @@ class TradeCondition(Path, Transformation): ...@@ -79,11 +79,6 @@ class TradeCondition(Path, Transformation):
security.declareProtected(Permissions.ModifyPortalContent, security.declareProtected(Permissions.ModifyPortalContent,
'updateAggregatedAmountList') 'updateAggregatedAmountList')
def updateAggregatedAmountList(self, context, **kw): def updateAggregatedAmountList(self, context, **kw):
'''
updates exisiting movement and returns new if any
return a dict of list of movement 'movement_to_add_list' and
'movement_to_delete_list'
'''
existing_movement_list = context.getMovementList() existing_movement_list = context.getMovementList()
aggregated_amount_list = self.getAggregatedAmountList(context=context, aggregated_amount_list = self.getAggregatedAmountList(context=context,
**kw) **kw)
...@@ -128,9 +123,10 @@ class TradeCondition(Path, Transformation): ...@@ -128,9 +123,10 @@ class TradeCondition(Path, Transformation):
'findSpecialiseValueList') 'findSpecialiseValueList')
def findSpecialiseValueList(self, context, portal_type_list=None, def findSpecialiseValueList(self, context, portal_type_list=None,
visited_trade_condition_list=None): visited_trade_condition_list=None):
'''Return a list of object. The list will represent the inheritance tree. """Returns a list of specialised objects representing inheritance tree.
It uses Breadth First Search.
''' Uses Breadth First Search.
"""
if visited_trade_condition_list is None: if visited_trade_condition_list is None:
visited_trade_condition_list = [] visited_trade_condition_list = []
specialise_value_list = [] specialise_value_list = []
...@@ -151,8 +147,8 @@ class TradeCondition(Path, Transformation): ...@@ -151,8 +147,8 @@ class TradeCondition(Path, Transformation):
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getTradeModelLineComposedList') 'getTradeModelLineComposedList')
def getTradeModelLineComposedList(self, context=None, portal_type_list=None): def getTradeModelLineComposedList(self, context=None, portal_type_list=None):
""" """Returns list of Trade Model Lines using composition.
Returns list of Trade Model Lines using composition
Reference of Trade Model Line is used to hide other Trade Model Line Reference of Trade Model Line is used to hide other Trade Model Line
In chain first found Trade Model Line has precedence In chain first found Trade Model Line has precedence
Context's, if not None, Trade Model Lines have precedence Context's, if not None, Trade Model Lines have precedence
......
...@@ -54,7 +54,10 @@ class ITransformation(Interface): ...@@ -54,7 +54,10 @@ class ITransformation(Interface):
pass pass
def updateAggregatedAmountList(context): def updateAggregatedAmountList(context):
"""Updates currently existing movements on delivery """Updates existing movement and returns new or deleted if any.
Returns a dict of list of movement 'movement_to_add_list' and
'movement_to_delete_list'
context - represents object on which update shall happen context - represents object on which update shall happen
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment