Index: WAeUP_SRP/base/WAeUPTables.py
===================================================================
--- WAeUP_SRP/base/WAeUPTables.py	(revision 2910)
+++ WAeUP_SRP/base/WAeUPTables.py	(revision 2911)
@@ -1452,14 +1452,7 @@
             return
         if mt == 'CPS Proxy Folder':
-            if event_type == "sys_add_object":
-                return # is handled in modify since we don't have order_id yet
-                # try:
-                #     self.addRecord(order_id = order_id)
-                # except ValueError:
-                #     pass
-                # return
-            elif event_type == 'sys_del_object':
-                self.deleteRecord(order_id)
-            return
+            return # is handled only for the real object
+        if event_type == 'sys_del_object':
+            self.deleteRecord(object.order_id)
         if event_type not in ('sys_modify_object'):
             return
Index: WAeUP_SRP/base/skins/waeup_epayment/purgePayments.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/purgePayments.py	(revision 2910)
+++ WAeUP_SRP/base/skins/waeup_epayment/purgePayments.py	(revision 2911)
@@ -56,15 +56,8 @@
 keep_count = 0
 payments_folder = None
-#set_trace()
 count = 0
-s_payments = {}
 commit_after = 50
-#set_trace()
 for payment in payments:
     p_sid = payment.getPath().split('/')[-3]
-    # if not s_payments.has_key(p_sid):
-    #     s_payments[p_sid] = [payment,]
-    # else:
-    #     s_payments[p_sid] = context.waeup_tool.addtodict(s_payments,p_sid, payment)
     if sid != p_sid:
         if count and to_del:
@@ -72,12 +65,14 @@
                 context.waeup_tool.doCommit()
                 logger.info("committing %d total %d" % (commit_after,delete_count_student))
+            msg = "(%d/%d) found %d payments to remove, %d to keep for %s" % (count,
+                                                                              delete_count_student % commit_after,
+                                                                              len(to_del),
+                                                                              student_keep_count,
+                                                                              sid)
+            #rwrite( msg)
             delete_count_student += 1
-            msg = "(%d) found %d payments to remove, %d to keep for %s" % (count,
-                                                                    len(to_del),
-                                                                    student_keep_count,
-                                                                    sid)
-            #rwrite( msg)
+            logger.info(msg)
             payments_folder = getattr(getattr(students_folder,sid),'payments',None)
-            logger.info("deleting %s of %s %d" % (' '.join(to_del),sid,delete_count_student))
+            msg = "deleted %s of %s" % (' '.join(to_del),sid)
             payments_folder.manage_delObjects(to_del)
             logger.info(msg)
@@ -86,5 +81,5 @@
                                                                   student_keep_count,
                                                                   sid,
-                                                                  review_state)
+                                                                  review_state,)
             #rwrite( msg)
         sid = p_sid
@@ -102,12 +97,14 @@
                         "courses_registered",
                         "courses_validated",
-                        ):
-        if payment.review_state == "opened":
-            #rwrite("%s : %s" % (sid,payment.Title))
-            delete_count += 1
-            to_del += payment.getId,
-        else:
-            keep_count += 1
-            student_keep_count += 1
+                       ):
+        delete_count += 1
+        to_del += payment.getId,
+        # if payment.review_state == "opened":
+        #     #rwrite("%s : %s" % (sid,payment.Title))
+        #     delete_count += 1
+        #     to_del += payment.getId,
+        # else:
+        #     keep_count += 1
+        #     student_keep_count += 1
     else:
         keep_count += 1
