[Erp5-report] r20217 - /erp5/trunk/products/ERP5/tests/testAccountingReports.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Mar 31 11:11:09 CEST 2008
Author: jerome
Date: Mon Mar 31 11:11:07 2008
New Revision: 20217
URL: http://svn.erp5.org?rev=20217&view=rev
Log:
Passing "stop" transition on accounting workflow will remove grouping
references if the group is not valid, so pass this transition later (when the
group is valid).
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=20217&r1=20216&r2=20217&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testAccountingReports.py (original)
+++ erp5/trunk/products/ERP5/tests/testAccountingReports.py Mon Mar 31 11:11:07 2008
@@ -768,7 +768,6 @@
portal_type='Sale Invoice Transaction',
title='Transaction 2',
source_reference='2',
- simulation_state='delivered',
destination_section_value=self.organisation_module.client_1,
start_date=DateTime(2006, 2, 2),
lines=(dict(source_value=account_module.receivable,
@@ -792,13 +791,15 @@
dict(source_value=account_module.receivable,
grouping_reference='A',
source_credit=200.0)))
+ # we validate t2 later, otherwise grouping reference will be cleaned up
+ t2.stop()
+ t2.deliver()
# Another invoice, grouped with a payment transaction in the period
t4 = self._makeOne(
portal_type='Sale Invoice Transaction',
title='Transaction 4',
source_reference='4',
- simulation_state='delivered',
destination_section_value=self.organisation_module.client_1,
start_date=DateTime(2006, 2, 4),
lines=(dict(source_value=account_module.receivable,
@@ -820,7 +821,11 @@
dict(source_value=account_module.receivable,
grouping_reference='B',
source_credit=400.0)))
-
+ t4.stop()
+ t4.deliver()
+ get_transaction().commit()
+ self.tic()
+
# set request variables and render
request_form = self.portal.REQUEST.form
request_form['node'] = \
@@ -2080,7 +2085,7 @@
if group != 'hidden':
for field in form.get_fields_in_group(group):
if field.getId() != 'listbox':
- self.fail('Field %s should not be visible', field.getId())
+ self.fail('Field %s should not be visible' % field.getId())
report_section.popReport(self.portal)
# report layout
More information about the Erp5-report
mailing list