[IMP] account_tax_balance: test performance improvement

This commit is contained in:
josep-tecnativa
2023-10-13 09:30:51 +02:00
committed by Borruso
parent ca85904cc4
commit 81cc606032
5 changed files with 82 additions and 69 deletions

View File

@@ -7,7 +7,7 @@ Tax Balance
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:6bd779af11188178cb6b31da86a7cfea15ecfefa4544ccc05c756c9922bbdec4 !! source digest: sha256:64232d765ed74980509787f10bef8fbcd09566844f7194b4dc53880a8e0a01e6
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png .. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png

View File

@@ -6,7 +6,7 @@
{ {
"name": "Tax Balance", "name": "Tax Balance",
"summary": "Compute tax balances based on date range", "summary": "Compute tax balances based on date range",
"version": "16.0.1.1.0", "version": "16.0.1.1.1",
"development_status": "Mature", "development_status": "Mature",
"category": "Invoices & Payments", "category": "Invoices & Payments",
"website": "https://github.com/OCA/account-financial-reporting", "website": "https://github.com/OCA/account-financial-reporting",

View File

@@ -6,220 +6,222 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 16.0\n" "Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\n" "PO-Revision-Date: 2023-10-29 00:25+0000\n"
"Last-Translator: Adriano Prado <adrianojprado@gmail.com>\n"
"Language-Team: none\n" "Language-Team: none\n"
"Language: pt_BR\n" "Language: pt_BR\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n" "Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n" "Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.17\n"
#. module: account_tax_balance #. module: account_tax_balance
#. odoo-python #. odoo-python
#: code:addons/account_tax_balance/wizard/open_tax_balances.py:0 #: code:addons/account_tax_balance/wizard/open_tax_balances.py:0
#, python-format #, python-format
msgid "%(name)s: %(target)s from %(from)s to %(to)s" msgid "%(name)s: %(target)s from %(from)s to %(to)s"
msgstr "" msgstr "%(name)s: %(target)s de %(from)s para %(to)s"
#. module: account_tax_balance #. module: account_tax_balance
#: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_search_balance #: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_search_balance
msgid "Account Tax" msgid "Account Tax"
msgstr "" msgstr "Imposto da Conta"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields.selection,name:account_tax_balance.selection__wizard_open_tax_balances__target_move__all #: model:ir.model.fields.selection,name:account_tax_balance.selection__wizard_open_tax_balances__target_move__all
msgid "All Entries" msgid "All Entries"
msgstr "" msgstr "Todas as Entradas"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields.selection,name:account_tax_balance.selection__wizard_open_tax_balances__target_move__posted #: model:ir.model.fields.selection,name:account_tax_balance.selection__wizard_open_tax_balances__target_move__posted
msgid "All Posted Entries" msgid "All Posted Entries"
msgstr "" msgstr "Todas as Entradas Lançadas"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_account_tax__balance_regular #: model:ir.model.fields,field_description:account_tax_balance.field_account_tax__balance_regular
msgid "Balance" msgid "Balance"
msgstr "" msgstr "Saldo"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_account_tax__balance_refund #: model:ir.model.fields,field_description:account_tax_balance.field_account_tax__balance_refund
msgid "Balance Refund" msgid "Balance Refund"
msgstr "" msgstr "Reembolso do Saldo"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_account_tax__base_balance_regular #: model:ir.model.fields,field_description:account_tax_balance.field_account_tax__base_balance_regular
msgid "Base Balance" msgid "Base Balance"
msgstr "" msgstr "Saldo Base"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_account_tax__base_balance_refund #: model:ir.model.fields,field_description:account_tax_balance.field_account_tax__base_balance_refund
msgid "Base Balance Refund" msgid "Base Balance Refund"
msgstr "" msgstr "Reembolso de Saldo Base"
#. module: account_tax_balance #. module: account_tax_balance
#: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_tree_balance #: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_tree_balance
msgid "Base Total" msgid "Base Total"
msgstr "" msgstr "Base Total"
#. module: account_tax_balance #. module: account_tax_balance
#: model_terms:ir.ui.view,arch_db:account_tax_balance.wizard_open_tax_balances #: model_terms:ir.ui.view,arch_db:account_tax_balance.wizard_open_tax_balances
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr "Cancelar"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__company_ids #: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__company_ids
msgid "Companies" msgid "Companies"
msgstr "" msgstr "Empresas"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__create_uid #: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__create_uid
msgid "Created by" msgid "Created by"
msgstr "" msgstr "Criado por"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__create_date #: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__create_date
msgid "Created on" msgid "Created on"
msgstr "" msgstr "Criado em"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__date_range_id #: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__date_range_id
msgid "Date Range" msgid "Date Range"
msgstr "" msgstr "Período"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__display_name #: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__display_name
msgid "Display Name" msgid "Display Name"
msgstr "" msgstr "Nome Exibição"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_account_bank_statement_line__financial_type #: model:ir.model.fields,field_description:account_tax_balance.field_account_bank_statement_line__financial_type
#: model:ir.model.fields,field_description:account_tax_balance.field_account_move__financial_type #: model:ir.model.fields,field_description:account_tax_balance.field_account_move__financial_type
#: model:ir.model.fields,field_description:account_tax_balance.field_account_payment__financial_type #: model:ir.model.fields,field_description:account_tax_balance.field_account_payment__financial_type
msgid "Financial Type" msgid "Financial Type"
msgstr "" msgstr "Tipo Financeiro"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__from_date #: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__from_date
msgid "From Date" msgid "From Date"
msgstr "" msgstr "Data Inicial"
#. module: account_tax_balance #. module: account_tax_balance
#: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_search_balance #: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_search_balance
msgid "Group By" msgid "Group By"
msgstr "" msgstr "Agrupar por"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_account_tax__has_moves #: model:ir.model.fields,field_description:account_tax_balance.field_account_tax__has_moves
msgid "Has balance in period" msgid "Has balance in period"
msgstr "" msgstr "Tem saldo no período"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__id #: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__id
msgid "ID" msgid "ID"
msgstr "" msgstr "ID"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model,name:account_tax_balance.model_account_move #: model:ir.model,name:account_tax_balance.model_account_move
msgid "Journal Entry" msgid "Journal Entry"
msgstr "" msgstr "Entrada Diário"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model,name:account_tax_balance.model_account_move_line #: model:ir.model,name:account_tax_balance.model_account_move_line
msgid "Journal Item" msgid "Journal Item"
msgstr "" msgstr "Item Diário"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances____last_update #: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances____last_update
msgid "Last Modified on" msgid "Last Modified on"
msgstr "" msgstr "Última Modificação em"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__write_uid #: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__write_uid
msgid "Last Updated by" msgid "Last Updated by"
msgstr "" msgstr "Última Atualização por"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__write_date #: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__write_date
msgid "Last Updated on" msgid "Last Updated on"
msgstr "" msgstr "Última Atualização em"
#. module: account_tax_balance #. module: account_tax_balance
#. odoo-python #. odoo-python
#: code:addons/account_tax_balance/models/account_move.py:0 #: code:addons/account_tax_balance/models/account_move.py:0
#, python-format #, python-format
msgid "Liquidity" msgid "Liquidity"
msgstr "" msgstr "Liquidez"
#. module: account_tax_balance #. module: account_tax_balance
#: model_terms:ir.ui.view,arch_db:account_tax_balance.view_account_move_filter #: model_terms:ir.ui.view,arch_db:account_tax_balance.view_account_move_filter
msgid "Move type" msgid "Move type"
msgstr "" msgstr "Tipo Movimento"
#. module: account_tax_balance #. module: account_tax_balance
#: model_terms:ir.ui.view,arch_db:account_tax_balance.wizard_open_tax_balances #: model_terms:ir.ui.view,arch_db:account_tax_balance.wizard_open_tax_balances
msgid "Open Taxes" msgid "Open Taxes"
msgstr "" msgstr "Impostos Abertos"
#. module: account_tax_balance #. module: account_tax_balance
#. odoo-python #. odoo-python
#: code:addons/account_tax_balance/models/account_move.py:0 #: code:addons/account_tax_balance/models/account_move.py:0
#, python-format #, python-format
msgid "Other" msgid "Other"
msgstr "" msgstr "Outro"
#. module: account_tax_balance #. module: account_tax_balance
#. odoo-python #. odoo-python
#: code:addons/account_tax_balance/models/account_move.py:0 #: code:addons/account_tax_balance/models/account_move.py:0
#, python-format #, python-format
msgid "Payable" msgid "Payable"
msgstr "" msgstr "A pagar"
#. module: account_tax_balance #. module: account_tax_balance
#. odoo-python #. odoo-python
#: code:addons/account_tax_balance/models/account_move.py:0 #: code:addons/account_tax_balance/models/account_move.py:0
#, python-format #, python-format
msgid "Payable refund" msgid "Payable refund"
msgstr "" msgstr "Reembolso a pagar"
#. module: account_tax_balance #. module: account_tax_balance
#. odoo-python #. odoo-python
#: code:addons/account_tax_balance/models/account_move.py:0 #: code:addons/account_tax_balance/models/account_move.py:0
#, python-format #, python-format
msgid "Receivable" msgid "Receivable"
msgstr "" msgstr "A receber"
#. module: account_tax_balance #. module: account_tax_balance
#. odoo-python #. odoo-python
#: code:addons/account_tax_balance/models/account_move.py:0 #: code:addons/account_tax_balance/models/account_move.py:0
#, python-format #, python-format
msgid "Receivable refund" msgid "Receivable refund"
msgstr "" msgstr "Reembolso A Receber"
#. module: account_tax_balance #. module: account_tax_balance
#: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_search_balance #: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_search_balance
#: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_tree_balance #: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_tree_balance
msgid "Short Name" msgid "Short Name"
msgstr "" msgstr "Nome Curto"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__target_move #: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__target_move
msgid "Target Moves" msgid "Target Moves"
msgstr "" msgstr "Movimentos Alvo"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model,name:account_tax_balance.model_account_tax #: model:ir.model,name:account_tax_balance.model_account_tax
msgid "Tax" msgid "Tax"
msgstr "" msgstr "Imposto"
#. module: account_tax_balance #. module: account_tax_balance
#: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_search_balance #: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_search_balance
msgid "Tax Group" msgid "Tax Group"
msgstr "" msgstr "Grupo de Imposto"
#. module: account_tax_balance #. module: account_tax_balance
#: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_search_balance #: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_search_balance
msgid "Tax Scope" msgid "Tax Scope"
msgstr "" msgstr "Escopo Fiscal"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.actions.act_window,name:account_tax_balance.action_open_tax_balances #: model:ir.actions.act_window,name:account_tax_balance.action_open_tax_balances
@@ -228,71 +230,71 @@ msgstr ""
#: model:ir.ui.menu,name:account_tax_balance.menu_tax_balances #: model:ir.ui.menu,name:account_tax_balance.menu_tax_balances
#: model_terms:ir.ui.view,arch_db:account_tax_balance.wizard_open_tax_balances #: model_terms:ir.ui.view,arch_db:account_tax_balance.wizard_open_tax_balances
msgid "Taxes Balance" msgid "Taxes Balance"
msgstr "" msgstr "Saldo Impostos"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__to_date #: model:ir.model.fields,field_description:account_tax_balance.field_wizard_open_tax_balances__to_date
msgid "To Date" msgid "To Date"
msgstr "" msgstr "Data Final"
#. module: account_tax_balance #. module: account_tax_balance
#: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_tree_balance #: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_tree_balance
msgid "Total" msgid "Total"
msgstr "" msgstr "Total"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_account_tax__balance #: model:ir.model.fields,field_description:account_tax_balance.field_account_tax__balance
msgid "Total Balance" msgid "Total Balance"
msgstr "" msgstr "Saldo Total"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model.fields,field_description:account_tax_balance.field_account_tax__base_balance #: model:ir.model.fields,field_description:account_tax_balance.field_account_tax__base_balance
msgid "Total Base Balance" msgid "Total Base Balance"
msgstr "" msgstr "Saldo Base Total"
#. module: account_tax_balance #. module: account_tax_balance
#. odoo-python #. odoo-python
#: code:addons/account_tax_balance/models/account_tax.py:0 #: code:addons/account_tax_balance/models/account_tax.py:0
#, python-format #, python-format
msgid "Unsupported search operator" msgid "Unsupported search operator"
msgstr "" msgstr "Operador de pesquisa não suportado"
#. module: account_tax_balance #. module: account_tax_balance
#: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_tree_balance #: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_tree_balance
msgid "View base lines" msgid "View base lines"
msgstr "" msgstr "Ver linhas base"
#. module: account_tax_balance #. module: account_tax_balance
#: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_tree_balance #: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_tree_balance
msgid "View base refund lines" msgid "View base refund lines"
msgstr "" msgstr "Ver linhas bases de reembolso"
#. module: account_tax_balance #. module: account_tax_balance
#: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_tree_balance #: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_tree_balance
msgid "View base regular lines" msgid "View base regular lines"
msgstr "" msgstr "Ver linhas bases regulares"
#. module: account_tax_balance #. module: account_tax_balance
#: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_tree_balance #: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_tree_balance
msgid "View tax lines" msgid "View tax lines"
msgstr "" msgstr "Ver linhas de imposto"
#. module: account_tax_balance #. module: account_tax_balance
#: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_tree_balance #: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_tree_balance
msgid "View tax refund lines" msgid "View tax refund lines"
msgstr "" msgstr "Ver linhas de reembolso de imposto"
#. module: account_tax_balance #. module: account_tax_balance
#: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_tree_balance #: model_terms:ir.ui.view,arch_db:account_tax_balance.view_tax_tree_balance
msgid "View tax regular lines" msgid "View tax regular lines"
msgstr "" msgstr "Ver linhas de imposto regulares"
#. module: account_tax_balance #. module: account_tax_balance
#: model:ir.model,name:account_tax_balance.model_wizard_open_tax_balances #: model:ir.model,name:account_tax_balance.model_wizard_open_tax_balances
msgid "Wizard Open Tax Balances" msgid "Wizard Open Tax Balances"
msgstr "" msgstr "Assistente de Saldos Fiscais Abertos"
#. module: account_tax_balance #. module: account_tax_balance
#: model_terms:ir.ui.view,arch_db:account_tax_balance.wizard_open_tax_balances #: model_terms:ir.ui.view,arch_db:account_tax_balance.wizard_open_tax_balances
msgid "or" msgid "or"
msgstr "" msgstr "ou"

View File

@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:6bd779af11188178cb6b31da86a7cfea15ecfefa4544ccc05c756c9922bbdec4 !! source digest: sha256:64232d765ed74980509787f10bef8fbcd09566844f7194b4dc53880a8e0a01e6
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-financial-reporting/tree/16.0/account_tax_balance"><img alt="OCA/account-financial-reporting" src="https://img.shields.io/badge/github-OCA%2Faccount--financial--reporting-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-financial-reporting-16-0/account-financial-reporting-16-0-account_tax_balance"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p> <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-financial-reporting/tree/16.0/account_tax_balance"><img alt="OCA/account-financial-reporting" src="https://img.shields.io/badge/github-OCA%2Faccount--financial--reporting-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-financial-reporting-16-0/account-financial-reporting-16-0-account_tax_balance"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-financial-reporting&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows to compute tax balances within a certain date range. <p>This module allows to compute tax balances within a certain date range.

View File

@@ -17,28 +17,39 @@ from odoo.addons.account.tests.common import AccountTestInvoicingCommon
@odoo.tests.tagged("post_install", "-at_install") @odoo.tests.tagged("post_install", "-at_install")
class TestAccountTaxBalance(HttpCase): class TestAccountTaxBalance(HttpCase):
def setUp(self): @classmethod
super().setUp() def setUpClass(cls):
self.env.user.groups_id = [(4, self.env.ref("account.group_account_user").id)] super().setUpClass()
self.company = self.env.user.company_id cls.env = cls.env(
self.range_type = self.env["date.range.type"].create( context=dict(
cls.env.context,
mail_create_nolog=True,
mail_create_nosubscribe=True,
mail_notrack=True,
no_reset_password=True,
tracking_disable=True,
)
)
cls.env.user.groups_id = [(4, cls.env.ref("account.group_account_user").id)]
cls.company = cls.env.user.company_id
cls.range_type = cls.env["date.range.type"].create(
{"name": "Fiscal year", "allow_overlap": False} {"name": "Fiscal year", "allow_overlap": False}
) )
self.range_generator = self.env["date.range.generator"] cls.range_generator = cls.env["date.range.generator"]
self.current_year = datetime.now().year cls.current_year = datetime.now().year
self.current_month = datetime.now().month cls.current_month = datetime.now().month
range_generator = self.range_generator.create( range_generator = cls.range_generator.create(
{ {
"date_start": "%s-01-01" % self.current_year, "date_start": "%s-01-01" % cls.current_year,
"name_prefix": "%s-" % self.current_year, "name_prefix": "%s-" % cls.current_year,
"type_id": self.range_type.id, "type_id": cls.range_type.id,
"duration_count": 1, "duration_count": 1,
"unit_of_time": str(MONTHLY), "unit_of_time": str(MONTHLY),
"count": 12, "count": 12,
} }
) )
range_generator.action_apply() range_generator.action_apply()
self.range = self.env["date.range"] cls.range = cls.env["date.range"]
def test_tax_balance(self): def test_tax_balance(self):
previous_taxes_ids = ( previous_taxes_ids = (