Fix and make some improvements.

Tasks: #162395
This commit is contained in:
Bernat Brunet 2023-10-06 13:05:17 +02:00
parent 900649282b
commit af9d46ba00
6 changed files with 9 additions and 29 deletions

View File

@ -72,7 +72,7 @@ class Account(metaclass=PoolMeta):
('company', '=', company),
])
if final_accounts:
account_ids = [a.id for a in accounts if a.childs is None]
account_ids = [a.id for a in accounts if not a.childs]
else:
account_ids = [a.id for a in accounts]
group_by = (table_a.id,)

View File

@ -241,8 +241,7 @@ class GeneralLedgerReport(HTMLReport):
def _get_key(currentKey):
party = (currentKey[1].name if len(currentKey) > 1
and currentKey[1] else 'None')
key = '%s %s' % (currentKey[0].code, party)
return key
return (currentKey[0].code, party)
fiscalyear = (FiscalYear(data['fiscalyear']) if data.get('fiscalyear')
else None)
@ -375,10 +374,7 @@ class GeneralLedgerReport(HTMLReport):
for line in Line.browse(group_lines):
if line.account not in accounts_w_moves:
accounts_w_moves.append(line.account.id)
if line.party:
currentKey = (line.account, line.party)
else:
currentKey = (line.account,)
currentKey = (line.account, line.party)
if lastKey != currentKey:
lastKey = currentKey
account_id = currentKey[0].id

View File

@ -8,12 +8,7 @@
<th style="text-align: right;">{{ _('Balance') }}</th>
</tr>
{% for k, record in records.items() %}
{% if (not record.party and record.party_required) or (record.party and not record.party_required) %}
{% set style = 'color: #FF0000;' %}
{% else %}
{% set style = '' %}
{% endif %}
<tr style='{{ style }}'>
<tr>
<td colspan="2" class="bold">{{ record.code }}</td>
<td class="bold">{% if record.party %}{{ record.party }}{% else %}{{ record.account }}{% endif %}</td>
<td colspan="2" style="text-align: right;">{% if record.lines %}{{ _('Previous balance...') }}{% endif %}</td>

View File

@ -51,8 +51,7 @@ header {
</tr>
<tr>
<td>
<p>{{ _("When the Move number is between '()' means it hasn't Post Number and the shown number is the provisional one.") }}<br/>
{{ _("When the Move Lines header is in read means it's not correct the Move Lines.") }}</p>
<p>{{ _("When move number is between parentheses it means that it has no post number and the number shown is the provisional one.") }}<br/>
</td>
</tr>
</tbody>

View File

@ -279,17 +279,12 @@ msgstr "NIF"
msgctxt "report:account_reports.general_ledger:"
msgid ""
"When the Move number is between '()' means it hasn't Post Number and the "
"shown number is the provisional one."
"When move number is between parentheses it means that it has no post number "
"and the number shown is the provisional one."
msgstr ""
"Si el número d'assentament apareix entre parèntesis indica que no té número "
"confirmat i el número que es mostra és el provisional."
msgctxt "report:account_reports.general_ledger:"
msgid ""
"When the Move Lines header is in read means it's not correct the Move Lines."
msgstr "Si la capçalera es en vermell indica que els apunts no son correctes."
msgctxt "report:account_reports.taxes_by_invoice:"
msgid "Account"
msgstr "Compte"

View File

@ -279,17 +279,12 @@ msgstr "NIF"
msgctxt "report:account_reports.general_ledger:"
msgid ""
"When the Move number is between '()' means it hasn't Post Number and the "
"shown number is the provisional one."
"When move number is between parentheses it means that it has no post number "
"and the number shown is the provisional one."
msgstr ""
"Si el número de asiento aparece entre paréntesis indica que no tiene número "
"confirmado y el número que se muestra es el provisional."
msgctxt "report:account_reports.general_ledger:"
msgid ""
"When the Move Lines header is in read means it's not correct the Move Lines."
msgstr "Si la cabecera es en rojo indica que los apuntes no son correctos."
msgctxt "report:account_reports.taxes_by_invoice:"
msgid "Account"
msgstr "Cuenta"