Commit 8ebaa20c authored by Sebastien Robin's avatar Sebastien Robin

added description on all documents, it is necassary for some customer...

added description on all documents, it is necassary for some customer interfaces, fixed the usual cash transfer test

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11421 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e68fc835
...@@ -209,8 +209,12 @@ class TestERP5BankingAccountIncident(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -209,8 +209,12 @@ class TestERP5BankingAccountIncident(TestERP5BankingMixin, ERP5TypeTestCase):
Create a cash transfer document and check it Create a cash transfer document and check it
""" """
# Cash transfer has usual_cash for source, counter for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 ) # Cash transfer has usual_cash for source, counter for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 )
self.account_incident = self.account_incident_module.newContent(id='account_incident_1', portal_type='Account Incident', source_total_asset_price=52400.0, self.account_incident = self.account_incident_module.newContent(
destination_payment_value=self.bank_account_1) id='account_incident_1',
portal_type='Account Incident',
source_total_asset_price=52400.0,
description='test',
destination_payment_value=self.bank_account_1)
# execute tic # execute tic
self.stepTic() self.stepTic()
# set source reference # set source reference
......
...@@ -272,7 +272,13 @@ class TestERP5BankingCashBalanceRegulation(TestERP5BankingMixin, ERP5TypeTestCas ...@@ -272,7 +272,13 @@ class TestERP5BankingCashBalanceRegulation(TestERP5BankingMixin, ERP5TypeTestCas
def stepCreateCashBalanceRegulation(self, sequence=None, sequence_list=None, **kwd): def stepCreateCashBalanceRegulation(self, sequence=None, sequence_list=None, **kwd):
self.cash_balance_regulation = self.cash_balance_regulation_module.newContent(id='cash_balance_regulation_1', portal_type='Cash Balance Regulation', source_value=self.guichet_1, destination_value=None, source_total_asset_price=52400.0) self.cash_balance_regulation = self.cash_balance_regulation_module.newContent(
id='cash_balance_regulation_1',
portal_type='Cash Balance Regulation',
source_value=self.guichet_1,
destination_value=None,
description='test',
source_total_asset_price=52400.0)
self.stepTic() self.stepTic()
self.assertEqual(len(self.cash_balance_regulation_module.objectValues()), 1) self.assertEqual(len(self.cash_balance_regulation_module.objectValues()), 1)
self.cash_balance_regulation = getattr(self.cash_balance_regulation_module, 'cash_balance_regulation_1') self.cash_balance_regulation = getattr(self.cash_balance_regulation_module, 'cash_balance_regulation_1')
......
...@@ -220,7 +220,13 @@ class TestERP5BankingCashClassification(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -220,7 +220,13 @@ class TestERP5BankingCashClassification(TestERP5BankingMixin, ERP5TypeTestCase):
Create a cash sorting document and check it Create a cash sorting document and check it
""" """
# Cash sorting has encaisse_paris for source, encaisse_externe for destination, and a price cooreponding to the sum of banknote of 10000 and banknotes of 200 ( (2+3) * 1000 + (5+7) * 200 ) # Cash sorting has encaisse_paris for source, encaisse_externe for destination, and a price cooreponding to the sum of banknote of 10000 and banknotes of 200 ( (2+3) * 1000 + (5+7) * 200 )
self.cash_sorting = self.cash_sorting_module.newContent(id='cash_sorting_1', portal_type='Cash Sorting', source_value=self.encaisse_tri, destination_value=None, source_total_asset_price=52400.0) self.cash_sorting = self.cash_sorting_module.newContent(
id='cash_sorting_1',
portal_type='Cash Sorting',
source_value=self.encaisse_tri,
description='test',
destination_value=None,
source_total_asset_price=52400.0)
# execute tic # execute tic
self.stepTic() self.stepTic()
# set source reference # set source reference
......
...@@ -229,7 +229,14 @@ class TestERP5BankingCashExchange(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -229,7 +229,14 @@ class TestERP5BankingCashExchange(TestERP5BankingMixin, ERP5TypeTestCase):
Create a cash sorting document and check it Create a cash sorting document and check it
""" """
# Cash sorting has encaisse_paris for source, guichet_1 for destination, and a price cooreponding to the sum of banknote of 10000 and banknotes of 200 ( (2+3) * 10000 + (2+3) * 200 ) # Cash sorting has encaisse_paris for source, guichet_1 for destination, and a price cooreponding to the sum of banknote of 10000 and banknotes of 200 ( (2+3) * 10000 + (2+3) * 200 )
self.cash_exchange = self.cash_exchange_module.newContent(id='cash_exchange_1', portal_type='Cash Exchange', source_value=self.guichet, destination_value=None, resource_value = self.currency_1, source_total_asset_price=52400.0) self.cash_exchange = self.cash_exchange_module.newContent(
id='cash_exchange_1',
portal_type='Cash Exchange',
source_value=self.guichet,
destination_value=None,
description='test',
resource_value = self.currency_1,
source_total_asset_price=52400.0)
# execute tic # execute tic
self.stepTic() self.stepTic()
# check we have only one cash sorting # check we have only one cash sorting
......
...@@ -178,7 +178,11 @@ class TestERP5BankingCashIncident(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -178,7 +178,11 @@ class TestERP5BankingCashIncident(TestERP5BankingMixin, ERP5TypeTestCase):
Create a cash transfer document and check it Create a cash transfer document and check it
""" """
# Cash transfer has usual_cash for source, counter for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 ) # Cash transfer has usual_cash for source, counter for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 )
self.cash_incident = self.cash_incident_module.newContent(id='cash_incident_1', portal_type='Cash Incident', source_total_asset_price=52400.0,) self.cash_incident = self.cash_incident_module.newContent(
id='cash_incident_1',
portal_type='Cash Incident',
description='test',
source_total_asset_price=52400.0,)
# execute tic # execute tic
self.stepTic() self.stepTic()
# set source reference # set source reference
......
...@@ -228,9 +228,13 @@ class TestERP5BankingCashMovement(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -228,9 +228,13 @@ class TestERP5BankingCashMovement(TestERP5BankingMixin, ERP5TypeTestCase):
# Cash Movement has vault_source (Gros versment) for source, vault_destination for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 ) # Cash Movement has vault_source (Gros versment) for source, vault_destination for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 )
self.cash_movement = self.cash_movement_module.newContent(id='cash_movement_1', self.cash_movement = self.cash_movement_module.newContent(
portal_type='Cash Movement', source=self.vault_source.getRelativeUrl(), id='cash_movement_1',
destination=self.vault_destination.getRelativeUrl(), source_total_asset_price=52400.0) portal_type='Cash Movement',
source=self.vault_source.getRelativeUrl(),
destination=self.vault_destination.getRelativeUrl(),
description='test',
source_total_asset_price=52400.0)
# execute tic # execute tic
self.stepTic() self.stepTic()
# check we have only one vault transfer # check we have only one vault transfer
......
...@@ -220,7 +220,13 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -220,7 +220,13 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase):
Create a cash sorting document and check it Create a cash sorting document and check it
""" """
# Cash sorting has encaisse_paris for source, encaisse_externe for destination, and a price cooreponding to the sum of banknote of 10000 and banknotes of 200 ( (2+3) * 1000 + (5+7) * 200 ) # Cash sorting has encaisse_paris for source, encaisse_externe for destination, and a price cooreponding to the sum of banknote of 10000 and banknotes of 200 ( (2+3) * 1000 + (5+7) * 200 )
self.cash_sorting = self.cash_sorting_module.newContent(id='cash_sorting_1', portal_type='Cash Sorting', source_value=self.encaisse_tri, destination_value=None, source_total_asset_price=52400.0) self.cash_sorting = self.cash_sorting_module.newContent(
id='cash_sorting_1',
portal_type='Cash Sorting',
source_value=self.encaisse_tri,
destination_value=None,
description='test',
source_total_asset_price=52400.0)
# execute tic # execute tic
self.stepTic() self.stepTic()
# set source reference # set source reference
......
...@@ -196,7 +196,11 @@ class TestERP5BankingCashSortingIncident(TestERP5BankingMixin, ERP5TypeTestCase) ...@@ -196,7 +196,11 @@ class TestERP5BankingCashSortingIncident(TestERP5BankingMixin, ERP5TypeTestCase)
Create a cash transfer document and check it Create a cash transfer document and check it
""" """
# Cash transfer has usual_cash for source, counter for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 ) # Cash transfer has usual_cash for source, counter for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 )
self.cash_sorting_incident = self.cash_sorting_incident_module.newContent(id='cash_sorting_incident_1', portal_type='Cash Sorting Incident', source_total_asset_price=52400.0,) self.cash_sorting_incident = self.cash_sorting_incident_module.newContent(
id='cash_sorting_incident_1',
portal_type='Cash Sorting Incident',
description='test',
source_total_asset_price=52400.0,)
# execute tic # execute tic
self.stepTic() self.stepTic()
# check we have only one cash transfer # check we have only one cash transfer
......
...@@ -223,7 +223,14 @@ class TestERP5BankingCashToCurrencyPurchase(TestERP5BankingMixin, ERP5TypeTestCa ...@@ -223,7 +223,14 @@ class TestERP5BankingCashToCurrencyPurchase(TestERP5BankingMixin, ERP5TypeTestCa
Create a cash sorting document and check it Create a cash sorting document and check it
""" """
# Cash sorting has encaisse_paris for source, guichet_1 for destination, and a price cooreponding to the sum of banknote of 10000 and banknotes of 200 ( (2+3) * 10000 + (2+3) * 200 ) # Cash sorting has encaisse_paris for source, guichet_1 for destination, and a price cooreponding to the sum of banknote of 10000 and banknotes of 200 ( (2+3) * 10000 + (2+3) * 200 )
self.cash_to_currency_purchase = self.cash_to_currency_purchase_module.newContent(id='cash_to_currency_purchase_1', portal_type='Cash To Currency Purchase', source_value=self.guichet, destination_value=None, resource_value = self.currency_2, source_total_asset_price=100.0) self.cash_to_currency_purchase = self.cash_to_currency_purchase_module.newContent(
id='cash_to_currency_purchase_1',
portal_type='Cash To Currency Purchase',
source_value=self.guichet,
destination_value=None,
description='test',
resource_value = self.currency_2,
source_total_asset_price=100.0)
# execute tic # execute tic
self.stepTic() self.stepTic()
# check we have only one cash sorting # check we have only one cash sorting
......
...@@ -212,6 +212,7 @@ class TestERP5BankingCashToCurrencySale(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -212,6 +212,7 @@ class TestERP5BankingCashToCurrencySale(TestERP5BankingMixin, ERP5TypeTestCase):
portal_type='Cash To Currency Sale', portal_type='Cash To Currency Sale',
source_value=self.guichet, source_value=self.guichet,
destination_value=None, destination_value=None,
description='test',
resource_value = self.currency_2, resource_value = self.currency_2,
source_total_asset_price=100.0, source_total_asset_price=100.0,
discount = 3000.0, quantity = 70000.0) discount = 3000.0, quantity = 70000.0)
......
...@@ -178,12 +178,14 @@ class TestERP5BankingCheckDeposit(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -178,12 +178,14 @@ class TestERP5BankingCheckDeposit(TestERP5BankingMixin, ERP5TypeTestCase):
""" """
Create a check deposit document and check it Create a check deposit document and check it
""" """
self.check_deposit = self.check_deposit_module.newContent(id = 'check_deposit', self.check_deposit = self.check_deposit_module.newContent(
portal_type = 'Check Deposit', id = 'check_deposit',
destination_payment_value = self.bank_account_1, portal_type = 'Check Deposit',
start_date = DateTime().Date(), destination_payment_value = self.bank_account_1,
source_total_asset_price = 500.0, start_date = DateTime().Date(),
resource_value=self.currency_1) source_total_asset_price = 500.0,
description='test',
resource_value=self.currency_1)
self.assertNotEqual(self.check_deposit, None) self.assertNotEqual(self.check_deposit, None)
self.assertEqual(self.check_deposit.getTotalPrice(), 0.0) self.assertEqual(self.check_deposit.getTotalPrice(), 0.0)
......
...@@ -220,6 +220,7 @@ class TestERP5BankingCheckPaymentMixin: ...@@ -220,6 +220,7 @@ class TestERP5BankingCheckPaymentMixin:
# aggregate_value = self.check_1, # aggregate_value = self.check_1,
resource_value = self.currency_1, resource_value = self.currency_1,
aggregate_free_text = "50", aggregate_free_text = "50",
description = "test",
# source_value = self.bi_counter, # source_value = self.bi_counter,
start_date = DateTime().Date(), start_date = DateTime().Date(),
source_total_asset_price = 20000.0) source_total_asset_price = 20000.0)
......
...@@ -235,6 +235,7 @@ class TestERP5BankingCheckbookDelivery(TestERP5BankingCheckbookDeliveryMixin, ...@@ -235,6 +235,7 @@ class TestERP5BankingCheckbookDelivery(TestERP5BankingCheckbookDeliveryMixin,
resource_value=self.checkbook_model_1, resource_value=self.checkbook_model_1,
check_amount_value=self.checkbook_model_1.variant_1, check_amount_value=self.checkbook_model_1.variant_1,
reference_range_min=1, reference_range_min=1,
description='test',
reference_range_max=50, reference_range_max=50,
aggregate_value=self.checkbook_1 aggregate_value=self.checkbook_1
) )
......
...@@ -182,9 +182,13 @@ class TestERP5BankingCheckbookMovement(TestERP5BankingCheckbookVaultTransferMixi ...@@ -182,9 +182,13 @@ class TestERP5BankingCheckbookMovement(TestERP5BankingCheckbookVaultTransferMixi
""" """
# We will do the transfer ot two items. # We will do the transfer ot two items.
self.checkbook_movement = self.checkbook_movement_module.newContent( self.checkbook_movement = self.checkbook_movement_module.newContent(
id='checkbook_movement', portal_type='Checkbook Movement', id='checkbook_movement',
source_value=self.source_site, destination_value=self.destination_site, portal_type='Checkbook Movement',
resource_value=self.currency_1,start_date=self.date) source_value=self.source_site,
destination_value=self.destination_site,
resource_value=self.currency_1,
description='test',
start_date=self.date)
# check its portal type # check its portal type
self.assertEqual(self.checkbook_movement.getPortalType(), 'Checkbook Movement') self.assertEqual(self.checkbook_movement.getPortalType(), 'Checkbook Movement')
# check source # check source
......
...@@ -166,6 +166,7 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -166,6 +166,7 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin, ERP5TypeTestCase):
id='checkbook_reception', portal_type='Checkbook Reception', id='checkbook_reception', portal_type='Checkbook Reception',
source_value=None, destination_value=self.destination_site, source_value=None, destination_value=self.destination_site,
resource_value=self.currency_1, resource_value=self.currency_1,
description='test',
start_date=self.date) start_date=self.date)
# get the checkbook reception document # get the checkbook reception document
self.checkbook_reception = getattr(self.checkbook_reception_module, 'checkbook_reception') self.checkbook_reception = getattr(self.checkbook_reception_module, 'checkbook_reception')
......
...@@ -93,6 +93,7 @@ class TestERP5BankingCheckbookUsualCashTransferMixin( ...@@ -93,6 +93,7 @@ class TestERP5BankingCheckbookUsualCashTransferMixin(
id='checkbook_vault_transfer', portal_type='Checkbook Vault Transfer', id='checkbook_vault_transfer', portal_type='Checkbook Vault Transfer',
source_value=self.vault_transfer_source_site, source_value=self.vault_transfer_source_site,
destination_value=self.vault_transfer_destination_site, destination_value=self.vault_transfer_destination_site,
description='test',
start_date=(self.date-3)) start_date=(self.date-3))
# Add a line for traveler check # Add a line for traveler check
self.line_2 = self.checkbook_vault_transfer.newContent(quantity=1, self.line_2 = self.checkbook_vault_transfer.newContent(quantity=1,
......
...@@ -54,6 +54,7 @@ class TestERP5BankingCheckbookVaultTransferMixin: ...@@ -54,6 +54,7 @@ class TestERP5BankingCheckbookVaultTransferMixin:
self.checkbook_reception = self.checkbook_reception_module.newContent( self.checkbook_reception = self.checkbook_reception_module.newContent(
id='checkbook_reception', portal_type='Checkbook Reception', id='checkbook_reception', portal_type='Checkbook Reception',
source_value=None, destination_value=self.reception_destination_site, source_value=None, destination_value=self.reception_destination_site,
description='test',
start_date=(self.date-4)) start_date=(self.date-4))
# get the checkbook reception document # get the checkbook reception document
self.checkbook_reception = getattr(self.checkbook_reception_module, 'checkbook_reception') self.checkbook_reception = getattr(self.checkbook_reception_module, 'checkbook_reception')
...@@ -86,6 +87,7 @@ class TestERP5BankingCheckbookVaultTransferMixin: ...@@ -86,6 +87,7 @@ class TestERP5BankingCheckbookVaultTransferMixin:
self.checkbook_reception = self.checkbook_reception_module.newContent( self.checkbook_reception = self.checkbook_reception_module.newContent(
id='checkbook_reception', portal_type='Checkbook Reception', id='checkbook_reception', portal_type='Checkbook Reception',
source_value=None, destination_value=self.reception_destination_site, source_value=None, destination_value=self.reception_destination_site,
description='test',
start_date=(self.date-4)) start_date=(self.date-4))
# get the checkbook reception document # get the checkbook reception document
self.checkbook_reception = getattr(self.checkbook_reception_module, 'checkbook_reception') self.checkbook_reception = getattr(self.checkbook_reception_module, 'checkbook_reception')
...@@ -264,6 +266,7 @@ class TestERP5BankingCheckbookVaultTransfer(TestERP5BankingCheckbookVaultTransfe ...@@ -264,6 +266,7 @@ class TestERP5BankingCheckbookVaultTransfer(TestERP5BankingCheckbookVaultTransfe
self.checkbook_vault_transfer = self.checkbook_vault_transfer_module.newContent( self.checkbook_vault_transfer = self.checkbook_vault_transfer_module.newContent(
id='checkbook_vault_transfer', portal_type='Checkbook Vault Transfer', id='checkbook_vault_transfer', portal_type='Checkbook Vault Transfer',
source_value=self.source_site, destination_value=self.destination_site, source_value=self.source_site, destination_value=self.destination_site,
description='test',
resource_value=self.currency_1) resource_value=self.currency_1)
# check its portal type # check its portal type
self.assertEqual(self.checkbook_vault_transfer.getPortalType(), 'Checkbook Vault Transfer') self.assertEqual(self.checkbook_vault_transfer.getPortalType(), 'Checkbook Vault Transfer')
......
...@@ -197,7 +197,13 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -197,7 +197,13 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin, ERP5TypeTestCase
Create a classification surveyg document and check it Create a classification surveyg document and check it
""" """
# classification surveyg has encaisse_paris for source, encaisse_externe for destination, and a price cooreponding to the sum of banknote of 10000 and banknotes of 200 ( (2+3) * 1000 + (5+7) * 200 ) # classification surveyg has encaisse_paris for source, encaisse_externe for destination, and a price cooreponding to the sum of banknote of 10000 and banknotes of 200 ( (2+3) * 1000 + (5+7) * 200 )
self.classification_survey = self.classification_survey_module.newContent(id='classification_survey_1', portal_type='Classification Survey', source_value=self.encaisse_a_detruire, destination_value=None, source_total_asset_price=52400.0) self.classification_survey = self.classification_survey_module.newContent(
id='classification_survey_1',
portal_type='Classification Survey',
source_value=self.encaisse_a_detruire,
destination_value=None,
description='test',
source_total_asset_price=52400.0)
# execute tic # execute tic
self.stepTic() self.stepTic()
# set source reference # set source reference
......
...@@ -227,7 +227,12 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -227,7 +227,12 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin, ERP5TypeTestCase):
""" """
# Counter rendering has usual_cash for source, counter for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 ) # Counter rendering has usual_cash for source, counter for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 )
self.counter_rendering = self.counter_rendering_module.newContent(id='counter_rendering_1', portal_type='Counter Rendering', source_value=self.counter_vault, source_total_asset_price=52400.0) self.counter_rendering = self.counter_rendering_module.newContent(
id='counter_rendering_1',
portal_type='Counter Rendering',
source_value=self.counter_vault,
description='test',
source_total_asset_price=52400.0)
# execute tic # execute tic
self.stepTic() self.stepTic()
# check we have only one counter rendering # check we have only one counter rendering
......
...@@ -169,10 +169,8 @@ class TestERP5BankingCurrencyPurchase(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -169,10 +169,8 @@ class TestERP5BankingCurrencyPurchase(TestERP5BankingMixin, ERP5TypeTestCase):
self.currency_purchase = self.currency_purchase_module.newContent(id = 'currency_purchase', portal_type = 'Currency Purchase', self.currency_purchase = self.currency_purchase_module.newContent(id = 'currency_purchase', portal_type = 'Currency Purchase',
price_currency='currency_module/EUR',currency_exchange_type='purchase', price_currency='currency_module/EUR',currency_exchange_type='purchase',
destination_payment_value = self.bank_account_1, destination_payment_value = self.bank_account_1,
# aggregate_value = self.check_1,
resource_value = self.currency_2, resource_value = self.currency_2,
description='test',
# source_value = self.bi_counter,
start_date = DateTime().Date(), start_date = DateTime().Date(),
source_total_asset_price = 100.0, source_total_asset_price = 100.0,
discount = 1000.0) discount = 1000.0)
......
...@@ -188,9 +188,8 @@ class TestERP5BankingCurrencySale(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -188,9 +188,8 @@ class TestERP5BankingCurrencySale(TestERP5BankingMixin, ERP5TypeTestCase):
self.currency_sale = self.currency_sale_module.newContent(id = 'currency_sale', portal_type = 'Currency Sale', self.currency_sale = self.currency_sale_module.newContent(id = 'currency_sale', portal_type = 'Currency Sale',
price_currency='currency_module/EUR',currency_exchange_type='sale', price_currency='currency_module/EUR',currency_exchange_type='sale',
destination_payment_value = self.bank_account_1, destination_payment_value = self.bank_account_1,
# aggregate_value = self.check_1,
resource_value = self.currency_2, resource_value = self.currency_2,
# source_value = self.bi_counter, description='test',
start_date = DateTime().Date(), start_date = DateTime().Date(),
source_total_asset_price = 100.0, source_total_asset_price = 100.0,
discount = 3000.0, discount = 3000.0,
......
...@@ -168,7 +168,13 @@ class TestERP5BankingDestructionSurvey(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -168,7 +168,13 @@ class TestERP5BankingDestructionSurvey(TestERP5BankingMixin, ERP5TypeTestCase):
Create a cash transfer document and check it Create a cash transfer document and check it
""" """
# Cash transfer has cash for source, counter for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 ) # Cash transfer has cash for source, counter for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 )
self.destruction_survey = self.destruction_survey_module.newContent(id='destruction_survey_1', portal_type='Destruction Survey', source_value=self.cash, destination_value=self.counter, source_total_asset_price=52400.0) self.destruction_survey = self.destruction_survey_module.newContent(
id='destruction_survey_1',
portal_type='Destruction Survey',
source_value=self.cash,
description='test',
destination_value=self.counter,
source_total_asset_price=52400.0)
# execute tic # execute tic
self.stepTic() self.stepTic()
# check we have only one cash transfer # check we have only one cash transfer
......
...@@ -155,6 +155,7 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -155,6 +155,7 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase
id='foreign_cash_reception', portal_type='Foreign Cash Reception', id='foreign_cash_reception', portal_type='Foreign Cash Reception',
source_value=None, destination_value=self.reception, source_value=None, destination_value=self.reception,
resource_value=self.currency_1, resource_value=self.currency_1,
description='test',
source_total_asset_price=250) source_total_asset_price=250)
# execute tic # execute tic
self.stepTic() self.stepTic()
......
...@@ -190,15 +190,15 @@ class TestERP5BankingInternalMoneyDeposit(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -190,15 +190,15 @@ class TestERP5BankingInternalMoneyDeposit(TestERP5BankingMixin, ERP5TypeTestCase
Create a cash sorting document and check it Create a cash sorting document and check it
""" """
# Cash sorting has encaisse_paris for source, guichet_1 for destination, and a price cooreponding to the sum of banknote of 10000 and banknotes of 200 ( (2+3) * 10000 + (2+3) * 200 ) # Cash sorting has encaisse_paris for source, guichet_1 for destination, and a price cooreponding to the sum of banknote of 10000 and banknotes of 200 ( (2+3) * 10000 + (2+3) * 200 )
self.internal_money_deposit = self.internal_money_deposit_module.newContent(id='internal_money_deposit', portal_type='Internal Money Deposit', self.internal_money_deposit = self.internal_money_deposit_module.newContent(
#source_value=None, destination_value=self.bi_counter_vault, id='internal_money_deposit',
destination_value=self.bi_counter_vault, portal_type='Internal Money Deposit',
source_value=None, destination_value=self.bi_counter_vault,
#destination_payment_value = self.bank_account_1, resource_value = self.currency_1,
resource_value = self.currency_1, source_total_asset_price=20000.0,
source_total_asset_price=20000.0, grouping_reference="lettering",
grouping_reference="lettering", description='test',
) )
# execute tic # execute tic
self.stepTic() self.stepTic()
# set source reference # set source reference
......
...@@ -265,12 +265,14 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase) ...@@ -265,12 +265,14 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase)
""" """
#print self.portal.portal_categories.objectIds() #print self.portal.portal_categories.objectIds()
# Monetary Destruction has source(serre) for source, destinat (serre) for destination, and a price coresponding to the sum of banknote of 10000 and of 5000 ( (2*3) * 10000 + (5*7) * 5000 ) # Monetary Destruction has source(serre) for source, destinat (serre) for destination, and a price coresponding to the sum of banknote of 10000 and of 5000 ( (2*3) * 10000 + (5*7) * 5000 )
self.monetary_destruction = self.monetary_destruction_module.newContent(id='monetary_destruction_1', self.monetary_destruction = self.monetary_destruction_module.newContent(
portal_type='Monetary Destruction', id='monetary_destruction_1',
source_value=self.source, portal_type='Monetary Destruction',
destination_value=None, source_value=self.source,
source_total_asset_price=110000.0, destination_value=None,
source_section_value=self.paris) source_total_asset_price=110000.0,
description='test',
source_section_value=self.paris)
# execute tic # execute tic
self.stepTic() self.stepTic()
# set source reference # set source reference
......
...@@ -217,7 +217,11 @@ class TestERP5BankingMonetaryIssue(TestERP5BankingMonetaryReceptionMixin, TestER ...@@ -217,7 +217,11 @@ class TestERP5BankingMonetaryIssue(TestERP5BankingMonetaryReceptionMixin, TestER
# issue date must be a bit in the future so regenerate date # issue date must be a bit in the future so regenerate date
self.current_date = DateTime() self.current_date = DateTime()
# Cash inventory has caisse_1 for source, caisse_2 for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 ) # Cash inventory has caisse_1 for source, caisse_2 for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 )
self.monetary_issue = self.monetary_issue_module.newContent(id='monetary_issue', portal_type='Monetary Issue', start_date=self.current_date) self.monetary_issue = self.monetary_issue_module.newContent(
id='monetary_issue',
portal_type='Monetary Issue',
description='test',
start_date=self.current_date)
# execute tic # execute tic
self.stepTic() self.stepTic()
# set source reference # set source reference
......
...@@ -228,8 +228,12 @@ class TestERP5BankingMonetaryRecall(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -228,8 +228,12 @@ class TestERP5BankingMonetaryRecall(TestERP5BankingMixin, ERP5TypeTestCase):
Create a monetary recall document and check it Create a monetary recall document and check it
""" """
# Cash transfer has cash for source, counter for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 ) # Cash transfer has cash for source, counter for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 )
#self.monetary_recall = self.monetary_recall_module.newContent(id='monetary_recall_1', portal_type='Monetary Recall', source_value=self.cash, #destination_value=self.counter, source_total_asset_price=52400.0) self.monetary_recall = self.monetary_recall_module.newContent(
self.monetary_recall = self.monetary_recall_module.newContent(id='monetary_recall_1', portal_type='Monetary Recall', source_value=self.cash, source_total_asset_price=52400.0) id='monetary_recall_1',
portal_type='Monetary Recall',
source_value=self.cash,
description='test',
source_total_asset_price=52400.0)
# execute tic # execute tic
self.stepTic() self.stepTic()
......
...@@ -154,9 +154,13 @@ class TestERP5BankingMonetaryReception(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -154,9 +154,13 @@ class TestERP5BankingMonetaryReception(TestERP5BankingMixin, ERP5TypeTestCase):
Create a cash inventory document and check it Create a cash inventory document and check it
""" """
# Cash inventory has caisse_1 for source, caisse_2 for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 ) # Cash inventory has caisse_1 for source, caisse_2 for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 )
self.monetary_reception = self.monetary_reception_module.newContent(id='monetary_reception', portal_type='Monetary Reception', self.monetary_reception = self.monetary_reception_module.newContent(
source_value=None, destination_value=self.reception, id='monetary_reception',
resource_value=self.currency_1) portal_type='Monetary Reception',
source_value=None,
destination_value=self.reception,
description='test',
resource_value=self.currency_1)
# self.setDestinationValue(self.reception) # self.setDestinationValue(self.reception)
# self.setResourceValue(self.currency_1) # self.setResourceValue(self.currency_1)
# execute tic # execute tic
......
...@@ -193,7 +193,13 @@ class TestERP5BankingMonetarySurvey(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -193,7 +193,13 @@ class TestERP5BankingMonetarySurvey(TestERP5BankingMixin, ERP5TypeTestCase):
Create a cash transfer document and check it Create a cash transfer document and check it
""" """
# Cash transfer has usual_cash for source, counter for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 ) # Cash transfer has usual_cash for source, counter for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 )
self.monetary_survey = self.monetary_survey_module.newContent(id='monetary_survey_1', portal_type='Monetary Survey', source_value=self.source, destination_value=self.destination, source_total_asset_price=52400.0) self.monetary_survey = self.monetary_survey_module.newContent(
id='monetary_survey_1',
portal_type='Monetary Survey',
source_value=self.source,
destination_value=self.destination,
description='test',
source_total_asset_price=52400.0)
# execute tic # execute tic
self.stepTic() self.stepTic()
# set source reference # set source reference
......
...@@ -209,10 +209,13 @@ class TestERP5BankingMoneyDepositMixin: ...@@ -209,10 +209,13 @@ class TestERP5BankingMoneyDepositMixin:
Create a cash sorting document and check it Create a cash sorting document and check it
""" """
# Cash sorting has encaisse_paris for source, guichet_1 for destination, and a price cooreponding to the sum of banknote of 10000 and banknotes of 200 ( (2+3) * 10000 + (2+3) * 200 ) # Cash sorting has encaisse_paris for source, guichet_1 for destination, and a price cooreponding to the sum of banknote of 10000 and banknotes of 200 ( (2+3) * 10000 + (2+3) * 200 )
self.money_deposit = self.money_deposit_module.newContent(id='money_deposit', portal_type='Money Deposit', self.money_deposit = self.money_deposit_module.newContent(
destination_payment_value = self.bank_account_1, id='money_deposit',
resource_value = self.currency_1, portal_type='Money Deposit',
source_total_asset_price=20000.0) destination_payment_value = self.bank_account_1,
resource_value = self.currency_1,
description='test',
source_total_asset_price=20000.0)
# execute tic # execute tic
self.stepTic() self.stepTic()
# set source reference # set source reference
......
...@@ -234,10 +234,12 @@ class TestERP5BankingMoneyDepositRendering(TestERP5BankingMixin, ERP5TypeTestCas ...@@ -234,10 +234,12 @@ class TestERP5BankingMoneyDepositRendering(TestERP5BankingMixin, ERP5TypeTestCas
""" """
# Money deposit rendering has auxiliaire for source, gros_versement for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 ) # Money deposit rendering has auxiliaire for source, gros_versement for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 )
self.money_deposit_rendering = self.money_deposit_rendering_module.newContent(id='money_deposit_rendering_1', self.money_deposit_rendering = self.money_deposit_rendering_module.newContent(
portal_type='Money Deposit Rendering', id='money_deposit_rendering_1',
source_value=self.gros_versement, portal_type='Money Deposit Rendering',
source_total_asset_price=52400.0) source_value=self.gros_versement,
description='test',
source_total_asset_price=52400.0)
# execute tic # execute tic
self.stepTic() self.stepTic()
# check we have only one money deposit rendering # check we have only one money deposit rendering
......
...@@ -207,7 +207,13 @@ class TestERP5BankingMoneyDepositTransfer(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -207,7 +207,13 @@ class TestERP5BankingMoneyDepositTransfer(TestERP5BankingMixin, ERP5TypeTestCase
Create a money deposit transfer document and check it Create a money deposit transfer document and check it
""" """
# Money Deposit transfer has usual_cash (Gros versment) for source, tri for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 ) # Money Deposit transfer has usual_cash (Gros versment) for source, tri for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 )
self.money_deposit_transfer = self.money_deposit_transfer_module.newContent(id='money_deposit_transfer_1', portal_type='Money Deposit Transfer', source_value=self.counter, destination_value=self.tri, source_total_asset_price=52400.0) self.money_deposit_transfer = self.money_deposit_transfer_module.newContent(
id='money_deposit_transfer_1',
portal_type='Money Deposit Transfer',
source_value=self.counter,
destination_value=self.tri,
description='test',
source_total_asset_price=52400.0)
# execute tic # execute tic
self.stepTic() self.stepTic()
# check we have only one money deposit transfer # check we have only one money deposit transfer
......
...@@ -159,11 +159,13 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -159,11 +159,13 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase):
""" """
Create a mutilated banknote document and check it Create a mutilated banknote document and check it
""" """
self.mutilated_banknote = self.mutilated_banknote_module.newContent(id='mutilated_banknote', self.mutilated_banknote = self.mutilated_banknote_module.newContent(
portal_type='Mutilated Banknote', id='mutilated_banknote',
source_total_asset_price=0.0, portal_type='Mutilated Banknote',
destination_total_asset_price=0.0, source_total_asset_price=0.0,
destination_value=self.mutilated_banknote_vault destination_total_asset_price=0.0,
description='test',
destination_value=self.mutilated_banknote_vault
) )
self.stepTic() self.stepTic()
self.assertEqual(len(self.mutilated_banknote_module.objectValues()), 1) self.assertEqual(len(self.mutilated_banknote_module.objectValues()), 1)
......
...@@ -142,6 +142,7 @@ class TestERP5BankingStopPayment( TestERP5BankingCheckbookDeliveryMixin, ...@@ -142,6 +142,7 @@ class TestERP5BankingStopPayment( TestERP5BankingCheckbookDeliveryMixin,
id='stop_payment', portal_type='Stop Payment', id='stop_payment', portal_type='Stop Payment',
destination_payment_value=self.bank_account_2, destination_payment_value=self.bank_account_2,
resource_value=self.currency_1, resource_value=self.currency_1,
description='test',
start_date=self.date, start_date=self.date,
reference_range_min=51, reference_range_min=51,
source_total_asset_price=20000) source_total_asset_price=20000)
......
...@@ -174,6 +174,7 @@ class TestERP5BankingTravelerCheckPurchase(TestERP5BankingCheckbookUsualCashTran ...@@ -174,6 +174,7 @@ class TestERP5BankingTravelerCheckPurchase(TestERP5BankingCheckbookUsualCashTran
source_value=self.traveler_check_source, destination_value=None, source_value=self.traveler_check_source, destination_value=None,
destination_payment_value=self.bank_account_1, destination_payment_value=self.bank_account_1,
resource_value=self.currency_1, resource_value=self.currency_1,
description='test',
start_date=self.date) start_date=self.date)
# check its portal type # check its portal type
self.assertEqual(self.traveler_check_purchase.getPortalType(), 'Traveler Check Purchase') self.assertEqual(self.traveler_check_purchase.getPortalType(), 'Traveler Check Purchase')
......
...@@ -67,6 +67,7 @@ class TestERP5BankingTravelerCheckSaleMixin: ...@@ -67,6 +67,7 @@ class TestERP5BankingTravelerCheckSaleMixin:
self.checkbook_vault_transfer = self.getCheckbookUsualCashTransferModule().newContent( self.checkbook_vault_transfer = self.getCheckbookUsualCashTransferModule().newContent(
id='checkbook_usual_cash_transfer', portal_type='Checkbook Usual Cash Transfer', id='checkbook_usual_cash_transfer', portal_type='Checkbook Usual Cash Transfer',
source_value=self.source_vault, source_value=self.source_vault,
description='test',
destination_value=self.destination_vault, destination_value=self.destination_vault,
start_date=(self.date-1)) start_date=(self.date-1))
# Add a line for traveler check # Add a line for traveler check
......
...@@ -180,7 +180,11 @@ class TestERP5BankingUsualCashIncident(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -180,7 +180,11 @@ class TestERP5BankingUsualCashIncident(TestERP5BankingMixin, ERP5TypeTestCase):
Create a cash transfer document and check it Create a cash transfer document and check it
""" """
# Cash transfer has usual_cash for source, counter for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 ) # Cash transfer has usual_cash for source, counter for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 )
self.usual_cash_incident = self.usual_cash_incident_module.newContent(id='usual_cash_incident_1', portal_type='Usual Cash Incident', source_total_asset_price=52400.0,) self.usual_cash_incident = self.usual_cash_incident_module.newContent(
id='usual_cash_incident_1',
portal_type='Usual Cash Incident',
description='test',
source_total_asset_price=52400.0,)
# execute tic # execute tic
self.stepTic() self.stepTic()
# check we have only one cash transfer # check we have only one cash transfer
......
...@@ -226,6 +226,7 @@ class TestERP5BankingUsualCashRendering(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -226,6 +226,7 @@ class TestERP5BankingUsualCashRendering(TestERP5BankingMixin, ERP5TypeTestCase):
self.usual_cash_rendering = self.usual_cash_rendering_module.newContent(id='usual_cash_rendering_1', self.usual_cash_rendering = self.usual_cash_rendering_module.newContent(id='usual_cash_rendering_1',
portal_type='Usual Cash Rendering', source=self.caisse_courante.getRelativeUrl(), portal_type='Usual Cash Rendering', source=self.caisse_courante.getRelativeUrl(),
description='test',
destination=self.auxiliaire.getRelativeUrl(), source_total_asset_price=52400.0) destination=self.auxiliaire.getRelativeUrl(), source_total_asset_price=52400.0)
# execute tic # execute tic
self.stepTic() self.stepTic()
......
...@@ -148,13 +148,28 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -148,13 +148,28 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
line_list = [inventory_dict_line_1, inventory_dict_line_2] line_list = [inventory_dict_line_1, inventory_dict_line_2]
self.usual_cash = self.paris.surface.caisse_courante.encaisse_des_billets_et_monnaies self.usual_cash = self.paris.surface.caisse_courante.encaisse_des_billets_et_monnaies
self.counter = self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies self.counter = self.paris.surface.banque_interne.guichet_1
self.counter_vault = self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies.sortante self.counter_vault = self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies
self.openCounterDate(site=self.paris) self.counter_final_vault = self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies.sortante
self.openCounter(self.counter)
self.createCashInventory(source=None, destination=self.usual_cash, currency=self.currency_1, self.createCashInventory(source=None, destination=self.usual_cash, currency=self.currency_1,
line_list=line_list) line_list=line_list)
# now we need to create a user as Manager to do the test
# in order to have an assigment defined which is used to do transition
# Create an Organisation that will be used for users assignment
self.checkUserFolderType()
self.organisation = self.organisation_module.newContent(id='baobab_org', portal_type='Organisation',
function='banking', group='baobab', site='testsite/paris')
# define the user
user_dict = {
'super_user' : [['Manager'], self.organisation, 'banking/comptable', 'baobab', 'testsite/paris/surface/banque_interne/guichet_1']
}
# call method to create this user
self.createERP5Users(user_dict)
self.logout()
self.login('super_user')
self.openCounterDate(site=self.paris)
self.openCounter(self.counter)
def stepCheckObjects(self, sequence=None, sequence_list=None, **kwd): def stepCheckObjects(self, sequence=None, sequence_list=None, **kwd):
""" """
...@@ -199,11 +214,11 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -199,11 +214,11 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
Check inventory in destination vault (counter) before confirm Check inventory in destination vault (counter) before confirm
""" """
# check we don't have banknotes of 10000 # check we don't have banknotes of 10000
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.counter_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 0.0) self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.counter_final_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 0.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.counter_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 0.0) self.assertEqual(self.simulation_tool.getFutureInventory(node=self.counter_final_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 0.0)
# check we don't have coins of 200 # check we don't have coins of 200
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.counter_vault.getRelativeUrl(), resource = self.piece_200.getRelativeUrl()), 0.0) self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.counter_final_vault.getRelativeUrl(), resource = self.piece_200.getRelativeUrl()), 0.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.counter_vault.getRelativeUrl(), resource = self.piece_200.getRelativeUrl()), 0.0) self.assertEqual(self.simulation_tool.getFutureInventory(node=self.counter_final_vault.getRelativeUrl(), resource = self.piece_200.getRelativeUrl()), 0.0)
def stepCreateUsualCashTransfer(self, sequence=None, sequence_list=None, **kwd): def stepCreateUsualCashTransfer(self, sequence=None, sequence_list=None, **kwd):
...@@ -211,7 +226,13 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -211,7 +226,13 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
Create a cash transfer document and check it Create a cash transfer document and check it
""" """
# Cash transfer has usual_cash for source, counter for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 ) # Cash transfer has usual_cash for source, counter for destination, and a price cooreponding to the sum of banknote of 10000 abd coin of 200 ( (2+3) * 1000 + (5+7) * 200 )
self.usual_cash_transfer = self.usual_cash_transfer_module.newContent(id='usual_cash_transfer_1', portal_type='Usual Cash Transfer', source_value=self.usual_cash, destination_value=self.counter, source_total_asset_price=52400.0) self.usual_cash_transfer = self.usual_cash_transfer_module.newContent(
id='usual_cash_transfer_1',
portal_type='Usual Cash Transfer',
source_value=self.usual_cash,
destination_value=self.counter_vault,
description='test',
source_total_asset_price=52400.0)
# execute tic # execute tic
self.stepTic() self.stepTic()
# check we have only one cash transfer # check we have only one cash transfer
...@@ -262,7 +283,7 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -262,7 +283,7 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
# check the source vault is usual_cash # check the source vault is usual_cash
self.assertEqual(cell.getSourceValue(), self.usual_cash) self.assertEqual(cell.getSourceValue(), self.usual_cash)
# check the destination vault is counter # check the destination vault is counter
self.assertEqual(cell.getDestinationValue(), self.counter) self.assertEqual(cell.getDestinationValue(), self.counter_vault)
if cell.getId() == 'movement_0_0_0': if cell.getId() == 'movement_0_0_0':
# check the quantity of banknote for year 1992 is 2 # check the quantity of banknote for year 1992 is 2
self.assertEqual(cell.getQuantity(), 2.0) self.assertEqual(cell.getQuantity(), 2.0)
...@@ -426,13 +447,13 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -426,13 +447,13 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
Check that compution of inventory at vault counter is right after confirm and before deliver Check that compution of inventory at vault counter is right after confirm and before deliver
""" """
# check we have 0 banknote of 10000 currently # check we have 0 banknote of 10000 currently
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.counter_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 0.0) self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.counter_final_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 0.0)
# check we will have 5 banknotes of 10000 after deliver # check we will have 5 banknotes of 10000 after deliver
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.counter_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0) self.assertEqual(self.simulation_tool.getFutureInventory(node=self.counter_final_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0)
# check we have 0 coin of 200 currently # check we have 0 coin of 200 currently
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.counter_vault.getRelativeUrl(), resource = self.piece_200.getRelativeUrl()), 0.0) self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.counter_final_vault.getRelativeUrl(), resource = self.piece_200.getRelativeUrl()), 0.0)
# check we will have 12 coins of 200 after deliver # check we will have 12 coins of 200 after deliver
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.counter_vault.getRelativeUrl(), resource = self.piece_200.getRelativeUrl()), 12.0) self.assertEqual(self.simulation_tool.getFutureInventory(node=self.counter_final_vault.getRelativeUrl(), resource = self.piece_200.getRelativeUrl()), 12.0)
def stepDeliverUsualCashTransfer(self, sequence=None, sequence_list=None, **kwd): def stepDeliverUsualCashTransfer(self, sequence=None, sequence_list=None, **kwd):
...@@ -471,11 +492,11 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -471,11 +492,11 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
Check inventory at destination (vault counter) after deliver of the cash transfer Check inventory at destination (vault counter) after deliver of the cash transfer
""" """
# check we have 5 banknotes of 10000 # check we have 5 banknotes of 10000
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.counter_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0) self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.counter_final_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.counter_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0) self.assertEqual(self.simulation_tool.getFutureInventory(node=self.counter_final_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0)
# check we have 12 coins of 200 # check we have 12 coins of 200
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.counter_vault.getRelativeUrl(), resource = self.piece_200.getRelativeUrl()), 12.0) self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.counter_final_vault.getRelativeUrl(), resource = self.piece_200.getRelativeUrl()), 12.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.counter_vault.getRelativeUrl(), resource = self.piece_200.getRelativeUrl()), 12.0) self.assertEqual(self.simulation_tool.getFutureInventory(node=self.counter_final_vault.getRelativeUrl(), resource = self.piece_200.getRelativeUrl()), 12.0)
################################## ##################################
......
...@@ -261,6 +261,7 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -261,6 +261,7 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
self.vault_transfer = self.vault_transfer_module.newContent(id='vault_transfer_1', self.vault_transfer = self.vault_transfer_module.newContent(id='vault_transfer_1',
portal_type='Vault Transfer', source=self.usual_cash.getRelativeUrl(), portal_type='Vault Transfer', source=self.usual_cash.getRelativeUrl(),
description='test',
destination=self.caisse_courante.getRelativeUrl(), source_total_asset_price=52400.0) destination=self.caisse_courante.getRelativeUrl(), source_total_asset_price=52400.0)
# execute tic # execute tic
self.stepTic() self.stepTic()
......
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