Commit 0e746a9a authored by Jérome Perrin's avatar Jérome Perrin

We are destination section on Balance Transaction, not source section. Update tests.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16466 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d65f9d17
...@@ -120,7 +120,8 @@ class AccountingTestCase(ERP5TypeTestCase): ...@@ -120,7 +120,8 @@ class AccountingTestCase(ERP5TypeTestCase):
created_by_builder = kw.pop('created_by_builder', lines is not None) created_by_builder = kw.pop('created_by_builder', lines is not None)
kw.setdefault('start_date', DateTime()) kw.setdefault('start_date', DateTime())
kw.setdefault('resource', 'currency_module/euro') kw.setdefault('resource', 'currency_module/euro')
if portal_type in ('Purchase Invoice Transaction', ): if portal_type in ('Purchase Invoice Transaction',
'Balance Transaction'):
if 'destination_section' not in kw: if 'destination_section' not in kw:
kw.setdefault('destination_section_value', self.section) kw.setdefault('destination_section_value', self.section)
else: else:
......
...@@ -1215,19 +1215,19 @@ class TestAccountingReports(AccountingTestCase): ...@@ -1215,19 +1215,19 @@ class TestAccountingReports(AccountingTestCase):
self._makeOne( self._makeOne(
portal_type='Balance Transaction', portal_type='Balance Transaction',
title='Transaction 0', title='Transaction 0',
source_reference='0', destination_reference='0',
simulation_state='delivered', simulation_state='delivered',
start_date=DateTime(2006, 1, 1), start_date=DateTime(2006, 1, 1),
lines=(dict(source_value=account_module.payable, lines=(dict(destination_value=account_module.payable,
source_credit=600.0, destination_credit=600.0,
destination_section_value= source_section_value=
self.organisation_module.client_1,), self.organisation_module.client_1,),
dict(source_value=account_module.receivable, dict(destination_value=account_module.receivable,
source_debit=400.0, destination_debit=400.0,
destination_section_value= source_section_value=
self.organisation_module.client_2,), self.organisation_module.client_2,),
dict(source_value=account_module.equity, dict(destination_value=account_module.equity,
source_debit=200))) destination_debit=200)))
# one more transaction in the period, because our testing data does not # one more transaction in the period, because our testing data does not
# include the sales # include the sales
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment