[12.0][MIG] account_tax_balance

This commit is contained in:
Andrea
2018-10-01 11:21:56 +02:00
committed by Borruso
parent 7772169b20
commit 667dee8bd8
13 changed files with 539 additions and 45 deletions

View File

@@ -2,11 +2,13 @@
# © 2016 Giovanni Capalbo <giovanni@therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp.fields import Date
from openerp.tests.common import HttpCase
from datetime import datetime
from dateutil.rrule import MONTHLY
from odoo.fields import Date
from odoo.tests.common import HttpCase
class TestAccountTaxBalance(HttpCase):
at_install = False
@@ -144,6 +146,9 @@ class TestAccountTaxBalance(HttpCase):
# change the state of refund to open by clicking Validate button
refund.action_invoice_open()
# force the _compute_balance() to be triggered
tax._compute_balance()
self.assertEqual(tax.base_balance, 75.)
self.assertEqual(tax.balance, 7.5)
self.assertEqual(tax.base_balance_regular, 100.)