Commit bb46ce34 authored by Romain Courteaud's avatar Romain Courteaud

Add TradePathMovementGroup.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5072 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e0f7a33e
......@@ -336,6 +336,27 @@ class SectionPathMovementGroup(RootMovementGroup):
allow_class(SectionPathMovementGroup)
class TradePathMovementGroup(RootMovementGroup):
"""
Group movements that have the same source_trade and the same
destination_trade.
"""
def __init__(self, movement, **kw):
RootMovementGroup.__init__(self, movement=movement, **kw)
self.source_trade = movement.getSourceTrade()
self.destination_trade = movement.getDestinationTrade()
self.setGroupEdit(
source_trade_value=movement.getSourceTradeValue(),
destination_trade_value=movement.getDestinationTradeValue(),
)
def test(self, movement):
return movement.getSourceTrade() == self.source_trade and \
movement.getDestinationTrade() == self.destination_trade
allow_class(TradePathMovementGroup)
# XXX Naming issue ?
class QuantitySignMovementGroup(RootMovementGroup):
def __init__(self, movement, **kw):
......
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