summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Maniet <arthurmaniet@me.com>2015-08-11 12:25:59 +0200
committerArthur Maniet <arthurmaniet@me.com>2015-08-11 12:27:39 +0200
commit7952cbed057c8d2856122ea7bf92118746eea46e (patch)
tree535acee13529047a064395cbd163cde1cb05e6f0
parent30a7ef804a1457fb0274994993c86a01dbb114d4 (diff)
[REM] account check printing: obsolete test file
Forgot to remove it along with its import in 6967e892327de3014e704393a078ab865b176534
-rw-r--r--addons/account_check_printing/tests/test_check_printing.py59
1 files changed, 0 insertions, 59 deletions
diff --git a/addons/account_check_printing/tests/test_check_printing.py b/addons/account_check_printing/tests/test_check_printing.py
deleted file mode 100644
index 36f969c53c7..00000000000
--- a/addons/account_check_printing/tests/test_check_printing.py
+++ /dev/null
@@ -1,59 +0,0 @@
-from openerp.addons.account.tests.account_test_classes import AccountingTestCase
-import time
-
-class TestCheckPrinting(AccountingTestCase):
-
- def setUp(self):
- super(TestCheckWriting, self).setUp()
- self.invoice_model = self.env['account.invoice']
- self.invoice_line_model = self.env['account.invoice.line']
- self.register_payments_model = self.env['account.register.payments']
-
- self.partner_axelor = self.env.ref("base.res_partner_13")
- self.product = self.env.ref("product.product_product_4")
- self.payment_method_check = self.env.ref("account_check_printing.account_payment_method_check")
-
- self.account_payable = self.env['account.account'].search([('user_type_id', '=', self.env.ref('account.data_account_type_payable').id)], limit=1)
- self.account_expenses = self.env['account.account'].search([('user_type_id', '=', self.env.ref('account.data_account_type_expenses').id)], limit=1)
-
- self.bank = self.env['res.partner.bank'].create({'acc_number': '0123456789', 'bank_name': 'Test Bank', 'company_id': self.env.user.company_id.id})
- self.bank_journal = self.bank.journal_id
- self.bank_journal.check_manual_sequencing = True
-
- def create_invoice(self, amount=100, is_refund=False):
- invoice = self.invoice_model.create({
- 'partner_id': self.partner_axelor.id,
- 'reference_type': 'none',
- 'name': is_refund and "Vendor Refund" or "Vendor Invoice",
- 'type': is_refund and "in_refund" or "in_invoice",
- 'account_id': self.account_payable.id,
- 'date_invoice': time.strftime('%Y') + '-06-26',
- })
- self.invoice_line_model.create({
- 'product_id': self.product.id,
- 'quantity': 1,
- 'price_unit': is_refund and amount/4 or amount,
- 'invoice_id': invoice.id,
- 'name': 'something',
- 'account_id': self.account_expenses.id,
- })
- invoice.signal_workflow('invoice_open')
- return invoice
-
- def create_payment(self, invoices):
- register_payments = self.register_payments_model.with_context({
- 'active_model': 'account.invoice',
- 'active_ids': invoices.ids
- }).create({
- 'payment_date': time.strftime('%Y') + '-07-15',
- 'journal_id': self.bank_journal.id,
- 'payment_method_id': self.payment_method_check.id,
- })
- register_payments.create_payment()
- return self.env['account.payment'].search([], order="id desc", limit=1)
-
- def test_send_check(self):
- # Create a payment and 'send' the check
- payment = self.create_payment(self.create_invoice())
- payment.print_checks()
- self.assertEqual(payment.state, 'sent')