Automatic Update form OCA2FC Migrator

This commit is contained in:
Flectra Community Bot 2021-08-29 02:10:40 +00:00 committed by OCA2FC Migrator Bot
parent 1214bbbfa5
commit 8de1f9db69
8 changed files with 76 additions and 42 deletions

View File

@ -10,6 +10,6 @@ Available addons
addon | version | summary
--- | --- | ---
[account_tax_balance](account_tax_balance/) | 2.0.1.1.0| Compute tax balances based on date range
[account_financial_report](account_financial_report/) | 2.0.1.3.1| OCA Financial Reports
[account_financial_report](account_financial_report/) | 2.0.1.3.2| OCA Financial Reports

View File

@ -14,6 +14,7 @@ Most of the files are
Copyright 2019-20 ForgeFlow S.L. (https://www.forgeflow.com)
Copyright 2020 ForgeFlow S.L. (https://www.forgeflow.com)
Copyright 2020 Onestein (<https://www.onestein.eu>)
Copyright 2021 Simone Rubino - Agile Business Group
Copyright 2021 Tecnativa - João Marques
© 2016 Damien Crier (Camptocamp)
© 2016 Julien Coux (Camptocamp)

View File

@ -6,7 +6,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Account Financial Reports",
"version": "2.0.1.3.1",
"version": "2.0.1.3.2",
"category": "Reporting",
"summary": "OCA Financial Reports",
"author": "Camptocamp SA,"

View File

@ -7,8 +7,8 @@ msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-05-21 13:00+0000\n"
"PO-Revision-Date: 2021-03-10 18:45+0000\n"
"Last-Translator: Ana Suárez <ana.suarez@qubiq.es>\n"
"PO-Revision-Date: 2021-08-23 19:50+0000\n"
"Last-Translator: Ernesto Tejeda <ernesto.tejeda87@gmail.com>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
@ -213,33 +213,32 @@ msgstr "Tiempo ≤ 90 d."
#: model:ir.ui.menu,name:account_financial_report.menu_aged_partner_balance_wizard
#, python-format
msgid "Aged Partner Balance"
msgstr "Saldo vencidos de empresa"
msgstr "Calidad de la deuda"
#. module: account_financial_report
#: model_terms:ir.ui.view,arch_db:account_financial_report.report_aged_partner_balance_base
msgid "Aged Partner Balance -"
msgstr "Balance Empresa Vencido"
msgstr "Calidad de la deuda -"
#. module: account_financial_report
#: model:ir.model,name:account_financial_report.model_report_account_financial_report_aged_partner_balance
msgid "Aged Partner Balance Report"
msgstr "Estado de antigüedad de saldos"
msgstr "Informe de Calidad de la deuda"
#. module: account_financial_report
#: model:ir.model,name:account_financial_report.model_aged_partner_balance_report_wizard
msgid "Aged Partner Balance Wizard"
msgstr "Asistente de Estado de Antigüedad de Saldos"
msgstr "Asistente de Calidad de la deuda"
#. module: account_financial_report
#: model:ir.model,name:account_financial_report.model_report_a_f_r_report_aged_partner_balance_xlsx
#, fuzzy
msgid "Aged Partner Balance XLSL Report"
msgstr "Saldo vencidos de empresa XLSX"
msgstr "Calidad de la deuda XLSX"
#. module: account_financial_report
#: model:ir.actions.report,name:account_financial_report.action_report_aged_partner_balance_xlsx
msgid "Aged Partner Balance XLSX"
msgstr "Saldo vencidos de empresa XLSX"
msgstr "Calidad de la deuda XLSX"
#. module: account_financial_report
#: code:addons/account_financial_report/wizard/journal_ledger_wizard.py:0
@ -802,9 +801,8 @@ msgstr "Filtro Cuentas"
#. module: account_financial_report
#: model_terms:ir.ui.view,arch_db:account_financial_report.general_ledger_wizard
#, fuzzy
msgid "Filter analytic accounts"
msgstr "Filtrar por etiquetas analíticas"
msgstr "Filtrar por cuentas analíticas"
#. module: account_financial_report
#: model:ir.model.fields,field_description:account_financial_report.field_general_ledger_report_wizard__analytic_tag_ids

View File

@ -218,9 +218,8 @@ class AgedPartnerBalanceReport(models.AbstractModel):
"ref",
"reconciled",
]
move_lines = self.env["account.move.line"].search_read(
domain=domain, fields=ml_fields
)
line_model = self.env["account.move.line"]
move_lines = line_model.search_read(domain=domain, fields=ml_fields)
journals_ids = set()
partners_ids = set()
partners_data = {}
@ -288,6 +287,7 @@ class AgedPartnerBalanceReport(models.AbstractModel):
ref_label = move_line["ref"] + str(" - ") + move_line["name"]
move_line_data.update(
{
"line_rec": line_model.browse(move_line["id"]),
"date": move_line["date"],
"entry": move_line["move_id"][1],
"jnl_id": move_line["journal_id"][0],

View File

@ -249,7 +249,7 @@
<!--## date-->
<div class="act_as_cell left">
<span
t-att-res-id="line.move_line_id.id"
t-att-res-id="line['line_rec'].id"
res-model="account.move.line"
view-type="form"
>
@ -260,7 +260,7 @@
<!--## move-->
<div class="act_as_cell left">
<span
t-att-res-id="line.move_line_id.move_id.id"
t-att-res-id="line['line_rec'].move_id.id"
res-model="account.move"
view-type="form"
>
@ -270,7 +270,7 @@
<!--## journal-->
<div class="act_as_cell left">
<span
t-att-res-id="line.move_line_id.move_id.journal_id.id"
t-att-res-id="line['line_rec'].move_id.journal_id.id"
res-model="account.journal"
view-type="form"
>
@ -280,7 +280,7 @@
<!--## account code-->
<div class="act_as_cell left">
<span
t-att-res-id="line.move_line_id.account_id.id"
t-att-res-id="line['line_rec'].account_id.id"
res-model="account.account"
view-type="form"
>
@ -290,7 +290,7 @@
<!--## partner-->
<div class="act_as_cell left">
<span
t-att-res-id="line.move_line_id.partner_id.id"
t-att-res-id="line['line_rec'].partner_id.id"
res-model="res.partner"
view-type="form"
>
@ -300,7 +300,7 @@
<!--## ref - label-->
<div class="act_as_cell left">
<span
t-att-res-id="line.move_line_id.id"
t-att-res-id="line['line_rec'].id"
res-model="account.move.line"
view-type="form"
>
@ -310,7 +310,7 @@
<!--## date_due-->
<div class="act_as_cell left">
<span
t-att-res-id="line.move_line_id.id"
t-att-res-id="line['line_rec'].id"
res-model="account.move.line"
view-type="form"
>
@ -324,7 +324,7 @@
<!--## amount_residual-->
<div class="act_as_cell amount">
<span
domain="[('id', 'in', (line.move_line_id | line.move_line_id.matched_debit_ids.mapped('debit_move_id') | line.move_line_id.matched_credit_ids.mapped('credit_move_id')).ids)]"
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
res-model="account.move.line"
>
<t
@ -335,15 +335,15 @@
</div>
<!--## current-->
<div class="act_as_cell amount">
<t t-if="line.current == 0">
<t t-if="line['current'] == 0">
<span
t-field="line.current"
t-esc="line['current']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</t>
<t t-else="">
<span
domain="[('id', 'in', (line.move_line_id | line.move_line_id.matched_debit_ids.mapped('debit_move_id') | line.move_line_id.matched_credit_ids.mapped('credit_move_id')).ids)]"
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
res-model="account.move.line"
>
<t
@ -355,15 +355,15 @@
</div>
<!--## age_30_days-->
<div class="act_as_cell amount">
<t t-if="line.age_30_days == 0">
<t t-if="line['30_days'] == 0">
<span
t-field="line.age_30_days"
t-esc="line['30_days']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</t>
<t t-else="">
<span
domain="[('id', 'in', (line.move_line_id | line.move_line_id.matched_debit_ids.mapped('debit_move_id') | line.move_line_id.matched_credit_ids.mapped('credit_move_id')).ids)]"
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
res-model="account.move.line"
>
<t
@ -375,15 +375,15 @@
</div>
<!--## age_60_days-->
<div class="act_as_cell amount">
<t t-if="line.age_60_days == 0">
<t t-if="line['60_days'] == 0">
<span
t-field="line.age_60_days"
t-esc="line['60_days']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</t>
<t t-else="">
<span
domain="[('id', 'in', (line.move_line_id | line.move_line_id.matched_debit_ids.mapped('debit_move_id') | line.move_line_id.matched_credit_ids.mapped('credit_move_id')).ids)]"
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
res-model="account.move.line"
>
<t
@ -395,15 +395,15 @@
</div>
<!--## age_90_days-->
<div class="act_as_cell amount">
<t t-if="line.age_90_days == 0">
<t t-if="line['90_days'] == 0">
<span
t-field="line.age_90_days"
t-esc="line['90_days']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</t>
<t t-else="">
<span
domain="[('id', 'in', (line.move_line_id | line.move_line_id.matched_debit_ids.mapped('debit_move_id') | line.move_line_id.matched_credit_ids.mapped('credit_move_id')).ids)]"
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
res-model="account.move.line"
>
<t
@ -415,15 +415,15 @@
</div>
<!--## age_120_days-->
<div class="act_as_cell amount">
<t t-if="line.age_120_days == 0">
<t t-if="line['120_days'] == 0">
<span
t-field="line.age_120_days"
t-esc="line['120_days']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</t>
<t t-else="">
<span
domain="[('id', 'in', (line.move_line_id | line.move_line_id.matched_debit_ids.mapped('debit_move_id') | line.move_line_id.matched_credit_ids.mapped('credit_move_id')).ids)]"
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
res-model="account.move.line"
>
<t
@ -435,15 +435,15 @@
</div>
<!--## older-->
<div class="act_as_cell amount">
<t t-if="line.older == 0">
<t t-if="line['older'] == 0">
<span
t-field="line.older"
t-esc="line['older']"
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"
/>
</t>
<t t-else="">
<span
domain="[('id', 'in', (line.move_line_id | line.move_line_id.matched_debit_ids.mapped('debit_move_id') | line.move_line_id.matched_credit_ids.mapped('credit_move_id')).ids)]"
domain="[('id', 'in', (line['line_rec'] | line['line_rec'].matched_debit_ids.mapped('debit_move_id') | line['line_rec'].matched_credit_ids.mapped('credit_move_id')).ids)]"
res-model="account.move.line"
>
<t

View File

@ -1,6 +1,7 @@
# © 2016 Julien Coux (Camptocamp)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).-
from . import test_aged_partner_balance
from . import test_general_ledger
from . import test_journal_ledger
from . import test_open_items

View File

@ -0,0 +1,34 @@
# Copyright 2021 Simone Rubino - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from flectra.tests import TransactionCase
from flectra.tools import DEFAULT_SERVER_DATE_FORMAT, test_reports
class TestAgedPartnerBalance(TransactionCase):
def setUp(self):
super().setUp()
self.wizard_model = self.env["aged.partner.balance.report.wizard"]
def test_report(self):
"""Check that report is produced correctly."""
wizard = self.wizard_model.create(
{
"show_move_line_details": True,
"receivable_accounts_only": True,
}
)
wizard.onchange_type_accounts_only()
data = wizard._prepare_report_aged_partner_balance()
# Simulate web client behavior:
# default value is a datetime.date but web client sends back strings
data.update({"date_at": data["date_at"].strftime(DEFAULT_SERVER_DATE_FORMAT)})
result = test_reports.try_report(
self.env.cr,
self.env.uid,
"account_financial_report.aged_partner_balance",
wizard.ids,
data=data,
)
self.assertTrue(result)