diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/account/tests/test_account_move_partner_count.py | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/account/tests/test_account_move_partner_count.py')
| -rw-r--r-- | addons/account/tests/test_account_move_partner_count.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/addons/account/tests/test_account_move_partner_count.py b/addons/account/tests/test_account_move_partner_count.py new file mode 100644 index 00000000..88eab61d --- /dev/null +++ b/addons/account/tests/test_account_move_partner_count.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +from odoo.addons.account.tests.common import AccountTestInvoicingCommon + +from odoo.tests import tagged + + +@tagged('post_install', '-at_install') +class TestAccountMovePartnerCount(AccountTestInvoicingCommon): + + def test_account_move_count(self): + self.env['account.move'].create([ + { + 'move_type': 'out_invoice', + 'date': '2017-01-01', + 'invoice_date': '2017-01-01', + 'partner_id': self.partner_a.id, + 'invoice_line_ids': [(0, 0, {'name': 'aaaa', 'price_unit': 100.0})], + }, + { + 'move_type': 'in_invoice', + 'date': '2017-01-01', + 'invoice_date': '2017-01-01', + 'partner_id': self.partner_a.id, + 'invoice_line_ids': [(0, 0, {'name': 'aaaa', 'price_unit': 100.0})], + }, + ]).action_post() + + self.assertEqual(self.partner_a.supplier_rank, 1) + self.assertEqual(self.partner_a.customer_rank, 1) |
