Commit 325ee493 authored by Sebastien Robin's avatar Sebastien Robin

- default state on many worklow is "empty" now

- open some counter


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15292 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d3b5fe29
...@@ -682,6 +682,8 @@ class TestERP5BankingMixin: ...@@ -682,6 +682,8 @@ class TestERP5BankingMixin:
""" """
# create a counter # create a counter
counter_module = self.getCounterModule() counter_module = self.getCounterModule()
while "guichet" not in site.getId():
site = site.getParentValue()
counter = counter_module.newContent(id=id, site_value=site) counter = counter_module.newContent(id=id, site_value=site)
# open it # open it
counter.open() counter.open()
......
...@@ -103,7 +103,7 @@ class TestERP5BankingAvailableInventory(TestERP5BankingCheckPaymentMixin, ...@@ -103,7 +103,7 @@ class TestERP5BankingAvailableInventory(TestERP5BankingCheckPaymentMixin,
currency=self.currency_1, currency=self.currency_1,
line_list=self.line_list) line_list=self.line_list)
self.openCounter(site=self.money_deposit_counter_vault,id='counter_2') self.openCounter(site=self.money_deposit_counter.guichet_1,id='counter_2')
# Define foreign currency variables # Define foreign currency variables
inventory_dict_line_1 = {'id' : 'inventory_line_1', inventory_dict_line_1 = {'id' : 'inventory_line_1',
......
...@@ -164,6 +164,7 @@ class TestERP5BankingCashExchange(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -164,6 +164,7 @@ class TestERP5BankingCashExchange(TestERP5BankingMixin, ERP5TypeTestCase):
# open counter date and counter # open counter date and counter
self.openCounterDate(site=self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies.sortante) self.openCounterDate(site=self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies.sortante)
self.openCounter(site=self.paris.surface.banque_interne.guichet_1)
def stepCheckObjects(self, sequence=None, sequence_list=None, **kwd): def stepCheckObjects(self, sequence=None, sequence_list=None, **kwd):
......
...@@ -406,7 +406,7 @@ class TestERP5BankingCashMovement(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -406,7 +406,7 @@ class TestERP5BankingCashMovement(TestERP5BankingMixin, ERP5TypeTestCase):
# get state of the cash_movement # get state of the cash_movement
state = self.cash_movement.getSimulationState() state = self.cash_movement.getSimulationState()
# check the state is draft # check the state is draft
self.assertEqual(state, 'draft') self.assertEqual(state, 'empty')
# get workflow history # get workflow history
workflow_history = self.workflow_tool.getInfoFor(ob=self.cash_movement, name='history', wf_id='cash_movement_workflow') workflow_history = self.workflow_tool.getInfoFor(ob=self.cash_movement, name='history', wf_id='cash_movement_workflow')
# check its len is 2 # check its len is 2
......
...@@ -151,6 +151,7 @@ class TestERP5BankingCashToCurrencyPurchase(TestERP5BankingMixin, ERP5TypeTestCa ...@@ -151,6 +151,7 @@ class TestERP5BankingCashToCurrencyPurchase(TestERP5BankingMixin, ERP5TypeTestCa
self.login('super_user') self.login('super_user')
# open counter date and counter # open counter date and counter
self.openCounterDate(site=self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies.sortante) self.openCounterDate(site=self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies.sortante)
self.openCounter(site=self.paris.surface.banque_interne.guichet_1)
......
...@@ -141,6 +141,7 @@ class TestERP5BankingCashToCurrencySale(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -141,6 +141,7 @@ class TestERP5BankingCashToCurrencySale(TestERP5BankingMixin, ERP5TypeTestCase):
self.login('super_user') self.login('super_user')
# open counter date and counter # open counter date and counter
self.openCounterDate(site=self.paris.surface.banque_interne.guichet_1) self.openCounterDate(site=self.paris.surface.banque_interne.guichet_1)
self.openCounter(site=self.paris.surface.banque_interne.guichet_1)
......
...@@ -322,7 +322,7 @@ class TestERP5BankingDestructionSurvey(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -322,7 +322,7 @@ class TestERP5BankingDestructionSurvey(TestERP5BankingMixin, ERP5TypeTestCase):
# get state of the cash transfer # get state of the cash transfer
state = self.destruction_survey.getSimulationState() state = self.destruction_survey.getSimulationState()
# check the state is draft # check the state is draft
self.assertEqual(state, 'draft') self.assertEqual(state, 'empty')
# get workflow history # get workflow history
workflow_history = self.workflow_tool.getInfoFor(ob=self.destruction_survey, name='history', wf_id='destruction_survey_workflow') workflow_history = self.workflow_tool.getInfoFor(ob=self.destruction_survey, name='history', wf_id='destruction_survey_workflow')
# check its len is 2 # check its len is 2
......
...@@ -310,7 +310,7 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase ...@@ -310,7 +310,7 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin, ERP5TypeTestCase
""" """
state = self.foreign_cash_reception.getSimulationState() state = self.foreign_cash_reception.getSimulationState()
# check that state is draft # check that state is draft
self.assertEqual(state, 'draft') self.assertEqual(state, 'empty')
self.workflow_tool.doActionFor(self.foreign_cash_reception, 'confirm_action', wf_id='foreign_cash_reception_workflow') self.workflow_tool.doActionFor(self.foreign_cash_reception, 'confirm_action', wf_id='foreign_cash_reception_workflow')
self.assertEqual(self.foreign_cash_reception.getSimulationState(), 'confirmed') self.assertEqual(self.foreign_cash_reception.getSimulationState(), 'confirmed')
workflow_history = self.workflow_tool.getInfoFor(ob=self.foreign_cash_reception, name='history', wf_id='foreign_cash_reception_workflow') workflow_history = self.workflow_tool.getInfoFor(ob=self.foreign_cash_reception, name='history', wf_id='foreign_cash_reception_workflow')
......
...@@ -526,7 +526,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase) ...@@ -526,7 +526,7 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase)
# get state of the monetary destruction # get state of the monetary destruction
state = self.monetary_destruction.getSimulationState() state = self.monetary_destruction.getSimulationState()
# check the state is draft # check the state is draft
self.assertEqual(state, 'draft') self.assertEqual(state, 'empty')
# get workflow history # get workflow history
workflow_history = self.workflow_tool.getInfoFor(ob=self.monetary_destruction, name='history', wf_id='monetary_destruction_workflow') workflow_history = self.workflow_tool.getInfoFor(ob=self.monetary_destruction, name='history', wf_id='monetary_destruction_workflow')
# check its len is 2 # check its len is 2
......
...@@ -382,7 +382,7 @@ class TestERP5BankingMonetaryIssue(TestERP5BankingMonetaryReceptionMixin, TestER ...@@ -382,7 +382,7 @@ class TestERP5BankingMonetaryIssue(TestERP5BankingMonetaryReceptionMixin, TestER
self.monetary_issue.setSourceTotalAssetPrice('2000000.0') self.monetary_issue.setSourceTotalAssetPrice('2000000.0')
state = self.monetary_issue.getSimulationState() state = self.monetary_issue.getSimulationState()
# check that state is draft # check that state is draft
self.assertEqual(state, 'draft') self.assertEqual(state, 'empty')
self.workflow_tool.doActionFor(self.monetary_issue, 'confirm_action', wf_id='monetary_issue_workflow') self.workflow_tool.doActionFor(self.monetary_issue, 'confirm_action', wf_id='monetary_issue_workflow')
self.assertEqual(self.monetary_issue.getSimulationState(), 'confirmed') self.assertEqual(self.monetary_issue.getSimulationState(), 'confirmed')
workflow_history = self.workflow_tool.getInfoFor(ob=self.monetary_issue, name='history', wf_id='monetary_issue_workflow') workflow_history = self.workflow_tool.getInfoFor(ob=self.monetary_issue, name='history', wf_id='monetary_issue_workflow')
......
...@@ -369,7 +369,7 @@ class TestERP5BankingMonetaryRecall(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -369,7 +369,7 @@ class TestERP5BankingMonetaryRecall(TestERP5BankingMixin, ERP5TypeTestCase):
# get state of the monetary recall # get state of the monetary recall
state = self.monetary_recall.getSimulationState() state = self.monetary_recall.getSimulationState()
# check the state is draft # check the state is draft
self.assertEqual(state, 'draft') self.assertEqual(state, 'empty')
# get workflow history # get workflow history
workflow_history = self.workflow_tool.getInfoFor(ob=self.monetary_recall, name='history', wf_id='monetary_recall_workflow') workflow_history = self.workflow_tool.getInfoFor(ob=self.monetary_recall, name='history', wf_id='monetary_recall_workflow')
# check its len is 2 # check its len is 2
......
...@@ -300,7 +300,7 @@ class TestERP5BankingMonetaryReception(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -300,7 +300,7 @@ class TestERP5BankingMonetaryReception(TestERP5BankingMixin, ERP5TypeTestCase):
""" """
state = self.monetary_reception.getSimulationState() state = self.monetary_reception.getSimulationState()
# check that state is draft # check that state is draft
self.assertEqual(state, 'draft') self.assertEqual(state, 'empty')
self.workflow_tool.doActionFor(self.monetary_reception, 'confirm_action', wf_id='monetary_reception_workflow') self.workflow_tool.doActionFor(self.monetary_reception, 'confirm_action', wf_id='monetary_reception_workflow')
self.assertEqual(self.monetary_reception.getSimulationState(), 'confirmed') self.assertEqual(self.monetary_reception.getSimulationState(), 'confirmed')
workflow_history = self.workflow_tool.getInfoFor(ob=self.monetary_reception, name='history', wf_id='monetary_reception_workflow') workflow_history = self.workflow_tool.getInfoFor(ob=self.monetary_reception, name='history', wf_id='monetary_reception_workflow')
......
...@@ -335,7 +335,7 @@ class TestERP5BankingMonetarySurvey(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -335,7 +335,7 @@ class TestERP5BankingMonetarySurvey(TestERP5BankingMixin, ERP5TypeTestCase):
# get state of the cash transfer # get state of the cash transfer
state = self.monetary_survey.getSimulationState() state = self.monetary_survey.getSimulationState()
# check the state is draft # check the state is draft
self.assertEqual(state, 'draft') self.assertEqual(state, 'empty')
# get workflow history # get workflow history
workflow_history = self.workflow_tool.getInfoFor(ob=self.monetary_survey, name='history', wf_id='monetary_survey_workflow') workflow_history = self.workflow_tool.getInfoFor(ob=self.monetary_survey, name='history', wf_id='monetary_survey_workflow')
# check its len is 2 # check its len is 2
......
...@@ -126,7 +126,6 @@ class TestERP5BankingTravelerCheckSaleMixin: ...@@ -126,7 +126,6 @@ class TestERP5BankingTravelerCheckSaleMixin:
self.reception_destination_site = self.paris self.reception_destination_site = self.paris
self.destination_site = self.paris.surface.banque_interne.guichet_1 self.destination_site = self.paris.surface.banque_interne.guichet_1
self.source_vault = self.paris.surface.caisse_courante.encaisse_des_billets_et_monnaies self.source_vault = self.paris.surface.caisse_courante.encaisse_des_billets_et_monnaies
self.destination_vault = self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies
self.destination_vault = self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies self.destination_vault = self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies
self.traveler_check_source = self.destination_vault self.traveler_check_source = self.destination_vault
......
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