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,7 +209,11 @@ class TestERP5BankingAccountIncident(TestERP5BankingMixin, ERP5TypeTestCase):
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 )
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(
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
self.stepTic()
......
......@@ -272,7 +272,13 @@ class TestERP5BankingCashBalanceRegulation(TestERP5BankingMixin, ERP5TypeTestCas
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.assertEqual(len(self.cash_balance_regulation_module.objectValues()), 1)
self.cash_balance_regulation = getattr(self.cash_balance_regulation_module, 'cash_balance_regulation_1')
......
......@@ -220,7 +220,13 @@ class TestERP5BankingCashClassification(TestERP5BankingMixin, ERP5TypeTestCase):
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 )
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
self.stepTic()
# set source reference
......
......@@ -229,7 +229,14 @@ class TestERP5BankingCashExchange(TestERP5BankingMixin, ERP5TypeTestCase):
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 )
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
self.stepTic()
# check we have only one cash sorting
......
......@@ -178,7 +178,11 @@ class TestERP5BankingCashIncident(TestERP5BankingMixin, ERP5TypeTestCase):
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 )
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
self.stepTic()
# set source reference
......
......@@ -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 )
self.cash_movement = self.cash_movement_module.newContent(id='cash_movement_1',
portal_type='Cash Movement', source=self.vault_source.getRelativeUrl(),
destination=self.vault_destination.getRelativeUrl(), source_total_asset_price=52400.0)
self.cash_movement = self.cash_movement_module.newContent(
id='cash_movement_1',
portal_type='Cash Movement',
source=self.vault_source.getRelativeUrl(),
destination=self.vault_destination.getRelativeUrl(),
description='test',
source_total_asset_price=52400.0)
# execute tic
self.stepTic()
# check we have only one vault transfer
......
......@@ -220,7 +220,13 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase):
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 )
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
self.stepTic()
# set source reference
......
......@@ -196,7 +196,11 @@ class TestERP5BankingCashSortingIncident(TestERP5BankingMixin, ERP5TypeTestCase)
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 )
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
self.stepTic()
# check we have only one cash transfer
......
......@@ -223,7 +223,14 @@ class TestERP5BankingCashToCurrencyPurchase(TestERP5BankingMixin, ERP5TypeTestCa
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 )
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
self.stepTic()
# check we have only one cash sorting
......
......@@ -212,6 +212,7 @@ class TestERP5BankingCashToCurrencySale(TestERP5BankingMixin, ERP5TypeTestCase):
portal_type='Cash To Currency Sale',
source_value=self.guichet,
destination_value=None,
description='test',
resource_value = self.currency_2,
source_total_asset_price=100.0,
discount = 3000.0, quantity = 70000.0)
......
......@@ -178,11 +178,13 @@ class TestERP5BankingCheckDeposit(TestERP5BankingMixin, ERP5TypeTestCase):
"""
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(
id = 'check_deposit',
portal_type = 'Check Deposit',
destination_payment_value = self.bank_account_1,
start_date = DateTime().Date(),
source_total_asset_price = 500.0,
description='test',
resource_value=self.currency_1)
self.assertNotEqual(self.check_deposit, None)
......
......@@ -220,6 +220,7 @@ class TestERP5BankingCheckPaymentMixin:
# aggregate_value = self.check_1,
resource_value = self.currency_1,
aggregate_free_text = "50",
description = "test",
# source_value = self.bi_counter,
start_date = DateTime().Date(),
source_total_asset_price = 20000.0)
......
......@@ -235,6 +235,7 @@ class TestERP5BankingCheckbookDelivery(TestERP5BankingCheckbookDeliveryMixin,
resource_value=self.checkbook_model_1,
check_amount_value=self.checkbook_model_1.variant_1,
reference_range_min=1,
description='test',
reference_range_max=50,
aggregate_value=self.checkbook_1
)
......
......@@ -182,9 +182,13 @@ class TestERP5BankingCheckbookMovement(TestERP5BankingCheckbookVaultTransferMixi
"""
# We will do the transfer ot two items.
self.checkbook_movement = self.checkbook_movement_module.newContent(
id='checkbook_movement', portal_type='Checkbook Movement',
source_value=self.source_site, destination_value=self.destination_site,
resource_value=self.currency_1,start_date=self.date)
id='checkbook_movement',
portal_type='Checkbook Movement',
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
self.assertEqual(self.checkbook_movement.getPortalType(), 'Checkbook Movement')
# check source
......
......@@ -166,6 +166,7 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin, ERP5TypeTestCase):
id='checkbook_reception', portal_type='Checkbook Reception',
source_value=None, destination_value=self.destination_site,
resource_value=self.currency_1,
description='test',
start_date=self.date)
# get the checkbook reception document
self.checkbook_reception = getattr(self.checkbook_reception_module, 'checkbook_reception')
......
......@@ -93,6 +93,7 @@ class TestERP5BankingCheckbookUsualCashTransferMixin(
id='checkbook_vault_transfer', portal_type='Checkbook Vault Transfer',
source_value=self.vault_transfer_source_site,
destination_value=self.vault_transfer_destination_site,
description='test',
start_date=(self.date-3))
# Add a line for traveler check
self.line_2 = self.checkbook_vault_transfer.newContent(quantity=1,
......
......@@ -54,6 +54,7 @@ class TestERP5BankingCheckbookVaultTransferMixin:
self.checkbook_reception = self.checkbook_reception_module.newContent(
id='checkbook_reception', portal_type='Checkbook Reception',
source_value=None, destination_value=self.reception_destination_site,
description='test',
start_date=(self.date-4))
# get the checkbook reception document
self.checkbook_reception = getattr(self.checkbook_reception_module, 'checkbook_reception')
......@@ -86,6 +87,7 @@ class TestERP5BankingCheckbookVaultTransferMixin:
self.checkbook_reception = self.checkbook_reception_module.newContent(
id='checkbook_reception', portal_type='Checkbook Reception',
source_value=None, destination_value=self.reception_destination_site,
description='test',
start_date=(self.date-4))
# get the checkbook reception document
self.checkbook_reception = getattr(self.checkbook_reception_module, 'checkbook_reception')
......@@ -264,6 +266,7 @@ class TestERP5BankingCheckbookVaultTransfer(TestERP5BankingCheckbookVaultTransfe
self.checkbook_vault_transfer = self.checkbook_vault_transfer_module.newContent(
id='checkbook_vault_transfer', portal_type='Checkbook Vault Transfer',
source_value=self.source_site, destination_value=self.destination_site,
description='test',
resource_value=self.currency_1)
# check its portal type
self.assertEqual(self.checkbook_vault_transfer.getPortalType(), 'Checkbook Vault Transfer')
......
......@@ -197,7 +197,13 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin, ERP5TypeTestCase
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 )
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
self.stepTic()
# set source reference
......
......@@ -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 )
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
self.stepTic()
# check we have only one counter rendering
......
......@@ -169,10 +169,8 @@ class TestERP5BankingCurrencyPurchase(TestERP5BankingMixin, ERP5TypeTestCase):
self.currency_purchase = self.currency_purchase_module.newContent(id = 'currency_purchase', portal_type = 'Currency Purchase',
price_currency='currency_module/EUR',currency_exchange_type='purchase',
destination_payment_value = self.bank_account_1,
# aggregate_value = self.check_1,
resource_value = self.currency_2,
# source_value = self.bi_counter,
description='test',
start_date = DateTime().Date(),
source_total_asset_price = 100.0,
discount = 1000.0)
......
......@@ -188,9 +188,8 @@ class TestERP5BankingCurrencySale(TestERP5BankingMixin, ERP5TypeTestCase):
self.currency_sale = self.currency_sale_module.newContent(id = 'currency_sale', portal_type = 'Currency Sale',
price_currency='currency_module/EUR',currency_exchange_type='sale',
destination_payment_value = self.bank_account_1,
# aggregate_value = self.check_1,
resource_value = self.currency_2,
# source_value = self.bi_counter,
description='test',
start_date = DateTime().Date(),
source_total_asset_price = 100.0,
discount = 3000.0,
......
......@@ -168,7 +168,13 @@ class TestERP5BankingDestructionSurvey(TestERP5BankingMixin, ERP5TypeTestCase):
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 )
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
self.stepTic()
# check we have only one cash transfer
......
......@@ -155,6 +155,7 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase
id='foreign_cash_reception', portal_type='Foreign Cash Reception',
source_value=None, destination_value=self.reception,
resource_value=self.currency_1,
description='test',
source_total_asset_price=250)
# execute tic
self.stepTic()
......
......@@ -190,14 +190,14 @@ class TestERP5BankingInternalMoneyDeposit(TestERP5BankingMixin, ERP5TypeTestCase
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 )
self.internal_money_deposit = self.internal_money_deposit_module.newContent(id='internal_money_deposit', portal_type='Internal Money Deposit',
#source_value=None, destination_value=self.bi_counter_vault,
self.internal_money_deposit = self.internal_money_deposit_module.newContent(
id='internal_money_deposit',
portal_type='Internal Money Deposit',
destination_value=self.bi_counter_vault,
source_value=None,
#destination_payment_value = self.bank_account_1,
resource_value = self.currency_1,
source_total_asset_price=20000.0,
grouping_reference="lettering",
description='test',
)
# execute tic
self.stepTic()
......
......@@ -265,11 +265,13 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase)
"""
#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 )
self.monetary_destruction = self.monetary_destruction_module.newContent(id='monetary_destruction_1',
self.monetary_destruction = self.monetary_destruction_module.newContent(
id='monetary_destruction_1',
portal_type='Monetary Destruction',
source_value=self.source,
destination_value=None,
source_total_asset_price=110000.0,
description='test',
source_section_value=self.paris)
# execute tic
self.stepTic()
......
......@@ -217,7 +217,11 @@ class TestERP5BankingMonetaryIssue(TestERP5BankingMonetaryReceptionMixin, TestER
# issue date must be a bit in the future so regenerate date
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 )
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
self.stepTic()
# set source reference
......
......@@ -228,8 +228,12 @@ class TestERP5BankingMonetaryRecall(TestERP5BankingMixin, ERP5TypeTestCase):
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 )
#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(id='monetary_recall_1', portal_type='Monetary Recall', source_value=self.cash, source_total_asset_price=52400.0)
self.monetary_recall = self.monetary_recall_module.newContent(
id='monetary_recall_1',
portal_type='Monetary Recall',
source_value=self.cash,
description='test',
source_total_asset_price=52400.0)
# execute tic
self.stepTic()
......
......@@ -154,8 +154,12 @@ class TestERP5BankingMonetaryReception(TestERP5BankingMixin, ERP5TypeTestCase):
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 )
self.monetary_reception = self.monetary_reception_module.newContent(id='monetary_reception', portal_type='Monetary Reception',
source_value=None, destination_value=self.reception,
self.monetary_reception = self.monetary_reception_module.newContent(
id='monetary_reception',
portal_type='Monetary Reception',
source_value=None,
destination_value=self.reception,
description='test',
resource_value=self.currency_1)
# self.setDestinationValue(self.reception)
# self.setResourceValue(self.currency_1)
......
......@@ -193,7 +193,13 @@ class TestERP5BankingMonetarySurvey(TestERP5BankingMixin, ERP5TypeTestCase):
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 )
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
self.stepTic()
# set source reference
......
......@@ -209,9 +209,12 @@ class TestERP5BankingMoneyDepositMixin:
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 )
self.money_deposit = self.money_deposit_module.newContent(id='money_deposit', portal_type='Money Deposit',
self.money_deposit = self.money_deposit_module.newContent(
id='money_deposit',
portal_type='Money Deposit',
destination_payment_value = self.bank_account_1,
resource_value = self.currency_1,
description='test',
source_total_asset_price=20000.0)
# execute tic
self.stepTic()
......
......@@ -234,9 +234,11 @@ 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 )
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(
id='money_deposit_rendering_1',
portal_type='Money Deposit Rendering',
source_value=self.gros_versement,
description='test',
source_total_asset_price=52400.0)
# execute tic
self.stepTic()
......
......@@ -207,7 +207,13 @@ class TestERP5BankingMoneyDepositTransfer(TestERP5BankingMixin, ERP5TypeTestCase
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 )
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
self.stepTic()
# check we have only one money deposit transfer
......
......@@ -159,10 +159,12 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase):
"""
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(
id='mutilated_banknote',
portal_type='Mutilated Banknote',
source_total_asset_price=0.0,
destination_total_asset_price=0.0,
description='test',
destination_value=self.mutilated_banknote_vault
)
self.stepTic()
......
......@@ -142,6 +142,7 @@ class TestERP5BankingStopPayment( TestERP5BankingCheckbookDeliveryMixin,
id='stop_payment', portal_type='Stop Payment',
destination_payment_value=self.bank_account_2,
resource_value=self.currency_1,
description='test',
start_date=self.date,
reference_range_min=51,
source_total_asset_price=20000)
......
......@@ -174,6 +174,7 @@ class TestERP5BankingTravelerCheckPurchase(TestERP5BankingCheckbookUsualCashTran
source_value=self.traveler_check_source, destination_value=None,
destination_payment_value=self.bank_account_1,
resource_value=self.currency_1,
description='test',
start_date=self.date)
# check its portal type
self.assertEqual(self.traveler_check_purchase.getPortalType(), 'Traveler Check Purchase')
......
......@@ -67,6 +67,7 @@ class TestERP5BankingTravelerCheckSaleMixin:
self.checkbook_vault_transfer = self.getCheckbookUsualCashTransferModule().newContent(
id='checkbook_usual_cash_transfer', portal_type='Checkbook Usual Cash Transfer',
source_value=self.source_vault,
description='test',
destination_value=self.destination_vault,
start_date=(self.date-1))
# Add a line for traveler check
......
......@@ -180,7 +180,11 @@ class TestERP5BankingUsualCashIncident(TestERP5BankingMixin, ERP5TypeTestCase):
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 )
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
self.stepTic()
# check we have only one cash transfer
......
......@@ -226,6 +226,7 @@ class TestERP5BankingUsualCashRendering(TestERP5BankingMixin, ERP5TypeTestCase):
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(),
description='test',
destination=self.auxiliaire.getRelativeUrl(), source_total_asset_price=52400.0)
# execute tic
self.stepTic()
......
......@@ -148,13 +148,28 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
line_list = [inventory_dict_line_1, inventory_dict_line_2]
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_vault = self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies.sortante
self.openCounterDate(site=self.paris)
self.openCounter(self.counter)
self.counter = self.paris.surface.banque_interne.guichet_1
self.counter_vault = self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies
self.counter_final_vault = self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies.sortante
self.createCashInventory(source=None, destination=self.usual_cash, currency=self.currency_1,
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):
"""
......@@ -199,11 +214,11 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
Check inventory in destination vault (counter) before confirm
"""
# 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.getFutureInventory(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_final_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 0.0)
# 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.getFutureInventory(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_final_vault.getRelativeUrl(), resource = self.piece_200.getRelativeUrl()), 0.0)
def stepCreateUsualCashTransfer(self, sequence=None, sequence_list=None, **kwd):
......@@ -211,7 +226,13 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
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 )
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
self.stepTic()
# check we have only one cash transfer
......@@ -262,7 +283,7 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
# check the source vault is usual_cash
self.assertEqual(cell.getSourceValue(), self.usual_cash)
# 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':
# check the quantity of banknote for year 1992 is 2
self.assertEqual(cell.getQuantity(), 2.0)
......@@ -426,13 +447,13 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
Check that compution of inventory at vault counter is right after confirm and before deliver
"""
# 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
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
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
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):
......@@ -471,11 +492,11 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
Check inventory at destination (vault counter) after deliver of the cash transfer
"""
# 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.getFutureInventory(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_final_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0)
# 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.getFutureInventory(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_final_vault.getRelativeUrl(), resource = self.piece_200.getRelativeUrl()), 12.0)
##################################
......
......@@ -261,6 +261,7 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin, ERP5TypeTestCase):
self.vault_transfer = self.vault_transfer_module.newContent(id='vault_transfer_1',
portal_type='Vault Transfer', source=self.usual_cash.getRelativeUrl(),
description='test',
destination=self.caisse_courante.getRelativeUrl(), source_total_asset_price=52400.0)
# execute tic
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