From 3ef639f6c46cff61035293338c5fe767f256b3e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Wed, 16 Apr 2008 09:09:49 +0000
Subject: [PATCH] simplify ColourMovementGroup

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20558 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/MovementGroup.py | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/product/ERP5/MovementGroup.py b/product/ERP5/MovementGroup.py
index cb84c0240f..2d1272156c 100644
--- a/product/ERP5/MovementGroup.py
+++ b/product/ERP5/MovementGroup.py
@@ -398,17 +398,6 @@ class PathMovementGroup(RootMovementGroup):
 
 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 @@ allow_class(QuantityUnitMovementGroup)
 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'
+
+  
-- 
2.30.9