Commit dfd7409b authored by Vincent Pelletier's avatar Vincent Pelletier

Generate 7-chars-long check numbers.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15097 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c1615650
...@@ -140,8 +140,8 @@ class TestERP5BankingCheckDeposit(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -140,8 +140,8 @@ class TestERP5BankingCheckDeposit(TestERP5BankingMixin, ERP5TypeTestCase):
self.checkbook_1 = self.createCheckbook(id= 'checkbook_1', self.checkbook_1 = self.createCheckbook(id= 'checkbook_1',
vault=None, vault=None,
bank_account=self.bank_account_2, bank_account=self.bank_account_2,
min=50, min='0000050',
max=100, max='0000100',
) )
self.check_1 = self.createCheck(id='check_1', self.check_1 = self.createCheck(id='check_1',
......
...@@ -150,30 +150,30 @@ class TestERP5BankingCheckPaymentMixin: ...@@ -150,30 +150,30 @@ class TestERP5BankingCheckPaymentMixin:
) )
self.check_1 = self.createCheck(id='check_1', self.check_1 = self.createCheck(id='check_1',
reference='50', reference='0000050',
resource_value=self.check_model, resource_value=self.check_model,
checkbook=self.checkbook_1) checkbook=self.checkbook_1)
self.check_2 = self.createCheck(id='check_2', self.check_2 = self.createCheck(id='check_2',
reference='51', reference='0000051',
resource_value=self.check_model, resource_value=self.check_model,
checkbook=self.checkbook_1) checkbook=self.checkbook_1)
self.check_3 = self.createCheck(id='check_3', self.check_3 = self.createCheck(id='check_3',
reference='52', reference='0000052',
resource_value=self.check_model, resource_value=self.check_model,
checkbook=self.checkbook_1) checkbook=self.checkbook_1)
self.check_4 = self.createCheck(id='check_4', self.check_4 = self.createCheck(id='check_4',
reference='53', reference='0000053',
resource_value=self.check_model, resource_value=self.check_model,
checkbook=self.checkbook_1) checkbook=self.checkbook_1)
self.check_5 = self.createCheck(id='check_5', self.check_5 = self.createCheck(id='check_5',
reference='54', reference='0000054',
resource_value=self.check_model, resource_value=self.check_model,
checkbook=self.checkbook_1) checkbook=self.checkbook_1)
self.check_5 = self.createCheck(id='check_6', self.check_5 = self.createCheck(id='check_6',
reference='56', reference='0000056',
resource_value=self.check_model, resource_value=self.check_model,
checkbook=self.checkbook_1) checkbook=self.checkbook_1)
self.non_existant_check_reference = '55' self.non_existant_check_reference = '0000055'
def stepCheckObjects(self, sequence=None, sequence_list=None, **kwd): def stepCheckObjects(self, sequence=None, sequence_list=None, **kwd):
""" """
......
...@@ -181,8 +181,8 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -181,8 +181,8 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin, ERP5TypeTestCase):
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,
destination_payment_value=self.bank_account_1, destination_payment_value=self.bank_account_1,
reference_range_min=50, reference_range_min='0000050',
reference_range_max=99, reference_range_max='0000099',
) )
def stepCreateCheckAndCheckbookLineList3(self, sequence=None, sequence_list=None, **kwd): def stepCreateCheckAndCheckbookLineList3(self, sequence=None, sequence_list=None, **kwd):
...@@ -194,8 +194,8 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -194,8 +194,8 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin, ERP5TypeTestCase):
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,
destination_payment_value=self.bank_account_1, destination_payment_value=self.bank_account_1,
reference_range_min=150, reference_range_min='0000150',
reference_range_max=199, reference_range_max='0000199',
) )
def stepCreateCheckAndCheckbookLineList4(self, sequence=None, sequence_list=None, **kwd): def stepCreateCheckAndCheckbookLineList4(self, sequence=None, sequence_list=None, **kwd):
...@@ -210,8 +210,8 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -210,8 +210,8 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin, ERP5TypeTestCase):
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,
destination_payment_value=self.bank_account_1, destination_payment_value=self.bank_account_1,
reference_range_min=101, reference_range_min='0000101',
reference_range_max=150, reference_range_max='0000150',
) )
def stepCreateCheckAndCheckbookLineList(self, sequence=None, sequence_list=None, **kwd): def stepCreateCheckAndCheckbookLineList(self, sequence=None, sequence_list=None, **kwd):
...@@ -226,15 +226,15 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -226,15 +226,15 @@ class TestERP5BankingCheckbookReception(TestERP5BankingMixin, ERP5TypeTestCase):
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,
destination_payment_value=self.bank_account_1, destination_payment_value=self.bank_account_1,
reference_range_min=1, reference_range_min='0000001',
reference_range_max=50 reference_range_max='0000050'
) )
self.line_2 = self.checkbook_reception.newContent(quantity=1, self.line_2 = self.checkbook_reception.newContent(quantity=1,
resource_value=self.check_model_1, resource_value=self.check_model_1,
check_amount_value=None, check_amount_value=None,
destination_payment_value=self.bank_account_2, destination_payment_value=self.bank_account_2,
reference_range_min=51, reference_range_min='0000051',
reference_range_max=51 reference_range_max='0000051'
) )
def stepCheckItemsCreated(self, sequence=None, sequence_list=None, **kwd): def stepCheckItemsCreated(self, sequence=None, sequence_list=None, **kwd):
......
...@@ -63,15 +63,15 @@ class TestERP5BankingCheckbookVaultTransferMixin: ...@@ -63,15 +63,15 @@ class TestERP5BankingCheckbookVaultTransferMixin:
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,
destination_payment_value=self.bank_account_1, destination_payment_value=self.bank_account_1,
reference_range_min=1, reference_range_min='0000001',
reference_range_max=50, reference_range_max='0000050',
) )
self.line_2 = self.checkbook_reception.newContent(quantity=1, self.line_2 = self.checkbook_reception.newContent(quantity=1,
resource_value=self.check_model_1, resource_value=self.check_model_1,
check_amount_value=None, check_amount_value=None,
destination_payment_value=self.bank_account_2, destination_payment_value=self.bank_account_2,
reference_range_min=51, reference_range_min='0000051',
reference_range_max=51, reference_range_max='0000051',
) )
self.workflow_tool.doActionFor(self.checkbook_reception, 'confirm_action', self.workflow_tool.doActionFor(self.checkbook_reception, 'confirm_action',
wf_id='checkbook_reception_workflow') wf_id='checkbook_reception_workflow')
...@@ -280,15 +280,15 @@ class TestERP5BankingCheckbookVaultTransfer(TestERP5BankingCheckbookVaultTransfe ...@@ -280,15 +280,15 @@ class TestERP5BankingCheckbookVaultTransfer(TestERP5BankingCheckbookVaultTransfe
self.line_1 = self.checkbook_vault_transfer.newContent(quantity=1, self.line_1 = self.checkbook_vault_transfer.newContent(quantity=1,
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='0000001',
reference_range_max=50, reference_range_max='0000050',
aggregate_value=self.checkbook_1 aggregate_value=self.checkbook_1
) )
self.line_2 = self.checkbook_vault_transfer.newContent(quantity=1, self.line_2 = self.checkbook_vault_transfer.newContent(quantity=1,
resource_value=self.check_model_1, resource_value=self.check_model_1,
check_amount_value=None, check_amount_value=None,
reference_range_min=51, reference_range_min='0000051',
reference_range_max=51, reference_range_max='0000051',
aggregate_value=self.check_1 aggregate_value=self.check_1
) )
......
...@@ -128,7 +128,7 @@ class TestERP5BankingStopPayment( TestERP5BankingCheckbookDeliveryMixin, ...@@ -128,7 +128,7 @@ class TestERP5BankingStopPayment( TestERP5BankingCheckbookDeliveryMixin,
resource_value=self.currency_1, resource_value=self.currency_1,
description='test', description='test',
start_date=self.date, start_date=self.date,
reference_range_min=51, reference_range_min='0000051',
aggregate_resource_value=self.check_model_1, aggregate_resource_value=self.check_model_1,
source_total_asset_price=20000) source_total_asset_price=20000)
# set source reference # set source reference
......
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