Commit 86d0c137 authored by Yusuke Muraoka's avatar Yusuke Muraoka

update expected references

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33616 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 51c0bd49
...@@ -494,7 +494,11 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase): ...@@ -494,7 +494,11 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
bank2.validate() bank2.validate()
else: else:
bank2 = bank1 bank2 = bank1
# reset ids for auto generating reference
self.portal.portal_ids.setLastGeneratedId(0, id_group='Accounting_Transaction_Module-Accounting_Transaction')
self.portal.portal_ids.setLastGeneratedId(0, id_group='Accounting_Transaction_Module-Payment_Transaction')
# before # before
t1 = self._makeOne( t1 = self._makeOne(
portal_type='Accounting Transaction', portal_type='Accounting Transaction',
...@@ -2683,7 +2687,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase): ...@@ -2683,7 +2687,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
Movement_getExplanationTitle='Transaction 1', Movement_getExplanationTitle='Transaction 1',
date=DateTime(2006, 2, 1), date=DateTime(2006, 2, 1),
Movement_getExplanationTranslatedPortalType='Accounting Transaction', Movement_getExplanationTranslatedPortalType='Accounting Transaction',
Movement_getExplanationReference=None, Movement_getExplanationReference='AT 1',
Movement_getMirrorSectionTitle='Client 1', Movement_getMirrorSectionTitle='Client 1',
debit=0, credit=100, running_total_price=-100, ) debit=0, credit=100, running_total_price=-100, )
...@@ -2692,7 +2696,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase): ...@@ -2692,7 +2696,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
Movement_getExplanationTitle='Transaction 2', Movement_getExplanationTitle='Transaction 2',
date=DateTime(2006, 2, 1, 0, 1), date=DateTime(2006, 2, 1, 0, 1),
Movement_getExplanationTranslatedPortalType='Accounting Transaction', Movement_getExplanationTranslatedPortalType='Accounting Transaction',
Movement_getExplanationReference=None, Movement_getExplanationReference='AT 2',
Movement_getMirrorSectionTitle='Client 1', Movement_getMirrorSectionTitle='Client 1',
debit=200, credit=0, running_total_price=100, ) debit=200, credit=0, running_total_price=100, )
...@@ -2716,7 +2720,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase): ...@@ -2716,7 +2720,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
Movement_getExplanationTitle='Transaction 1', Movement_getExplanationTitle='Transaction 1',
date=DateTime(2006, 2, 1), date=DateTime(2006, 2, 1),
Movement_getExplanationTranslatedPortalType='Accounting Transaction', Movement_getExplanationTranslatedPortalType='Accounting Transaction',
Movement_getExplanationReference=None, Movement_getExplanationReference='AT 1',
Movement_getMirrorSectionTitle='Client 1', Movement_getMirrorSectionTitle='Client 1',
debit=100, credit=0, running_total_price=100, ) debit=100, credit=0, running_total_price=100, )
...@@ -2725,7 +2729,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase): ...@@ -2725,7 +2729,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
Movement_getExplanationTitle='Transaction 2', Movement_getExplanationTitle='Transaction 2',
date=DateTime(2006, 2, 1, 0, 1), date=DateTime(2006, 2, 1, 0, 1),
Movement_getExplanationTranslatedPortalType='Accounting Transaction', Movement_getExplanationTranslatedPortalType='Accounting Transaction',
Movement_getExplanationReference=None, Movement_getExplanationReference='AT 2',
Movement_getMirrorSectionTitle='Client 1', Movement_getMirrorSectionTitle='Client 1',
debit=0, credit=200, running_total_price=-100, ) debit=0, credit=200, running_total_price=-100, )
...@@ -2734,7 +2738,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase): ...@@ -2734,7 +2738,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
Movement_getExplanationTitle='Transaction 3', Movement_getExplanationTitle='Transaction 3',
date=DateTime(2006, 2, 2, 0, 2), date=DateTime(2006, 2, 2, 0, 2),
Movement_getExplanationTranslatedPortalType='Payment Transaction', Movement_getExplanationTranslatedPortalType='Payment Transaction',
Movement_getExplanationReference=None, Movement_getExplanationReference='PT 1',
Movement_getMirrorSectionTitle='Client 1', Movement_getMirrorSectionTitle='Client 1',
debit=300, credit=0, running_total_price=200, ) debit=300, credit=0, running_total_price=200, )
...@@ -2753,7 +2757,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase): ...@@ -2753,7 +2757,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
Movement_getExplanationTitle='Transaction 8', Movement_getExplanationTitle='Transaction 8',
date=DateTime(2006, 2, 3), date=DateTime(2006, 2, 3),
Movement_getExplanationTranslatedPortalType='Accounting Transaction', Movement_getExplanationTranslatedPortalType='Accounting Transaction',
Movement_getExplanationReference=None, Movement_getExplanationReference='AT 5',
Movement_getMirrorSectionTitle='Client 1', Movement_getMirrorSectionTitle='Client 1',
debit=800, credit=0, running_total_price=1600, ) debit=800, credit=0, running_total_price=1600, )
...@@ -2777,7 +2781,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase): ...@@ -2777,7 +2781,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
Movement_getExplanationTitle='Transaction 4', Movement_getExplanationTitle='Transaction 4',
date=DateTime(2006, 2, 2, 0, 3), date=DateTime(2006, 2, 2, 0, 3),
Movement_getExplanationTranslatedPortalType='Payment Transaction', Movement_getExplanationTranslatedPortalType='Payment Transaction',
Movement_getExplanationReference=None, Movement_getExplanationReference='PT 2',
Movement_getMirrorSectionTitle='Client 2', Movement_getMirrorSectionTitle='Client 2',
debit=400, credit=0, running_total_price=400, ) debit=400, credit=0, running_total_price=400, )
...@@ -2794,7 +2798,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase): ...@@ -2794,7 +2798,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
Movement_getExplanationTitle='Transaction 5', Movement_getExplanationTitle='Transaction 5',
date=DateTime(2006, 2, 2, 0, 4), date=DateTime(2006, 2, 2, 0, 4),
Movement_getExplanationTranslatedPortalType='Accounting Transaction', Movement_getExplanationTranslatedPortalType='Accounting Transaction',
Movement_getExplanationReference=None, Movement_getExplanationReference='AT 3',
Movement_getMirrorSectionTitle='John Smith', Movement_getMirrorSectionTitle='John Smith',
debit=500, credit=0, running_total_price=500, ) debit=500, credit=0, running_total_price=500, )
...@@ -2811,7 +2815,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase): ...@@ -2811,7 +2815,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
Movement_getExplanationTitle='Transaction 3', Movement_getExplanationTitle='Transaction 3',
date=DateTime(2006, 2, 2, 0, 2), date=DateTime(2006, 2, 2, 0, 2),
Movement_getExplanationTranslatedPortalType='Payment Transaction', Movement_getExplanationTranslatedPortalType='Payment Transaction',
Movement_getExplanationReference=None, Movement_getExplanationReference='PT 1',
Movement_getMirrorSectionTitle='Client 1', Movement_getMirrorSectionTitle='Client 1',
debit=0, credit=300, running_total_price=-300, ) debit=0, credit=300, running_total_price=-300, )
...@@ -2820,7 +2824,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase): ...@@ -2820,7 +2824,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
Movement_getExplanationTitle='Transaction 4', Movement_getExplanationTitle='Transaction 4',
date=DateTime(2006, 2, 2, 0, 3), date=DateTime(2006, 2, 2, 0, 3),
Movement_getExplanationTranslatedPortalType='Payment Transaction', Movement_getExplanationTranslatedPortalType='Payment Transaction',
Movement_getExplanationReference=None, Movement_getExplanationReference='PT 2',
Movement_getMirrorSectionTitle='Client 2', Movement_getMirrorSectionTitle='Client 2',
debit=0, credit=400, running_total_price=-700, ) debit=0, credit=400, running_total_price=-700, )
...@@ -2829,7 +2833,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase): ...@@ -2829,7 +2833,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
Movement_getExplanationTitle='Transaction 5', Movement_getExplanationTitle='Transaction 5',
date=DateTime(2006, 2, 2, 0, 4), date=DateTime(2006, 2, 2, 0, 4),
Movement_getExplanationTranslatedPortalType='Accounting Transaction', Movement_getExplanationTranslatedPortalType='Accounting Transaction',
Movement_getExplanationReference=None, Movement_getExplanationReference='AT 3',
Movement_getMirrorSectionTitle='John Smith', Movement_getMirrorSectionTitle='John Smith',
debit=0, credit=500, running_total_price=-1200, ) debit=0, credit=500, running_total_price=-1200, )
...@@ -2848,7 +2852,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase): ...@@ -2848,7 +2852,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
Movement_getExplanationTitle='Transaction 8', Movement_getExplanationTitle='Transaction 8',
date=DateTime(2006, 2, 3), date=DateTime(2006, 2, 3),
Movement_getExplanationTranslatedPortalType='Accounting Transaction', Movement_getExplanationTranslatedPortalType='Accounting Transaction',
Movement_getExplanationReference=None, Movement_getExplanationReference='AT 5',
Movement_getMirrorSectionTitle='Client 1', Movement_getMirrorSectionTitle='Client 1',
debit=0, credit=800, running_total_price=-2600, ) debit=0, credit=800, running_total_price=-2600, )
......
...@@ -390,7 +390,7 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice): ...@@ -390,7 +390,7 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice):
quiet = 1 quiet = 1
RUN_ALL_TESTS = 1 RUN_ALL_TESTS = 1
login = TestAdvancedInvoice.login login = TestAdvancedInvoice.login
def stepCheckInvoicesAndTransactionsConsistency(self, sequence=None, sequence_list=None, def stepCheckInvoicesAndTransactionsConsistency(self, sequence=None, sequence_list=None,
**kw): **kw):
""" """
...@@ -897,7 +897,7 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice): ...@@ -897,7 +897,7 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice):
self.portal.portal_workflow.doActionFor(invoice, 'confirm_action') self.portal.portal_workflow.doActionFor(invoice, 'confirm_action')
# We could generate a better reference here. # We could generate a better reference here.
self.assertEquals('1', invoice.getReference()) self.assertEquals('SIT 1', invoice.getReference())
def test_10_ManuallyAddedMovements(self, quiet=quiet, run=RUN_ALL_TESTS): def test_10_ManuallyAddedMovements(self, quiet=quiet, run=RUN_ALL_TESTS):
""" """
......
...@@ -2560,6 +2560,10 @@ class TestSaleInvoiceMixin(TestInvoiceMixin, ...@@ -2560,6 +2560,10 @@ class TestSaleInvoiceMixin(TestInvoiceMixin,
stepCheckNewPackingListIsPacked stepCheckNewPackingListIsPacked
""" """
def afterSetUp(self):
super(TestSaleInvoiceMixin, self).afterSetUp()
self.portal.portal_ids.setLastGeneratedId(0, id_group='Accounting_Transaction_Module-Sale_Invoice_Transaction')
class TestSaleInvoice(TestSaleInvoiceMixin, TestInvoice, ERP5TypeTestCase): class TestSaleInvoice(TestSaleInvoiceMixin, TestInvoice, ERP5TypeTestCase):
"""Tests for sale invoice. """Tests for sale invoice.
""" """
...@@ -3321,8 +3325,7 @@ class TestSaleInvoice(TestSaleInvoiceMixin, TestInvoice, ERP5TypeTestCase): ...@@ -3321,8 +3325,7 @@ class TestSaleInvoice(TestSaleInvoiceMixin, TestInvoice, ERP5TypeTestCase):
destination_section_value=client) destination_section_value=client)
self.portal.portal_workflow.doActionFor(invoice, 'confirm_action') self.portal.portal_workflow.doActionFor(invoice, 'confirm_action')
# We could generate a better reference here. self.assertEquals('SIT 1', invoice.getReference())
self.assertEquals('1', invoice.getReference())
def test_16_ManuallyAddedMovements(self, quiet=quiet): def test_16_ManuallyAddedMovements(self, quiet=quiet):
""" """
......
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