Commit d56a7a6e authored by Alexandre Boeglin's avatar Alexandre Boeglin

fixed account and accounting_transaction creation


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10209 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 27912c0f
...@@ -229,6 +229,10 @@ class TestBudget(ERP5TypeTestCase): ...@@ -229,6 +229,10 @@ class TestBudget(ERP5TypeTestCase):
portal_type='Account', portal_type='Account',
financial_section='actif/actif_immobilise/immobilisations_financieres') financial_section='actif/actif_immobilise/immobilisations_financieres')
# Open accounts
for account in account_module.objectValues(portal_type='Account'):
account.validate()
# Create some accounting transactions # Create some accounting transactions
self.accounting_transaction1 = accounting_module.newContent( self.accounting_transaction1 = accounting_module.newContent(
portal_type='Accounting Transaction',title='Accounting 1', portal_type='Accounting Transaction',title='Accounting 1',
...@@ -240,12 +244,12 @@ class TestBudget(ERP5TypeTestCase): ...@@ -240,12 +244,12 @@ class TestBudget(ERP5TypeTestCase):
portal_type='Accounting Transaction Line', portal_type='Accounting Transaction Line',
source_section='organisation_module/world_company', source_section='organisation_module/world_company',
resource='currency_module/EUR', source_debit='2000.0', resource='currency_module/EUR', source_debit='2000.0',
source_credit='0.0', source='account_module/account1') source='account_module/account1')
self.accounting_transaction1.newContent( self.accounting_transaction1.newContent(
portal_type='Accounting Transaction Line', portal_type='Accounting Transaction Line',
source_section='organisation_module/world_company', source_section='organisation_module/world_company',
resource='currency_module/EUR', source_debit='0.0', resource='currency_module/EUR', source_credit='2000.0',
source_credit='2000.0', source='account_module/account2') source='account_module/account2')
self.accounting_transaction2 = accounting_module.newContent( self.accounting_transaction2 = accounting_module.newContent(
portal_type='Accounting Transaction',title='Accounting 2', portal_type='Accounting Transaction',title='Accounting 2',
...@@ -257,12 +261,12 @@ class TestBudget(ERP5TypeTestCase): ...@@ -257,12 +261,12 @@ class TestBudget(ERP5TypeTestCase):
portal_type='Accounting Transaction Line', portal_type='Accounting Transaction Line',
source_section='organisation_module/world_company', source_section='organisation_module/world_company',
resource='currency_module/EUR', source_debit='100000.0', resource='currency_module/EUR', source_debit='100000.0',
source_credit='0.0', source='account_module/account1') source='account_module/account1')
self.accounting_transaction2.newContent( self.accounting_transaction2.newContent(
portal_type='Accounting Transaction Line', portal_type='Accounting Transaction Line',
source_section='organisation_module/world_company', source_section='organisation_module/world_company',
resource='currency_module/EUR', source_debit='0.0', resource='currency_module/EUR', source_credit='100000.0',
source_credit='100000.0', source='account_module/account4') source='account_module/account4')
id_list = [] id_list = []
for objects in self.accounting_transaction1.getPortalObject().\ for objects in self.accounting_transaction1.getPortalObject().\
......
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