[Erp5-report] r13977 - /erp5/trunk/products/ERP5/tests/testAccountingReports.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Apr 5 15:33:29 CEST 2007


Author: jerome
Date: Thu Apr  5 15:33:28 2007
New Revision: 13977

URL: http://svn.erp5.org?rev=13977&view=rev
Log:
Set different dates on created transactions, because we sort on dates and we
have to be sure of the order.


Modified:
    erp5/trunk/products/ERP5/tests/testAccountingReports.py

Modified: erp5/trunk/products/ERP5/tests/testAccountingReports.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testAccountingReports.py?rev=13977&r1=13976&r2=13977&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testAccountingReports.py (original)
+++ erp5/trunk/products/ERP5/tests/testAccountingReports.py Thu Apr  5 15:33:28 2007
@@ -116,7 +116,11 @@
               title='Second One',
               simulation_state='delivered',
               destination_section_value=self.organisation_module.client_2,
-              start_date=DateTime(2006, 2, 2),
+              start_date=DateTime(2006, 2, 2, 1, 1), # XXX we have to force
+              # different values of hour minutes, because /for now/ sorting is
+              # done on date, uid. Sorting on [source|destination]_reference
+              # would be too heavy, and we just want a sort on date, with a
+              # stable order (hence the cheap sort on uid)
               lines=(dict(source_value=account_module.receivable,
                           source_debit=239.20),
                      dict(source_value=account_module.collected_vat,
@@ -221,7 +225,7 @@
     # Second Transaction
     self.checkLineProperties(data_line_list[3],
                             specific_reference=second.getSourceReference(),
-                            date=DateTime(2006, 2, 2),
+                            date=DateTime(2006, 2, 2, 1, 1),
                             title='Second One',
                             node_title='41',
                             mirror_section_title='Client 2',




More information about the Erp5-report mailing list