Commit f63b1874 authored by Jérome Perrin's avatar Jérome Perrin

tests the case of an invoice that will have lines grouped together


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31817 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d2d2731a
......@@ -2716,6 +2716,34 @@ class TestTransactions(AccountingTestCase):
self.failIf(invoice_line.getGroupingReference())
self.failIf(payment_line.getGroupingReference())
def test_automatically_setting_grouping_reference_in_one_invoice(self):
# this invoice will group it itself
invoice = self._makeOne(
title='One Invoice',
simulation_state='stopped',
destination_section_value=self.organisation_module.client_1,
lines=(dict(source_value=self.account_module.receivable,
source_debit=100),
dict(source_value=self.account_module.receivable,
source_credit=100, )))
transaction.commit()
self.tic()
for line in invoice.contentValues():
self.assertTrue(line.getGroupingReference())
invoice.restart()
transaction.commit()
self.tic()
for line in invoice.contentValues():
self.assertFalse(line.getGroupingReference())
invoice.stop()
transaction.commit()
self.tic()
for line in invoice.contentValues():
self.assertTrue(line.getGroupingReference())
def test_AccountingTransaction_getTotalDebitCredit(self):
# source view
accounting_transaction = self._makeOne(
......
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