[MIG] account_tax_balance: Migration to 11.0
parent
508801e3c6
commit
94fcd3178b
|
@ -20,7 +20,7 @@ Select the company, the date range, the target moves and 'open taxes'
|
||||||
|
|
||||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||||
:alt: Try me on Runbot
|
:alt: Try me on Runbot
|
||||||
:target: https://runbot.odoo-community.org/runbot/91/10.0
|
:target: https://runbot.odoo-community.org/runbot/91/11.0
|
||||||
|
|
||||||
Bug Tracker
|
Bug Tracker
|
||||||
===========
|
===========
|
||||||
|
@ -43,6 +43,9 @@ Contributors
|
||||||
|
|
||||||
* Lorenzo Battistini <lorenzo.battistini@agilebg.com>
|
* Lorenzo Battistini <lorenzo.battistini@agilebg.com>
|
||||||
* Giovanni Capalbo <giovanni@therp.nl>
|
* Giovanni Capalbo <giovanni@therp.nl>
|
||||||
|
* Tecnativa - Antonio Espinosa
|
||||||
|
* Tecnativa - Pedro M. Baeza
|
||||||
|
* ACSONE SA/NV - Stéphane Bidoul
|
||||||
|
|
||||||
Maintainer
|
Maintainer
|
||||||
----------
|
----------
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# © 2016 Lorenzo Battistini - Agile Business Group
|
# Copyright 2016 Lorenzo Battistini - Agile Business Group
|
||||||
# © 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com>
|
# Copyright 2016 Tecnativa - Antonio Espinosa
|
||||||
|
# Copyright 2016 ACSONE SA/NV - Stéphane Bidoul
|
||||||
|
# Copyright 2017 Tecnativa - Pedro M. Baeza
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
{
|
{
|
||||||
"name": "Tax Balance",
|
"name": "Tax Balance",
|
||||||
"summary": "Compute tax balances based on date range",
|
"summary": "Compute tax balances based on date range",
|
||||||
"version": "10.0.1.1.1",
|
"version": "11.0.1.0.0",
|
||||||
"category": "Accounting & Finance",
|
"category": "Accounting & Finance",
|
||||||
"website": "https://www.agilebg.com/",
|
"website": "https://www.agilebg.com/",
|
||||||
"author": "Agile Business Group, Therp BV, Tecnativa, ACSONE SA/NV, "
|
"author": "Agile Business Group, Therp BV, Tecnativa, ACSONE SA/NV, "
|
||||||
|
|
|
@ -68,12 +68,12 @@ class TestAccountTaxBalance(TransactionCase):
|
||||||
# change the state of invoice to open by clicking Validate button
|
# change the state of invoice to open by clicking Validate button
|
||||||
invoice.action_invoice_open()
|
invoice.action_invoice_open()
|
||||||
|
|
||||||
self.assertEquals(tax.base_balance, 100.)
|
self.assertEqual(tax.base_balance, 100.)
|
||||||
self.assertEquals(tax.balance, 10.)
|
self.assertEqual(tax.balance, 10.)
|
||||||
self.assertEquals(tax.base_balance_regular, 100.)
|
self.assertEqual(tax.base_balance_regular, 100.)
|
||||||
self.assertEquals(tax.balance_regular, 10.)
|
self.assertEqual(tax.balance_regular, 10.)
|
||||||
self.assertEquals(tax.base_balance_refund, 0.)
|
self.assertEqual(tax.base_balance_refund, 0.)
|
||||||
self.assertEquals(tax.balance_refund, 0.)
|
self.assertEqual(tax.balance_refund, 0.)
|
||||||
|
|
||||||
# testing wizard
|
# testing wizard
|
||||||
current_range = self.range.search([
|
current_range = self.range.search([
|
||||||
|
@ -99,7 +99,7 @@ class TestAccountTaxBalance(TransactionCase):
|
||||||
# exercise search has_moves = True
|
# exercise search has_moves = True
|
||||||
taxes = self.env['account.tax'].search([('has_moves', '=', True)])
|
taxes = self.env['account.tax'].search([('has_moves', '=', True)])
|
||||||
self.assertEqual(len(taxes), 1)
|
self.assertEqual(len(taxes), 1)
|
||||||
self.assertEqual(taxes[0].name, u"Tax 10.0%")
|
self.assertEqual(taxes[0].name, "Tax 10.0%")
|
||||||
|
|
||||||
# testing buttons
|
# testing buttons
|
||||||
tax_action = tax.view_tax_lines()
|
tax_action = tax.view_tax_lines()
|
||||||
|
@ -143,12 +143,12 @@ class TestAccountTaxBalance(TransactionCase):
|
||||||
# change the state of refund to open by clicking Validate button
|
# change the state of refund to open by clicking Validate button
|
||||||
refund.action_invoice_open()
|
refund.action_invoice_open()
|
||||||
|
|
||||||
self.assertEquals(tax.base_balance, 75.)
|
self.assertEqual(tax.base_balance, 75.)
|
||||||
self.assertEquals(tax.balance, 7.5)
|
self.assertEqual(tax.balance, 7.5)
|
||||||
self.assertEquals(tax.base_balance_regular, 100.)
|
self.assertEqual(tax.base_balance_regular, 100.)
|
||||||
self.assertEquals(tax.balance_regular, 10.)
|
self.assertEqual(tax.balance_regular, 10.)
|
||||||
self.assertEquals(tax.base_balance_refund, -25.)
|
self.assertEqual(tax.base_balance_refund, -25.)
|
||||||
self.assertEquals(tax.balance_refund, -2.5)
|
self.assertEqual(tax.balance_refund, -2.5)
|
||||||
|
|
||||||
# Taxes on liquidity type moves are included
|
# Taxes on liquidity type moves are included
|
||||||
liquidity_account_id = self.env['account.account'].search(
|
liquidity_account_id = self.env['account.account'].search(
|
||||||
|
@ -178,5 +178,5 @@ class TestAccountTaxBalance(TransactionCase):
|
||||||
})],
|
})],
|
||||||
}).post()
|
}).post()
|
||||||
tax.refresh()
|
tax.refresh()
|
||||||
self.assertEquals(tax.base_balance, 175.)
|
self.assertEqual(tax.base_balance, 175.)
|
||||||
self.assertEquals(tax.balance, 17.5)
|
self.assertEqual(tax.balance, 17.5)
|
||||||
|
|
Loading…
Reference in New Issue