[Erp5-report] r20558 - /erp5/trunk/products/ERP5/MovementGroup.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Apr 16 11:09:50 CEST 2008
Author: jerome
Date: Wed Apr 16 11:09:49 2008
New Revision: 20558
URL: http://svn.erp5.org?rev=20558&view=rev
Log:
simplify ColourMovementGroup
Modified:
erp5/trunk/products/ERP5/MovementGroup.py
Modified: erp5/trunk/products/ERP5/MovementGroup.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/MovementGroup.py?rev=20558&r1=20557&r2=20558&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/MovementGroup.py (original)
+++ erp5/trunk/products/ERP5/MovementGroup.py Wed Apr 16 11:09:49 2008
@@ -398,17 +398,6 @@
allow_class(PathMovementGroup)
-class ColourMovementGroup(RootMovementGroup):
- """ Group movements that have the same color category."""
- def __init__(self, movement, **kw):
- RootMovementGroup.__init__(self, movement=movement, **kw)
- self.colour = movement.getColour()
-
- def test(self, movement):
- return movement.getColour() == self.colour
-
-allow_class(ColourMovementGroup)
-
class SectionPathMovementGroup(RootMovementGroup):
""" Groups movement that have the same source_section and
destination_section."""
@@ -1197,5 +1186,9 @@
class PaymentModeMovementGroup(PropertyMovementGroup):
""" Group movements that have the same payment mode."""
_property = 'payment_mode'
-allow_class(PaymentModeMovementGroup)
-
+
+class ColourMovementGroup(RootMovementGroup):
+ """ Group movements that have the same colour category."""
+ _property = 'colour'
+
+
More information about the Erp5-report
mailing list